You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using https://github.com/symfony/polyfill-php80 in a project we like to check with PHPCompatibility. PHPCompatibility.Functions.NewFunctions....Found sniffs are raising errors because they do not check if a global function is set by polyfill.
Describe the solution you'd like
I'd like the sniff to only raise errors if the PHP internal function is called.
I'm not sure how to achieve this with PHPCS. As an interim solution, the sniff could check for the existence of symfony/polyfill-php80. For the sniff, would it be appropriate to check if symfony/polyfill-php80 is being used and in that case ignore the polyfilled functions?
If you deem this in scope i would try to provide a pull request to add this behavior
I intend to create a pull request to implement this feature.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
We are using https://github.com/symfony/polyfill-php80 in a project we like to check with PHPCompatibility. PHPCompatibility.Functions.NewFunctions....Found sniffs are raising errors because they do not check if a global function is set by polyfill.
Describe the solution you'd like
I'd like the sniff to only raise errors if the PHP internal function is called.
I'm not sure how to achieve this with PHPCS. As an interim solution, the sniff could check for the existence of symfony/polyfill-php80. For the sniff, would it be appropriate to check if symfony/polyfill-php80 is being used and in that case ignore the polyfilled functions?
If you deem this in scope i would try to provide a pull request to add this behavior
The text was updated successfully, but these errors were encountered: