You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests: update to allow for running the tests on PHPCS 4.x
As of PHPCS 4.0, the base sniff test class has been renamed from `AbstractSniffUnitTest` to `AbstractSniffTestCase`.
Additionally the PHPCS test setup no longer uses the outdated custom test suite creation.
This means that to allow for the tests to run on both PHPCS 3.x as well as 4.x, some changes are needed.
This commit handles this by:
* Changing all test files to `extend` the new test case class and adding a class alias to the test bootstrap for compatibility with PHPCS 3.x.
* Adding separate scripts to the `composer.json` file for invoking the tests on PHPCS 3.x vs 4.x.
* Add jobs to test against PHPCS 4.x to all `test` matrices.
* Updating the `quicktest`, `test` and `coverage` jobs to use the correct Composer script based on the installed PHPCS version.
This commit also adds a step to all three jobs to remove the `PHPCSDevCS` dependency. This dependency is not needed in the tests and is currently not (yet) compatible with PHPCS 4.x, so it would block the `composer install`.
_Note: even though PHPCS 4.x supports PHPUnit 10 and 11, we cannot widen the version restrictions for PHPUnit (yet) while PHPCS 3.x is also supported as it would lead to PHPUnit 10/11 being installed for PHPCS 3.x on PHP >= 8.1, which would break the test runs._
0 commit comments