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

replace after annotation with attribute #30

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

brettmc
Copy link
Contributor

@brettmc brettmc commented May 2, 2024

PHPUnit 11 emits a deprecation warning when using annotations (@after), and they will not work in PHPUnit 12.
However, having both an annotation plus an attribute seems fine. It should be backwards-compatible since annotations are comments in earlier php versions.

brettmc added 3 commits May 2, 2024 17:05
PHPUnit 11 emits a deprecation warning when using annotations (@after), and they will not
work in PHPUnit 12.
Changing this means that the "after" functionality will not work in phpunit versions < 10,
but it also should not cause an error. Users directly calling "restoreEnvironmentVariables()"
would be fine, I think. See sebastianbergmann/phpunit#4502
phpunit 11 seems happy with both an annotation + attribute, and doesn't emit
a deprecation warning for me. This should be backwards and forwards compatible
@brettmc brettmc force-pushed the phpunit-attributes branch from 903a154 to 670a96b Compare May 2, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant