WPTT / theme-sniffer

Theme Sniffer plugin using sniffs.
MIT License
270 stars 3 forks source link

Minimum PHP version option not working #102

Closed surimohnot closed 5 years ago

surimohnot commented 5 years ago

To re-produce this error, check latest version of my theme at https://themes.trac.wordpress.org/ticket/63695. Set minimum php version to 5.4 and run the plugin sniffer. It will still show all errors related to keywords or syntax available in PHP 5.4.

dingo-d commented 5 years ago

I will try to test this using the plugin, but I didn't get any errors when manually running the PHPCompatibility sniff. Thanks for reporting this :)

joyously commented 5 years ago

Doesn't minimum PHP version mean that that is the version that is checked for? The description sounds correct. What are you saying the problem is?

surimohnot commented 5 years ago

Description is correct. The problem is, if I have selected Minimum PHP version as 5.4 and run the sniffer, It should not show an error saying "Short array syntax (open) is available since 5.4".

ernilambar commented 5 years ago

I can confirm this bug. Plugin is not respecting the PHP version dropdown.

dingo-d commented 5 years ago

I'll test this with some more themes and see what's causing this. Must be some config issue

dingo-d commented 5 years ago

I've updated the zip file, can you check for the issue now?

https://github.com/WPTRT/theme-sniffer/releases/download/1.0.0-RC1/theme-sniffer.zip

dingo-d commented 5 years ago

This has been fixed and is in the current zip so I'll close the issue.