WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
207 stars 38 forks source link

Detect WPTRT feature project versions #224

Open justintadlock opened 5 years ago

justintadlock commented 5 years ago

Now that we have a couple of official feature packages, we should start thinking about long-term maintenance for theme authors. If theme authors are using our packages, we want to make sure they're using the most up-to-date versions.

Having a sniff that detects this would be great. I'm not sure what all this would entail at this point, but I did want to bring it up for discussion.

It's not a high priority right now, but if we continue making other packages, I could see the need for this.

Current repos:

dingo-d commented 5 years ago

What would a sniff detect exactly? The version of the additions or?

Not sure I understand what should be sniffed 🙂

justintadlock commented 5 years ago

Yes, their versions.

dingo-d commented 5 years ago

Hmm not 100% sure how to do that using PHPCS tho. It sniffs PHP files (JS and CSS if you tell it to), and besides the @since tags in the PHP files there is no dedicated way to check for that.

Theme Sniffer, on the other hand, can do that by just parsing the composer.json file or other files 🙂