Skip to content

Ignore code by dependency version #10593

Answered by ondrejmirtes
markhuot asked this question in Support
Discussion options

You must be logged in to vote

It's a good thing you run PHPStan twice because then you can conditionally ignore different things.

PHPStan itself does it for different PHPS versions: https://github.com/phpstan/phpstan-src/blob/1.11.x/build/ignore-by-php-version.neon.php

So you can ask Composer through InstalledVersions about the version of the package and include different neon files with different ignores that way.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@markhuot
Comment options

Answer selected by markhuot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants