Skip to content

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