Jump to content

Upgrade to PHP7.4 or 8?


bernhard
 Share

Recommended Posts

Hi everybody,

This is the php support matrix as of today: https://www.php.net/supported-versions.php

j0CVMlR.png

@adrian has posted some findings regarding PHP8 here:

I know someone who is running a ProcessWire installation on a server on PHP7.1 ?? Now I'm asking for this person: What would you recommend to do? Upgrade to PHP7.4 or PHP8 ? I'm a little afraid that PHP8 will bring in some issues and it might be a little too early to jump on that train now. Maybe the transition would be a lot smoother when upgrading to 7.4 now and jumping on 8 around mid-2022 (in 1,5 years).

What do you think? Does anybody already have findings to share?

  • Like 2
Link to comment
Share on other sites

For a production site, I wouldn't use PHP 8 yet. It hasn't been enough time to find issues with ProcessWire, as well as for module authors to fix new issues.

Is your site up-to-date? Current PW master version, all modules up-to-date and no abandoned modules in use? In this case, PHP 7.4 is very stable, works well with current ProcessWire versions and will be supported for another two years. We've been using it for a while now, so I can say that at least the core and our commonly used modules (ProFields, FormBuilder, ListerPro, LoginRegisterPro, ProCache, Tracy Debugger and all of my modules ?) work well with PHP 7.4. Through I would be vary if your site uses some abandoned or older modules, especially 7.2 and 7.4 introduced some backwards incompatible syntax changes that often cause issues with older code ...

On a development site, go ahead and try PHP 8, and report any problems so they can be fixed. At work I'll install PHP 8 on our development server as soon as it's available in Plesk, and give our ProcessWire base installation a try ? Looking forward to union types and match expressions in particular ...

  • Like 7
Link to comment
Share on other sites

I upgraded to PHP 7.4 for several projects. The only errors that occured were "array and string offset access syntax with curly braces is deprecated" and I changed it in the according 3rd party (or self-written) modules.

Personally I would wait until ProcessWire and modules are known to be compatible with PHP 8. Same as Moritz said. Take little steps instead of one large one. 

  • Like 5
Link to comment
Share on other sites

I am using 7.4 on all live sites and 8 on my local dev setup so I can get my modules updated and help to report any PW core issues so Ryan can get these taken care of ASAP - I know he is typically slow to upgrade so needs us to report. I'll probably start using 8 in production in a couple / few months.

  • Like 5
Link to comment
Share on other sites

Currently I am developing a new very small and simple ProcessWire Website with PHP 8 (and I try also enabled JIT) - planned go live Jan/Feb 2021.

But for some older bigger Project with many modules and code which is on 7.4 I'll wait some month to upgrade since I had some troubles with php-redis and imagemagick with php8, which I use in this project

  • Like 4
Link to comment
Share on other sites

PHP 7.4 here as well. So far I can't remember having any major issues going from 7.1 to 7.2 and then 7.4. Most sites I run are relatively up to date, though, and generally speaking I don't use that many third party modules either. To be honest if there's any reason to worry I'd recommend 7.4, or perhaps even 7.3 (it's still supported for a while and would give some extra time to prepare for a bigger jump.)

Probably going to set up a new server on weekend and move some sites there. Might as well go with PHP 8 and see how that goes ?

giphy.gif

  • Like 6
Link to comment
Share on other sites

1 minute ago, teppo said:

Probably going to set up a new server on weekend and move some sites there. Might as well go with PHP 8 and see how that goes

I'm not quite ready to move any existing sites to 8, but I will be developing all new sites on 8. I haven't seen any PW core showstoppers yet and I am happy modifying any 3rd party modules if the need arises (along with a PR of the fix).

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...

I'm not Adrian (obviously), but from my side things seem to be running smoothly now. Been running a bunch of my own sites on PHP 8 for a month or so.

As long as you're using the latest dev version, that is — I ran into some bugs in current master that I'd consider showstoppers, though can't remember exact issues. I think one was somehow related to image sizer, at least ?

New minor issues still seem to pop up, such as this one from a few days ago: https://github.com/processwire/processwire-issues/issues/1363.

Link to comment
Share on other sites

@benbyf We ran into an issue with image resizing not working correctly on PHP 8, in particular when using focus points: https://github.com/processwire/processwire-issues/issues/1351

I'd consider this a showstopper since image resizing is absolutely necessary for responsive images, and when we tested a site on PHP 8, focus points either didn't work at all or result in fatal exceptions altogether.

  • Sad 1
Link to comment
Share on other sites

@benbyf - I am not running any sites on it yet and I actually don't think I will until I know that Ryan has 8 installed on his dev machine. He still seems to be in "new feature mode" rather than "bug fix mode" at the moment so I can see some of these PHP 8 bugs lingering for a while. I am still running 8 on my local dev machine but these days this is mostly for module development and not much else, so I am not coming across these other bugs yet.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

I think PHP 7.4 is fine for now.
I tested PHP 8 and PHPMyAdmin have issues running there.
So I think is better to stick with the 7.x version until PHP8 is well tested.
Maybe that would be a major version of ProcessWire since @Sephiroth pointed out module compatibility issues.

 

  • Like 1
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...