============================ Rule ``php_unit_attributes`` ============================ PHPUnit attributes must be used over their respective PHPDoc-based annotations. Configuration ------------- ``keep_annotations`` ~~~~~~~~~~~~~~~~~~~~ Whether to keep annotations or not. This may be helpful for projects that support PHP before version 8 or PHPUnit before version 10. Allowed types: ``bool`` Default value: ``false`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New true]``. .. code-block:: diff --- Original +++ New `_ - Test class: `PhpCsFixer\\Tests\\Fixer\\PhpUnit\\PhpUnitAttributesFixerTest <./../../../tests/Fixer/PhpUnit/PhpUnitAttributesFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.