tplaner / When

PHP Date Recursion library

Home Page:https://github.com/tplaner/When

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Safe to use with PHP 5.2?

stevengliebe opened this issue · comments

Is When safe to use with PHP 5.2.4? This is the minimum version for WordPress and since I'm looking at using this in a WordPress plugin, there will likely be users on old versions of PHP.

I ask because I see on master it says PHP 5.2+ but looking into When.php on master (and old releases) I see at the top, "Requirements: PHP 5.3+ - makes extensive use of the Date and Time library"

Thank you.

The develop branch won't work in 5.2 as it uses a lot of DateTime functions which were not added until 5.3.

Since 5.2 hit end of life almost 4 years ago I have no intentions of supporting it. Moving forward I will probably not intentionally support PHP 5.3 either as it too has hit end of life.

This shouldn't stop you from making a WordPress plugin which utilizes When though. Just utilize PHP's version_compare function. If someone has a version which is below 5.3.0 don't allow them to use the plugin and display a message asking them to upgrade.

After all of the recent security threats (heartbleed, sshv3, recent critical MySQL issues), no one should be running extremely old or end of life builds of anything, so you're doing them a favor by warning them.

Thank you for the information and tips.