Currently my theme is being reviewed and I developed it using PHP version 5.6+ but the theme reviewer is telling me to also support PHP version 5.2 . I just can’t wrap around the idea of having to support really really old obsolete PHP version. Is it absolute necessary to support 5.2 ?
WordPress minimum requirements is 5.2.4 - so anything they promote on wordpress.org has to follow their requirements. https://codex.wordpress.org/Template:Server_requirements
Are you in the wordpress.org slack team? If so, I’d ask in the #themereview channel.
I don’t think they have anything about it in the Theme requirements, but they have a draft review process that says:
Themes are required to support PHP7. This means there must be no PHP errors or notices when running on PHP7.
Themes are allowed to use newer PHP features that are not included in PHP 5.2 or PHP 5.5, but there must not be any PHP errors when the theme is installed on a site using a lower than supported PHP version, e.g. PHP 5.x.
The Theme Sniffer plugin allows you to select a minimum PHP version, and will print an error if a theme uses features not available in that version. In those cases, you should test the theme on both PHP versions.
Theme authors can choose whether or not to allow the theme to be activated on sites using a lower PHP version.
So according to that, you could decide to stick to PHP 5.6+ and prevent the theme from activating on sites with lower than that.
Interestingly on the plugin side of things, they’ve actually added a minimum PHP attibrute to the plugin directory, as it’s pretty common for plugins not to support older versions of PHP.
FWIW, on ThemeForest, we say:
We do not specify a minimum version of PHP to support, but we do encourage you to make your decision with the stats in mind and to make it clear to customers which version is required, so as to avoid customer dissatisfaction.
If you make it 5.6+ then about 40% of WP installation won’t be able to run your theme. Something to keep in mind.
I hope they change it soon
“Theme Sniffer plugin allows you to select a minimum PHP version,” This helped me to debug the errors on 5.2