Skip to content

Commit

Permalink
feat: Handle deprecated rule sets similarly to deprecated fixers (#7288)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wirone committed Dec 15, 2023
1 parent 7de792f commit 4c57217
Show file tree
Hide file tree
Showing 44 changed files with 466 additions and 66 deletions.
2 changes: 0 additions & 2 deletions doc/ruleSets/PER-CS1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions doc/ruleSets/PER-CS1.0Risky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PER-CS2.0Risky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PER-CSRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
12 changes: 10 additions & 2 deletions doc/ruleSets/PER.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>`_
17 changes: 15 additions & 2 deletions doc/ruleSets/PERRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>`_
10 changes: 9 additions & 1 deletion doc/ruleSets/PHP56MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHP70MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHP71MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHP74MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHP80MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHP80Migration:risky``
==================================

Rules to improve code for PHP 8.0 compatibility. This set contains rules that are risky.
Rules to improve code for PHP 8.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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit100MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit100Migration:risky``
=======================================

Rules to improve tests code for PHPUnit 10.0 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 10.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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit30MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit30Migration:risky``
======================================

Rules to improve tests code for PHPUnit 3.0 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 3.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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit32MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit32Migration:risky``
======================================

Rules to improve tests code for PHPUnit 3.2 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 3.2 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit35MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit35Migration:risky``
======================================

Rules to improve tests code for PHPUnit 3.5 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 3.5 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit43MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit43Migration:risky``
======================================

Rules to improve tests code for PHPUnit 4.3 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 4.3 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit48MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit48Migration:risky``
======================================

Rules to improve tests code for PHPUnit 4.8 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 4.8 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit50MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit50Migration:risky``
======================================

Rules to improve tests code for PHPUnit 5.0 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 5.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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit52MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit52Migration:risky``
======================================

Rules to improve tests code for PHPUnit 5.2 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 5.2 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit54MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit54Migration:risky``
======================================

Rules to improve tests code for PHPUnit 5.4 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 5.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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit55MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit55Migration:risky``
======================================

Rules to improve tests code for PHPUnit 5.5 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 5.5 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit56MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit56Migration:risky``
======================================

Rules to improve tests code for PHPUnit 5.6 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 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
-----
Expand Down
10 changes: 9 additions & 1 deletion doc/ruleSets/PHPUnit57MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
Rule set ``@PHPUnit57Migration:risky``
======================================

Rules to improve tests code for PHPUnit 5.7 compatibility. This set contains rules that are risky.
Rules to improve tests code for PHPUnit 5.7 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
-----
Expand Down
Loading

0 comments on commit 4c57217

Please sign in to comment.