Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support PHPUnit v9.1 naming for some asserts #7997

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion doc/ruleSets/PHPUnit100MigrationRisky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Using this rule set may lead to changes in your code's logic and behaviour. Use
Rules
-----

- `@PHPUnit84Migration:risky <./PHPUnit84MigrationRisky.rst>`_
- `@PHPUnit91Migration:risky <./PHPUnit91MigrationRisky.rst>`_
- `php_unit_data_provider_static <./../rules/php_unit/php_unit_data_provider_static.rst>`_ with config:

``['force' => true]``
Expand Down
22 changes: 22 additions & 0 deletions doc/ruleSets/PHPUnit91MigrationRisky.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
======================================
Rule set ``@PHPUnit91Migration:risky``
======================================

Rules to improve tests code for PHPUnit 9.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
-----

- `@PHPUnit84Migration:risky <./PHPUnit84MigrationRisky.rst>`_
- `php_unit_dedicate_assert <./../rules/php_unit/php_unit_dedicate_assert.rst>`_ with config:

``['target' => '9.1']``

1 change: 1 addition & 0 deletions doc/ruleSets/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ List of Available Rule sets
- `@PHPUnit60Migration:risky <./PHPUnit60MigrationRisky.rst>`_
- `@PHPUnit75Migration:risky <./PHPUnit75MigrationRisky.rst>`_
- `@PHPUnit84Migration:risky <./PHPUnit84MigrationRisky.rst>`_
- `@PHPUnit91Migration:risky <./PHPUnit91MigrationRisky.rst>`_
- `@PHPUnit100Migration:risky <./PHPUnit100MigrationRisky.rst>`_
- `@PSR1 <./PSR1.rst>`_
- `@PSR2 <./PSR2.rst>`_
Expand Down
8 changes: 6 additions & 2 deletions doc/rules/php_unit/php_unit_dedicate_assert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Configuration

Target version of PHPUnit.

Allowed values: ``'3.0'``, ``'3.5'``, ``'5.0'``, ``'5.6'`` and ``'newest'``
Allowed values: ``'3.0'``, ``'3.5'``, ``'5.0'``, ``'5.6'``, ``'9.1'`` and ``'newest'``

Default value: ``'newest'``

Expand Down Expand Up @@ -133,9 +133,13 @@ The rule is part of the following rule sets:

``['target' => '5.6']``

- `@PHPUnit91Migration:risky <./../../ruleSets/PHPUnit91MigrationRisky.rst>`_ with config:

``['target' => '9.1']``

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['target' => '5.6']``
``['target' => '9.1']``


References
Expand Down
4 changes: 4 additions & 0 deletions doc/rules/php_unit/php_unit_dedicate_assert_internal_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ The rule is part of the following rule sets:

``['target' => '7.5']``

- `@PHPUnit91Migration:risky <./../../ruleSets/PHPUnit91MigrationRisky.rst>`_ with config:

``['target' => '7.5']``

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['target' => '7.5']``
Expand Down
4 changes: 4 additions & 0 deletions doc/rules/php_unit/php_unit_expectation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ The rule is part of the following rule sets:

``['target' => '8.4']``

- `@PHPUnit91Migration:risky <./../../ruleSets/PHPUnit91MigrationRisky.rst>`_ with config:

``['target' => '8.4']``

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['target' => '8.4']``
Expand Down
4 changes: 4 additions & 0 deletions doc/rules/php_unit/php_unit_mock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ The rule is part of the following rule sets:

``['target' => '5.5']``

- `@PHPUnit91Migration:risky <./../../ruleSets/PHPUnit91MigrationRisky.rst>`_ with config:

``['target' => '5.5']``

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['target' => '5.5']``
Expand Down
4 changes: 4 additions & 0 deletions doc/rules/php_unit/php_unit_namespaced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ The rule is part of the following rule sets:

``['target' => '6.0']``

- `@PHPUnit91Migration:risky <./../../ruleSets/PHPUnit91MigrationRisky.rst>`_ with config:

``['target' => '6.0']``

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['target' => '6.0']``
Expand Down
4 changes: 4 additions & 0 deletions doc/rules/php_unit/php_unit_no_expectation_annotation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ The rule is part of the following rule sets:

``['target' => '4.3']``

- `@PHPUnit91Migration:risky <./../../ruleSets/PHPUnit91MigrationRisky.rst>`_ with config:

``['target' => '4.3']``

- `@PHPUnit100Migration:risky <./../../ruleSets/PHPUnit100MigrationRisky.rst>`_ with config:

``['target' => '4.3']``
Expand Down