Browse Source

feat: Handle deprecated rule sets similarly to deprecated fixers (#7288)

Greg Korba 1 year ago
parent
commit
4c57217458

+ 0 - 2
doc/ruleSets/PER-CS1.0.rst

@@ -2,8 +2,6 @@
 Rule set ``@PER-CS1.0``
 =======================
 
-**This ruleset is deprecated** in favour of ``@PER-CS2.0``.
-
 Rules that follow `PER Coding Style 1.0 <https://www.php-fig.org/per/coding-style/>`_.
 
 Rules

+ 8 - 2
doc/ruleSets/PER-CS1.0Risky.rst

@@ -2,9 +2,15 @@
 Rule set ``@PER-CS1.0:risky``
 =============================
 
-**This ruleset is deprecated** in favour of ``@PER-CS2.0:risky``.
+Rules that follow `PER Coding Style 1.0 <https://www.php-fig.org/per/coding-style/>`_.
 
-Rules that follow `PER Coding Style 1.0 <https://www.php-fig.org/per/coding-style/>`_. This set contains rules that are risky.
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

+ 9 - 1
doc/ruleSets/PER-CS2.0Risky.rst

@@ -2,7 +2,15 @@
 Rule set ``@PER-CS2.0:risky``
 =============================
 
-Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_. This set contains rules that are risky.
+Rules that follow `PER Coding Style 2.0 <https://www.php-fig.org/per/coding-style/>`_.
+
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

+ 9 - 1
doc/ruleSets/PER-CSRisky.rst

@@ -2,7 +2,15 @@
 Rule set ``@PER-CS:risky``
 ==========================
 
-Alias for the latest revision of PER-CS risky rules. Use it if you always want to be in sync with newest PER-CS standard. This set contains rules that are risky.
+Alias for the latest revision of PER-CS risky rules. Use it if you always want to be in sync with newest PER-CS standard.
+
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

+ 10 - 2
doc/ruleSets/PER.rst

@@ -2,9 +2,17 @@
 Rule set ``@PER``
 =================
 
-Alias for the PER-CS rules. It is recommended you use ``@PER-CS2.0`` instead.
+Alias for the newest PER-CS rules. It is recommended you use ``@PER-CS2.0`` instead if you want to stick with stable ruleset.
+
+Warning
+-------
+
+This rule set is deprecated and will be removed in the next major version
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You should use ``@PER-CS`` instead.
 
 Rules
 -----
 
-- `@PER-CS2.0 <./PER-CS2.0.rst>`_
+- `@PER-CS <./PER-CS.rst>`_

+ 15 - 2
doc/ruleSets/PERRisky.rst

@@ -2,9 +2,22 @@
 Rule set ``@PER:risky``
 =======================
 
-Alias for the PER-CS risky rules. It is recommended you use ``@PER-CS2.0:risky`` instead. This set contains rules that are risky.
+Alias for the newest PER-CS risky rules. It is recommended you use ``@PER-CS2.0:risky`` instead if you want to stick with stable ruleset.
+
+Warnings
+--------
+
+This rule set is deprecated and will be removed in the next major version
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You should use ``@PER-CS:risky`` instead.
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----
 
-- `@PER-CS2.0:risky <./PER-CS2.0Risky.rst>`_
+- `@PER-CS:risky <./PER-CSRisky.rst>`_

+ 9 - 1
doc/ruleSets/PHP56MigrationRisky.rst

@@ -2,7 +2,15 @@
 Rule set ``@PHP56Migration:risky``
 ==================================
 
-Rules to improve code for PHP 5.6 compatibility. This set contains rules that are risky.
+Rules to improve code for PHP 5.6 compatibility.
+
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

+ 9 - 1
doc/ruleSets/PHP70MigrationRisky.rst

@@ -2,7 +2,15 @@
 Rule set ``@PHP70Migration:risky``
 ==================================
 
-Rules to improve code for PHP 7.0 compatibility. This set contains rules that are risky.
+Rules to improve code for PHP 7.0 compatibility.
+
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

+ 9 - 1
doc/ruleSets/PHP71MigrationRisky.rst

@@ -2,7 +2,15 @@
 Rule set ``@PHP71Migration:risky``
 ==================================
 
-Rules to improve code for PHP 7.1 compatibility. This set contains rules that are risky.
+Rules to improve code for PHP 7.1 compatibility.
+
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

+ 9 - 1
doc/ruleSets/PHP74MigrationRisky.rst

@@ -2,7 +2,15 @@
 Rule set ``@PHP74Migration:risky``
 ==================================
 
-Rules to improve code for PHP 7.4 compatibility. This set contains rules that are risky.
+Rules to improve code for PHP 7.4 compatibility.
+
+Warning
+-------
+
+This set contains rules that are risky
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Using this rule set may lead to changes in your code's logic and behaviour. Use it with caution and review changes before incorporating them into your code base.
 
 Rules
 -----

Some files were not shown because too many files changed in this diff