Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

Given that eZ Publish (5.x series) was created before PHP 7 came out, there are a few things to be aware of and consider when you want to run it on PHP 7.

Alternative: Running eZ Platform & eZ Platform Enterprise with Legacy Bridge

Did you know that you can also consider running eZ Publish legacy side by side with eZ Platform, and that this is supported now together with eZ Publish Enterprise as? If you prefer new features and simplified migration paths this can be a good alternative to 5.4 which is kept as stable as possible and does not receive new features anymore.

Deprecation warnings

eZ Platform, including platform parts bundled with eZ Publish Platform 5.x, was made for more recent versions of PHP and tested for it early on. eZ Publish legacy, on the other hand, was first created back in 2001 and has a long range of extensions built for it closely depending on how it was written. And as eZ Publish is considered mature software, backwards compatibility breaks are avoided as much as possible. This means that there are a few deprecation warnings to be expected when running eZ Publish (legacy) on PHP 7 which won't be fixed as they risk breaking extensions. This includes:

  • Class constructor names, example:

    "Methods with the same name as their class will not be constructors in a future version of PHP; eZContentObjectVersion has a deprecated constructor"

Importance of testing when upgrading to PHP7

PHP7 is a large change to the PHP language, and while it does provide a 2x improvement in performance, we can not stress enough the importance of testing your whole site/application when upgrading. You should essentially regard it as a re-launch.

Remember:

  1. We try our best to cover all possible cases, especially in eZ Platform, our newest version. However, our QA and automated testing does not cover all the possible use case or hardware and software combinations you might be using eZ Publish with.
  2. Extensions made by the community and shared on http://projects.ez.no/ or other places (github/composer, ...) might or might not have tested on PHP 7 yet.
  3. Your own code base, including all your extensions, will need to be adapted for PHP 7.

So as a Partner make sure to stay on top of this when switching to PHP7. Make sure to gradually phase it in for development, then staging/acceptance/qa environment, before upgrading production environment. And if in doubt, we are here to help!


  • No labels

3 Comments

  1. eZ Publish 5.4 is limited to PHP 7.0 right? Not 7.1?

  2. Requirements 5.4 : PHP scripting language: 5.4/5.5/5.6/7.x (minimum 5.4.4)

    However, it seems that version 2014.11 (which is the Community equivalent of 5.4) is not compatible with php7.0.

    Maybe the documentation should be updated ..

    http://share.ez.no/forums/ez-publish-5-platform/ez-publish-2014.11-and-php-7.1/(offset)/last

  3. Hi Rémy PHP,

    2014.11 is more or less the equivalent of v5.4.0, but it has not evolved after 2014, including no security fixes. Support for PHP7 was introduced in eZ Publish Enterprise v5.4.7 and afterwards.
    However the new eZ Publish legacy 2017.08 and higher releases which are both for community, and for eZ Platform Enterprise users using legacy bridge for migration scenarios, fully supports PHP7, and are available via composer.

    Releases: https://github.com/ezsystems/ezpublish-legacy/releases

    Blog post about it: http://share.ez.no/blogs/ez/ez-publish-legacy-2017.08-and-legacy-bridge-v1.3.0-is-here

    So if you look to upgrade to the equivalent of 5.4/2014.11 of eZ Platform + legacy on PHP 7.x, it's actually not that different for many previous eZ Publish upgrades. Follow the migration doc, and install legacy bridge, however skip parts about migrating xmltext and flow field types and instead continue to run using legacy data types. Besides getting full support for PHP7, you also get some newer features in both legacy and especially platform stack, including possibility to test out eZ Platform Admin a bit (it  just won't support your legacy field types).