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

False positive on a prefixed function #582

Open
dingo-d opened this issue Feb 13, 2018 · 4 comments
Open

False positive on a prefixed function #582

dingo-d opened this issue Feb 13, 2018 · 4 comments
Labels
Milestone

Comments

@dingo-d
Copy link

dingo-d commented Feb 13, 2018

Theme sniffer plugin uses PHPCompatiblity to check if the theme is compatible with certain versions of php.

We got an issue where a custom made function that's called family_grows_entry_posted_on_setup() triggers error

Extension 'fam' is removed since PHP 5.1

The family part gives a false positive.

Can this be fixed?

Thanks.

@kick-the-bucket
Copy link

kick-the-bucket commented Feb 13, 2018 via email

@jrfnl
Copy link
Member

jrfnl commented Feb 13, 2018

Related #207, #509

I am aware that the Deprecated/Removed Extensions sniff is a bit overzealous at times.
I've done some work on this previously (unfinished) and will see if I can get back to that soon.

@Wirone
Copy link

Wirone commented Mar 1, 2023

Just FYI: we got similar false-positives for recode extension because we had private static method called recodeSomethingSomethingSomething (not actual name of course 😆).

PHPCompatibility.Extensions.RemovedExtensions should take into consideration if called function actually is a function or method. Since recode extension provided only 3 functions, there's no need to process methods.

@jrfnl
Copy link
Member

jrfnl commented Mar 1, 2023

@Wirone FYI: the sniff will be removed in PHPCompatibility 10.0.0, in favour of more detailed checks. See #180.

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

4 participants