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

PHPCompatibility.Functions.NewFunctions and symfony/polyfill-php80 #1711

Closed
1 task done
rdss-sknott opened this issue May 14, 2024 · 1 comment
Closed
1 task done
Labels

Comments

@rdss-sknott
Copy link
Contributor

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

  • I intend to create a pull request to implement this feature.
@jrfnl jrfnl added the question label May 14, 2024
@jrfnl
Copy link
Member

jrfnl commented May 14, 2024

@rdss-sknott This is a solved problem, have a look at: https://github.com/PHPCompatibility/PHPCompatibilitySymfony

@jrfnl jrfnl closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants