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

#[IgnoreDeprecations] is not being identified as a marker of deprecated scope #109

Open
mondrake opened this issue Jan 26, 2024 · 1 comment

Comments

@mondrake
Copy link

PHPUnit 10.5 introduced a new #[IgnoreDeprecations] attribute sebastianbergmann/phpunit#5532 to signal that a test is exercising deprecated code paths i.e. that calls to deprecated methods/functions are expected.

PHPStan however is reporting calls to deprecated functions in that test as errors.

Recently, a similar issue was reported for Symfony's PHPUnit-bridge definition of @group legacy annotated tests, #64

Issue found in Drupal's https://www.drupal.org/project/drupal/issues/3417066

@ondrejmirtes ondrejmirtes transferred this issue from phpstan/phpstan-phpunit Jan 26, 2024
@stof
Copy link

stof commented Feb 28, 2024

As this project provides a DeprecatedScopeResolver as an extension point, this is something that belongs to https://github.com/phpstan/phpstan-phpunit to implement such a resolver aware of the phpunit attribute

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

No branches or pull requests

2 participants