inpsyde / modularity

A PSR-11 implementation for WordPress Plugins, Themes or Libraries.
https://inpsyde.github.io/modularity/
GNU General Public License v2.0
44 stars 4 forks source link

[Bug]: Tests fail on PHP 8.2 #30

Closed esurov closed 9 months ago

esurov commented 1 year ago

Description of the bug

Running tests with PHP 8.2 I'm getting an error: Error: This version of PHPUnit does not support code coverage on PHP 8

Also some tests fail out of the box:

1) Inpsyde\Modularity\Tests\Unit\Properties\PluginPropertiesTest::testIsMuPlugin with data set "is not mu-plugin" ('/wp-content/plugins/the-plugin/', '/wp-content/mu-plugins/', false)

2) Inpsyde\Modularity\Tests\Unit\Properties\PluginPropertiesTest::testIsMuPlugin with data set "is mu-plugin" ('/wp-content/mu-plugins/the-plugin/', '/wp-content/mu-plugins/', true)

Reproduction instructions

  1. git clone https://github.com/inpsyde/modularity.git
  2. cd modularity
  3. composer install
  4. vendor/phpunit/phpunit/phpunit

Expected behavior

All unit tests pass

Environment info

Relevant log output

No response

Additional context

No response

Code of Conduct

esurov commented 1 year ago

Failed tests problem was fixed by changing permissions to /tmp/xdebug.log file with chmod a+w /tmp/xdebug.log but the coverage problem persists:

Error: This version of PHPUnit does not support code coverage on PHP 8
esurov commented 1 year ago

This issue could be fixed by merging my PR: https://github.com/inpsyde/modularity/pull/31

Chrico commented 9 months ago

31 was merged. I'm going to close this issue now. 💪🏻