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

Upgrade PHP to 5.6.x or 7.0.x #834

Closed
jeremyfelt opened this Issue Feb 21, 2016 · 23 comments

Comments

Projects
None yet
@jeremyfelt
Member

jeremyfelt commented Feb 21, 2016

We're way behind right now with PHP 5.5.x. We should do better.

So what's the right answer? I lean toward PHP 7, but am definitely willing to hear reasons for sticking with PHP 5.6.

@jeremyfelt jeremyfelt added this to the Next Release milestone Feb 21, 2016

@cfoellmann

This comment has been minimized.

Member

cfoellmann commented Feb 22, 2016

I would love to have php 7 as the default.

@GaryJones

This comment has been minimized.

Contributor

GaryJones commented Feb 22, 2016

PHP 7, but with phpbrew (another ticket already open) for those who wish to change down per domain to match production setups. Even if someone isn't using any of the new features from PHP 7, there's no harm in having a faster localhost.

@itsazzad

This comment has been minimized.

itsazzad commented Feb 22, 2016

Better if would be selectable per project. Like project X with PHP5.6, Y with PHP7.

@slaFFik

This comment has been minimized.

slaFFik commented Feb 22, 2016

Agree with @itsazzad : selectable PHP version.

@madalinignisca

This comment has been minimized.

madalinignisca commented Feb 22, 2016

Agree with selectable. Only supported versions. Once 5.5 is off, it should not be present in VVV as well.
Who needs older versions could always just checkout a previous version of VVV that supported that particular version.

@jjeaton

This comment has been minimized.

Contributor

jjeaton commented Feb 22, 2016

Another vote for phpbrew. While I would love PHP7 as the default, it'll be a long time before the production environments for local sites are all up to PHP7.

@LoreleiAurora

This comment has been minimized.

Member

LoreleiAurora commented Feb 22, 2016

Another vote for PHP7 with phpbrew

@neilgee

This comment has been minimized.

neilgee commented Feb 22, 2016

Selectable version would be great

@rowatt

This comment has been minimized.

rowatt commented Feb 24, 2016

As much as I would love to have access to PHP7 in VVV, I think that sticking with PHP5.5 might be the right answer until there's a way to make it user selectable (ideally per project, but for the whole VVV install would be OK).

Why?

If I'm developing for a site which is PHP5.5 in production, then running PHP7 (or 5.6) in VVV isn't going to pick up any issues relating to my code (or plugins, libraries etc) using PHP5.6 or PHP7 features. While I am sure nobody here (except me :-O) ever pushes code directly from VVV on localhost to production, having things not work on a staging environment but work perfectly on VVV is still a pain to debug.

On the other hand, if a host is PHP5.6 or PHP7, it's far less likely to cause problems if I've developed and tested on PHP5.5. Not impossible but less likely I think.

The ideal is for VVV to match a production environment as closely as possible, but until that's possible with a choice of PHP version in VVV, I'd suggest that being conservative is the right way to go (alas).

@GaryJones

This comment has been minimized.

Contributor

GaryJones commented Feb 24, 2016

Let me offer a counter-argument to rowatt's case.

My client's site is currently on PHP 5.6. We want to move to PHP 7. Before I ask their sysops to bump the staging server PHP version (and later, the live server), I'd like to have my local VVV run PHP 7 so I can test for issues first. Despite my best efforts, I've not yet managed to convince Nginx to use the PHP 7 FPM.

The consensus here is for PHP version to be selectable, and phpbrew is a way for that - there's even a PR open for it already that just needs a bit of TLC.

The ticket title is asking between 5.6 and 7. PHP 5.5 is not actively supported, and only security supported for another 4 months. I see no valid reason not to jump straight to PHP 7, since more and more production sites will be PHP 7 as time goes on, and having VVV at the latest version allows local testing of that. As has been previously said - if one need to stay on 5.5 as that's what production is, then stick with the older release of VVV.

@jeremyfelt

This comment has been minimized.

Member

jeremyfelt commented Feb 24, 2016

I reframed the project goal a bit when shipping 1.3.0 for clarity. "server configuration common for high traffic WordPress sites" is now "modern server configuration". That should help guide decisions like this. IMO, we're already behind quite a bit by not switching to PHP 5.6 earlier. I think that helps push us toward PHP 7 as the right answer for "modern server".

@rowatt

This comment has been minimized.

rowatt commented Feb 25, 2016

Whether or not a PHP version is supported doesn't necessarily translate into whether or not it is in widespread use, but GaryJones's counter argument makes good sense.

I had missed the "modern server configuration" goal, which would certainly make sticking with PHP5.5 inappropriate. Alas very few of the servers I develop for are on PHP5.6 let alone PHP7.

Perhaps I could add a request... if VVV moves to PHP7 (or 5.6) before phpbrew or similar is in place, then it would be a great help to tag the last release including PHP5.5 and perhaps mention in the documentation which tag to checkout for those needing PHP5.5.

Irrespective of what you decide, thanks for listening and thanks for all the effort that's gone into this wonderful tool.

@andrewdcato

This comment has been minimized.

andrewdcato commented Feb 25, 2016

@GaryJones has already made the case that I came to make - another vote for VVV with phpbrew.

@spenserhale

This comment has been minimized.

spenserhale commented Feb 26, 2016

Were are making our production servers php7. I have already SSH into my vagrant and installed PHP7 and it worked fine, just lost my Xdebug (which can be added back). We would love VVV to either have PHP7 by default / an selectable option. More and more stacks are moving toward 7. https://roots.io/trellis/

@rclilly

This comment has been minimized.

rclilly commented Feb 26, 2016

I like the idea of using phpbrew, as long as it's contained completely within VVV, since it doesn't run on Windows; it has to be inside of the virtual machine. If we don't have selectable PHP versions I vote to go straight to 7.

@jeremyfelt

This comment has been minimized.

Member

jeremyfelt commented Feb 27, 2016

The support for PHP 7 both here and in the informal Twitter poll is pretty high. I think that's the right way forward.

We should get PHPBrew working at or near the same time, that will be a nice addition. For those that aren't aware, we have a Phpbrew feature branch setup that needs to be updated against the current develop branch and tested.

@GaryJones

This comment has been minimized.

Contributor

GaryJones commented Mar 4, 2016

Xdebug 2.4.0 was released yesterday, and this adds support for PHP 7.

@GaryJones

This comment has been minimized.

Contributor

GaryJones commented Mar 4, 2016

Also, Imagick 3.4.0 has been released today, which also adds support for PHP 7.

@cfoellmann

This comment has been minimized.

Member

cfoellmann commented Mar 4, 2016

maybe we can start by going for xdebug 2.4.0 and Imagick 3.4.0 to make "anything possible"

@LoreleiAurora LoreleiAurora referenced this issue Mar 8, 2016

Merged

PHP7.0 #844

@jmichaelward

This comment has been minimized.

jmichaelward commented Mar 10, 2016

I just did a Google search for "Varying Vagrant Vagrants 5.6" and am glad to see some discussion about the possibility for making PHP7 the base version. That said, I agree with others that it would be wonderful to be able to boot up any of the supported versions, and wanted to add my voice to those who are asking for that.

@ihorvorotnov

This comment has been minimized.

ihorvorotnov commented Mar 30, 2016

One more vote for PHP 7 as a base version + possibility to switch to older version if needed would be nice.

@ntwb

This comment has been minimized.

Contributor

ntwb commented Mar 31, 2016

Just read this:

"PHP 7.0 is now the default PHP package shipping in Ubuntu LTS 16.04 (Xenial Xerus) starting from April 2016!"

p.s. I'm all for PHP 7 and phpbrew for 5.x version support

@jeremyfelt

This comment has been minimized.

Member

jeremyfelt commented Apr 11, 2016

Time to celebrate. 🎉

#844 is merged and provides PHP7, #869 is merged and provides Xdebug for that PHP7. Please test and open any bug tickets as necessary. 🐛

Big thanks to @LoreleiAurora for the super clean pull request.

I'll start paying more attention to the PHPbrew PR #854 soon.

@jeremyfelt jeremyfelt closed this Apr 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment