wecodemore / wpstarter

Easily bootstrap whole site Composer packages for WordPress.
https://wecodemore.github.io/wpstarter/
MIT License
244 stars 34 forks source link

PHP version for ver 3 #51

Closed gmazzap closed 5 years ago

gmazzap commented 8 years ago

There's consensus among contributors here that we are going to raise min required version for PHP for version 3.

We still need to choose which version.

I will add comments to this issue an we can vote on the version, then make a decision.

Feel free to comment your vote...

gmazzap commented 8 years ago

PHP 5.5

gmazzap commented 8 years ago

PHP 5.6

gmazzap commented 8 years ago

PHP 7.0

schlessera commented 8 years ago

I vote 5.6, as it is the earliest version to still be maintained. 5.5 reached end-of-life on 21 July 2016 (https://secure.php.net/eol.php). Also, this will only concern newly-built sites, so why start with an outdated version anyway?

gmazzap commented 8 years ago

The problem is that working with clients sometimes the hosting choice is not something on developer hands. Because some clients have reasons to choice a specific host. And sadly, there are hosts out there that does not support 5.6 yet. This is why I voted for 5.5: I don't want to give up using WP Starter because the client decided to use an hosting that does not support more modern PHP version.

schlessera commented 8 years ago

Yes, that might happen. I wonder, though, how many hosting companies support a complete Composer WordPress workflow, but do not support up-to-date PHP versions...

GaryJones commented 8 years ago

Personally, I'd rather have PHP 7, but I can understand the pragmatic approach needed for older setups.

What actually would change between versions?

gmazzap commented 8 years ago

@GaryJones PHP versions or WP Starter versions?

GaryJones commented 8 years ago

PHP versions or WP Starter versions?

What would change in the WPStarter code base, if PHP 7 was chosen compared to PHP 5.6, as the min version to support? Are you eager to have scalar type declarations and return declarations? Or is there something else that would change?

tfrommen commented 8 years ago

Isn't the right question to be asked what particular benefits both you/us developers and the users have from the individual possible PHP versions? In my opinion, PHP 7 as the minimum required version shouldn't be part of the considerations at all (right now!).

So, what does 5.6 give us (or the users) that we don't have/get with 5.5 already?

GaryJones commented 8 years ago

So, what does 5.6 give us (or the users) that we don't have/get with 5.5 already

Promotion of only supporting security-supported version of PHP, for a start.

gmazzap commented 8 years ago

What would change in the WPStarter code base, if PHP 7 was chosen compared to PHP 5.6, as the min version to support? Are you eager to have scalar type declarations and return declarations? Or is there something else that would change?

@GaryJones Honestly working with PHP 7 is a pleasure for me. But I agree with @tfrommen that having it as minimum requirement for a project like this is not an option for me. There are still too much hosting providers that do not offer PHP 7, and there are many PHP extensions that are not ready for PHP 7, which makes it not an option in different cases.

For some context, see http://phpversions.info/shared-hosting/. Even if about half of the hosting service provides a PHP 7 version, among the ones that does not, there are very big hosting services. So if we could weight the two "sides" by number of users, I am quite sure that the "No PHP 7" side would be much more weighty.

Regarding my personal experience, in past months I "converted" to WP Starter & Composer many existing websites (even pretty big ones). None of them was on PHP 7, and I guess this situation will not change soon.

Also, looking https://seld.be/notes/php-versions-stats-2016-1-edition I see that today the 20% of PHP projects are on PHP 7, which makes this decision quite unpopular, even for CMS/framewors/projects much prone than WordPress to support new PHP versions.

In substance, PHP 7 as minimum version is a no go for me.

Regarding PHP 5.6 vs 5.5, looking again at http://phpversions.info, I see that 5.5+ is supported by pretty much all the hostings listed there (just a couple of minor exceptions) while 5.6+ support has still some "holes".

Promotion of only supporting security-supported version of PHP is a nice thing, but "promotion" works only if the "promoter" has enough exposition. The current popularity of this project IMO is not enough to promote anything.

I have to say that I like some 5.6 features, e.g. use function, use const, the possibility to store array in constants, and to use expressions in constants. I think that those features could find a place in WP Starter, but considering it is now written in PHP 5.3+, I guess it could survive with PHP 5.5 as minimum version; and considering what said above, I am still convinced of my vote in favor of 5.5.

dnaber-de commented 8 years ago

@schlessera

Yes, that might happen. I wonder, though, how many hosting companies support a complete Composer WordPress workflow, but do not support up-to-date PHP versions...

One of our clients hosting provider just provides Ubuntu 14.04 LTS hosts. And on these PHP 5.5 is the latest version in the official package sources. Updating to 16.04 LTS is not an option in this case because bureaucracy and »don't touch a running system«.

tfrommen commented 6 years ago

Should we do another poll? 😂

gmazzap commented 6 years ago

After 2 years what I said above is not true anymore :) I would definitively not go under 5.6 today. And very likely 7.0+

GaryJones commented 6 years ago

https://seld.be/notes/php-versions-stats-2018-1-edition shows that well over three-quarters use PHP 7.0+. I don't have many different hosts to deal with, but it's been a while since I've been forced to work on PHP 5.*.

gmazzap commented 6 years ago

I would like to go with 7.0+, even if current code for v3 is 5.5. If someone is forced to use PHP 5, the v2 of this project will be there...

Who is against 7.0 raise the hand please (pinging contributors):

@GaryJones @schlessera @franz-josef-kaiser @dnaber-de @thefuxia @kai-jacobsen

schlessera commented 6 years ago

Starting new projects with anything less than 7.0+ right now should be considered really bad practice and not encouraged.

dnaber-de commented 6 years ago

Sorry, I should check my notifications more often. However, I totally agree with you, Giuseppe.

franz-josef-kaiser commented 6 years ago

Uh. Same over here! ❤️ , 👍 … your choice. PHP 7.0 all the things!

gmazzap commented 5 years ago

@Chrico noticed your reaction to piple I pinged. I did not pinged you only because I pinged current contributors https://github.com/wecodemore/wpstarter/graphs/contributors

BTW, thanks everyone for the vote. There's a clear winner and if I keep this open I already regret to haven't voted for PHP 7.1 at least.