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

Debug PHP 8 Behat test issue #377

Closed
mukeshpanchal27 opened this issue Jan 8, 2024 · 3 comments · Fixed by #381
Closed

Debug PHP 8 Behat test issue #377

mukeshpanchal27 opened this issue Jan 8, 2024 · 3 comments · Fixed by #381
Assignees
Labels
[Type] Bug An existing feature is broken

Comments

@mukeshpanchal27
Copy link
Member

It seems that after the merge of commit eb3f847, the Behat test for PHP 8 is expected to fail.

Further discussion on this matter can be found here: #367 (comment).

@mukeshpanchal27 mukeshpanchal27 added the [Type] Bug An existing feature is broken label Jan 8, 2024
@ernilambar
Copy link
Member

When I try to run behat test in local (PHP 8.0). I get following PHP notices. But not sure this is the actual cause as in the end, test is passed successfully.

Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 230
PHP Deprecated:  Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 230

Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 230
PHP Deprecated:  Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 230

Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 230
.PHP Deprecated:  Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 142

Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 142
PHP Deprecated:  Method ReflectionParameter::getClass() is deprecated in /Users/nilambarsharma/Sites/audit/app/public/wp-content/plugins/plugin-check/vendor/behat/behat/src/Behat/Testwork/Argument/MixedArgumentOrganiser.php on line 142
Screenshot 2024-01-09 at 3 49 01 PM

@mukeshpanchal27
Copy link
Member Author

Thank you, @ernilambar. I encountered similar deprecated notices when running the tests locally, but strangely, the tests are passing. I'm currently working on replicating the issue to find a solution.

@swissspidy if you have any thoughts on this as it failed on every commit.

@swissspidy
Copy link
Member

The issue seems to be related to the code coverage collection, as that runs on the PHP 8.0 / WP latest job.

To reproduce locally:

# Update PHPUnit to get latest php-code-coverage library
composer require --dev --ignore-platform-reqs --update-with-all-dependencies phpunit/phpunit
# Run tests with code coverage and xdebug enabled
BEHAT_CODE_COVERAGE=true XDEBUG_MODE=coverage composer behat

Will do some debugging both locally and on CI, though GitHub Actions is down right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants