Important notes

This section contains important notes about upgrading your existing eZ Publish 3.x installation to version 4.0. Read it carefully before you do the actual upgrade.

Upgrade path, requirements and preparation

eZ Publish 4.0 contains all the functionality of the 3.10 series. Before upgrading, check the requirements and set up the hosting environment for your site accordingly, so that you can quickly switch to PHP 5 after upgrading the distribution files.

It is not possible to upgrade directly from version 3.9 (and earlier) to 4.0, and the 4.0 distribution does not contain upgrade scripts for this. Instead, you should upgrade to 3.10.1 first, and then upgrade from 3.10.1 to 4.0.1.

Compatibility with extensions

Extensions compatible with eZ Publish 3.x may not work with 4.0. The following table shows which versions of the different extensions are supposed to work with eZ Publish 4.

Name

Compatibility with 4.0

Website Interface

v.1.3

Online Editor

v.4.3 (comes together with eZ Publish 4.0)

ODF Import / Export

v.2.1 (comes together with eZ Publish 4.0)

eZ PayPal Payment Gateway

v.1.1 (upcoming)

eZ Publish Extension for Oracle® Database

v.1.8

eZ Find

v.1.0

eZ Newsletter

v.1.6 (upcoming)

Paynet Direct

Not tested for compatibility yet.

Paynet Terminal

Not tested for compatibility yet.

Custom extensions developed for eZ Publish 3.x may stop working after upgrading to 4.0, especially those using constants of the eZ Publish kernel. These have been moved inside class definitions. The following examples show the difference based on the code taken from "kernel/classes/ezcontentobject.php":

3.10:

...
define( "EZ_CONTENT_OBJECT_STATUS_DRAFT", 0 );
define( "EZ_CONTENT_OBJECT_STATUS_PUBLISHED", 1 );
define( "EZ_CONTENT_OBJECT_STATUS_ARCHIVED", 2 );
...

 

4.0:

class eZContentObject extends eZPersistentObject
{
 const STATUS_DRAFT = 0;
 const STATUS_PUBLISHED = 1;
 const STATUS_ARCHIVED = 2;
...
}

 

The following line shows an example of using these constants in PHP code for eZ Publish 3.x.

$status = EZ_CONTENT_OBJECT_STATUS_DRAFT;


In 4.0, this constant does not exist anymore (it has been renamed and moved inside the class definition) and you will have to use the new class constant instead:

$status = eZContentObject::STATUS_DRAFT;


Refer to the PHP documentation for more information about class constants.

Notes for extension developers

When developing custom extensions for eZ Publish 4, keep in mind that it stores each class definition in a separate PHP source file and makes use of the __autoload() function instead of having a list of needed includes at the beginning of each source file. All class definitions of the eZ Publish kernel have their paths listed in the "autoload/ezp_kernel.php" file. The "autoload/ezp_extension.php" file contains an array of paths for class definitions that are a part of the extensions that come with eZ Publish. This array must be updated every time you add a new extension to the system. This can be done by running the "ezpgenerateautoloads.php" script located in the "bin/php" directory. The following example shows how to run the script.

  1. Navigate into the eZ Publish 4.0 directory.
  2. Run the script using the following shell command:
    php bin/php/ezpgenerateautoloads.php --extension
    

The script will look for class definitions in the "extension" directory and update the "autoload/ezp_extension.php" file accordingly. You can instruct the script to skip some of the extension subdirectories by using the optional "--exclude" parameter. To do this, run the script using the following shell command (replace "ext1" and "ext2" with the actual names of the extension subdirectories):

php bin/php/ezpgenerateautoloads.php --extension --exclude="extension/ext1 extension/ext2"

 

Note that it is also possible to update the "autoload/ezp_extension.php" file by clicking the "Regenerate autoload arrays for extensions" button located in the "Setup - Extensions" part of the administration interface. In this case, only class definitions that are a part of globally enabled/activated extensions will be listed in the updated file.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.