Browse Source

DX: cleanup PHP Migration rulesets

Dariusz Ruminski 4 years ago
parent
commit
9e53d08d40

+ 1 - 1
.github/workflows/ci.yml

@@ -120,7 +120,7 @@ jobs:
 
       - name: Execute migration rules
         if: matrix.execute-migration-rules == 'yes'
-        run: php php-cs-fixer fix --rules @PHP73Migration,@PHP71Migration:risky,blank_line_after_opening_tag -q
+        run: php php-cs-fixer fix --rules @PHP80Migration,@PHP80Migration:risky,blank_line_after_opening_tag -q
 
       - name: Disable time limit for tests when collecting coverage
         if: matrix.calculate-code-coverage == 'yes'

+ 1 - 2
doc/ruleSets/PHP80Migration.rst

@@ -7,7 +7,6 @@ Rules to improve code for PHP 8.0 compatibility.
 Rules
 -----
 
-- `@PHP73Migration <./PHP73Migration.rst>`_
+- `@PHP74Migration <./PHP74Migration.rst>`_
 - `clean_namespace <./../rules/namespace_notation/clean_namespace.rst>`_
 - `no_unset_cast <./../rules/cast_notation/no_unset_cast.rst>`_
-- `normalize_index_brace <./../rules/array_notation/normalize_index_brace.rst>`_

+ 1 - 2
doc/ruleSets/PHP80MigrationRisky.rst

@@ -7,8 +7,7 @@ Rules to improve code for PHP 8.0 compatibility. This set contains rules that ar
 Rules
 -----
 
-- `@PHP71Migration:risky <./PHP71MigrationRisky.rst>`_
-- `implode_call <./../rules/function_notation/implode_call.rst>`_
+- `@PHP74Migration:risky <./PHP74MigrationRisky.rst>`_
 - `no_alias_functions <./../rules/alias/no_alias_functions.rst>`_
   config:
   ``['sets' => ['@all']]``

+ 3 - 0
doc/rules/cast_notation/short_scalar_cast.rst

@@ -57,6 +57,9 @@ The rule is part of the following rule sets:
 @PHP74Migration
   Using the `@PHP74Migration <./../../ruleSets/PHP74Migration.rst>`_ rule set will enable the ``short_scalar_cast`` rule.
 
+@PHP80Migration
+  Using the `@PHP80Migration <./../../ruleSets/PHP80Migration.rst>`_ rule set will enable the ``short_scalar_cast`` rule.
+
 @PhpCsFixer
   Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``short_scalar_cast`` rule.
 

+ 4 - 1
doc/rules/function_notation/use_arrow_functions.rst

@@ -29,7 +29,10 @@ Example #1
 Rule sets
 ---------
 
-The rule is part of the following rule set:
+The rule is part of the following rule sets:
 
 @PHP74Migration:risky
   Using the `@PHP74Migration:risky <./../../ruleSets/PHP74MigrationRisky.rst>`_ rule set will enable the ``use_arrow_functions`` rule.
+
+@PHP80Migration:risky
+  Using the `@PHP80Migration:risky <./../../ruleSets/PHP80MigrationRisky.rst>`_ rule set will enable the ``use_arrow_functions`` rule.

+ 1 - 2
src/RuleSet/Sets/PHP80MigrationRiskySet.php

@@ -22,8 +22,7 @@ final class PHP80MigrationRiskySet extends AbstractRuleSetDescription
     public function getRules()
     {
         return [
-            '@PHP71Migration:risky' => true,
-            'implode_call' => true,
+            '@PHP74Migration:risky' => true,
             'no_alias_functions' => [
                 'sets' => [
                     '@all',

+ 1 - 2
src/RuleSet/Sets/PHP80MigrationSet.php

@@ -22,10 +22,9 @@ final class PHP80MigrationSet extends AbstractRuleSetDescription
     public function getRules()
     {
         return [
-            '@PHP73Migration' => true,
+            '@PHP74Migration' => true,
             'clean_namespace' => true,
             'no_unset_cast' => true,
-            'normalize_index_brace' => true,
         ];
     }