id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc 3551,Plugin Directory: Requires PHP: Standardise on values,dd32,dd32,"Following on from #2952 a lot of plugins have started implementing the `Requires PHP` header. Unfortunately, a lot of them are not following any form of computer-readable standard. For example, a quick selection: {{{ PHP 4 Yes 5.3+ 4.6 or greater 5.6 or later 4 & 5 5+ 5.6 or 7.0 4 5.6 or higher >= 5.4 5.4 and higher 4,5 5.4+ (PHP 5.6 + libsodium extension) or (PHP 7.2 or above) }}} (Yes, some plugins have specified they're PHP 4 compatible, I doubt they are) A quick look suggests that 2,715 plugins have specified a sane identifier (x.y, or x.y.z) with a further 156 plugins specifying it in ways such as the above list which make it harder to pragmatically use. I'd recommend that we validate the number in some form in the readme parser to make the data more useful long term. I'd suggest - Require the version number be specified as `x.y` or `x.y.z` - If Other data is in there, pull out the first version-like string, ie. `5.3` from `5.3+`, `5.3 or greater`, or `5.3-7.1`. Based on existing data, it looks like that should be fine. - Add a warning to the readme validator when unexpected values are encountered and note if it's truncated/sanitised to something reasonable. ",defect (bug),closed,normal,,Plugin Directory,fixed,needs-patch,