Closed Lalee10 closed 1 year ago
The old version of PHPUnit is also failing a PHP lint test (php -l
) when using PHP 7.3 or above, which is breaking our CI:
PHP Parse error: Invalid body indentation level (expecting an indentation level of at least 1) in ./wp-content/plugins/rollbar/vendor/sebastian/diff/tests/ParserTest.php on line 78
I'd suggest using Yoast's PHPUnit-Polyfills, it downloads the correct PHPUnit version depending on the version of PHP installed. It would also require you to move the composer require to be in require-dev so it can be excluded from your production releases.
The tests can be run now, though it is now done via package.json and wp-env in order to allow for different PHP versions and different WordPress versions.
Issue
Trying to run tests for a PR but they are failing due to old PHPUnit version.
OS Details
Full Output