-
Notifications
You must be signed in to change notification settings - Fork 39
Minimum PHP version #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dshanske Just out of curiosity: Where did you get that 30% number from? Would be interesting to have these insights! (My personal opinion regarding your suggestion: Even PHP 5.5 has almost reached end of life status. I wouldn't bother supporting 5.3 anymore ...) |
PHP 5.3 was declared unsupported in August 2014. Version 5.4 is now also unsupported, but that is more recent. http://php.net/eol.php In another thread, we decided to drop support for 5.3 because of how old it is: #35 |
Here's a table showing the supported and EOL versions of PHP from http://php.net/supported-versions.php |
Either way, this is about using short array syntax. I know about the parse_url issue and have a workaround for it. |
WordPress, by the way, estimates 20% of its installs are on 5.3 |
Maybe I should just scope it to short array syntax. Also, anyone know a good program to check PHP for version compatibility? |
As of v0.3.0, php-mf2 requires PHP 5.4, which (as Aaron pointed out) is also already at EOL. All previous versions of php-mf2 work with PHP 5.3 and are still available for people who desperately need to use ancient versions of PHP for whatever reason. Further development will continue to support PHP 5.4. |
Here's the stats from Wordpress: https://wordpress.org/about/stats/ That's unfortunately a pretty large percentage on 5.3 and 5.2. I am reluctant to add back support for 5.3, since I really don't want to encourage/support people using a version of PHP that's that old. However, if the only change needed to support 5.3 is to use the expanded array syntax, I would be open to a PR with that. Thoughts, @barnabywalters? |
My request is to support compatibility when possible with earlier versions. Like in this example. I found something for PHP Sniffer that would identify things like this do we can see what the scope is. |
Looking through Parser.php, I think there's only one location using short array syntax. I think making it the longer syntax is fine for backcompat, but I think composer.json should still require 5.4+. |
That sounds like a reasonable compromise. I assume the file is copypasta into Wordpress rather than loaded by Composer? |
At the moment,yes. |
I did a check. If I manually change that line to use the old syntax, it will work again under 5.3. So, should we prepare the PR? |
Yeah, if it's really just that one line then that's simple enough. Thanks for checking it out! |
https://github.com/wimg/PHPCompatibility - I've added this, which can check compatibility at various versions to try and check for compatibility before deploying anything in the future. |
I don't think we should put too much weight on those stats. Have anyone actually complained about lack of PHP 5.3 support? My guess is that those 5.3 blogs are not very actively maintained and thus fairly unlikely to install a new plugin like the IndieWeb ones and if they are actively enough maintained to actually install new plugins then they should primarily ensure they move to a more modern PHP version, not install additional plugins. I would rather considering dropping 5.4 support to ensure newer features can be used + lessen the risk for unintentional compatibility breaking changes which are becoming increasingly likely as PHP-devs move further and further away from such old versions and adopt practices that doesn't work with such old versions. |
Discovered today that php-mf2 has code that requires a minimum version of PHP 5.4. Suggesting we keep to a minimum of 5.3 due the 30% still using it. Going to 5.2 would be impossible due namespaces.
The text was updated successfully, but these errors were encountered: