Message-ID: <1122571318.2750.1485850680825.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2749_550788461.1485850680825" ------=_Part_2749_550788461.1485850680825 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Updating eZ Platform

Updating eZ Platform

=20
=20
=20
=20

This page explains how to update eZ Platform to a new version.

In the instructions below, replace <version> with the= version of eZ Platform you are updating to (for example: v1.7.0). If you are testing a release candidate, use the latest rc tag (for example: v1.7.1-rc1).

Version-specific steps<= /h1>

Some versions introduce new features that require taking special= steps; they are marked on this page with yellow tags.

If you intend to skip a version (for example, update directly from v1.3 = to v1.5 without getting v1.4), remember to look at all the intermediate ste= ps as well =E2=80=93 this means you need to perform both the steps for v1.4= and v1.5.

Update procedure

1. Check out a version

1.1. From the project's root, create a new branch from = the project's master, or from the branch you're updating on:

From your master branch
=20
git checkout -b <branch_name>
=20

This creates a new project branch for the update based on your current p= roject branch, typically master. An example <branch_n= ame> would be update-1.4.

1.2. If it's not there, add ezsystems/ezplatform<= /code> (or ezsystems/ezstudio, when updating an Enterpris= e installation) as an upstream remote:

From your new update branch
=20
git remote add ezplatform http://github.com/ezsystems/ezplatform.g=
it
or
git remote add ezstudio http://github.com/ezsystems/ezstudio.git
=20

1.3. Then pull the tag into your branch.

If you are unsure which version to pull, run git ls-remote --tags<= /code> to list all possible tags.

From your new update branch
=20
git pull ezplatform <version>
or
git pull ezstudio <version>
=20

At this stage you may get conflicts, which are a normal part of the proc= edure and no reason to worry. The most common ones will be on compose= r.json and composer.lock.

The latter can be ignored, as it will be regenerated when we execute composer update later. The easiest is to checkout the version fro= m the tag and add it to the changes:

If you get a lot of conflicts (on the doc folder for instance), and eZ Platform was installed from the share.e= z.no tarball, it might be because of incomplete history. You will have = to run git fetch ezplatform --unshallow (or git fet= ch ezstudio --unshallow) to load the full history, and run the merge= again.

From your new update branch
=20
git checkout --theirs composer.lock && git add composer.lo=
ck
=20

If you do not keep a copy in the branch, you may also run:

From your new update branch
=20
git rm composer.lock
=20

2. Merge composer.json

Manual merging

Conflicts in composer.json need to be fixed manually. = If you're not familiar with the diff output, you may checkout the tag's ver= sion and inspect the changes. It should be readable for most:

From your new update branch
=20
git checkout --theirs composer.json && git diff HEAD compo=
ser.json
=20

You should see what was changed, as compared to your own version, in the= diff output. The update changes the requirements for all of the ezsystems/ packages. Those changes should be left untouched. All of= the other changes will be removals of what you added for your own project.= Use git checkout -p to selectively cancel those changes:=

=20
git checkout -p composer.json
=20

Answer no (do not discard) to the requirement cha= nges of ezsystems dependencies. Answer yes&n= bsp;(discard) to removals of your changes.

Once you are done, inspect the file, either using an editor or by runnin= g git diff composer.json. You may also test the file's sanity = with composer validate, and test the dependencies by runn= ing composer update --dry-run. (will output what it would= do to dependencies, without applying the changes.

Once finished, run git add composer.json and commit.

Fixing other conf= licts (if any)

Depending on the local changes you have done, you may get other conflict= s on configuration files, kernel, etc.

There shouldn't be many, and you should be able to figure out which valu= e is the right one for all of them:

  • Edit the file, and identify the conflicting changes. If a setting = you have modified has also been changed by us, you should be able to figure= out which value is the right one.
  • Run git add conflicting-file to add the changes<= /li>

3. Update the app

At this point, you should have a composer.json file with th= e correct requirements. Run composer update to update the= dependencies. 

=20
composer update
=20

If you want to first test how the update proceeds without actually updat= ing any packages, you can try the command with the --dry-run switch:

composer update --dry-run

On PHP conflict | 16.02 and later requires PHP 5.5 or hi= gher

Because from release 16.02 onwards eZ Platform is compatible only with P= HP 5.5 and higher, the update command above will fail if you use an older P= HP version. Please update PHP to proceed.

4. Update database

This step is only relevant for some releases:

Form Builder
=20

1.7.0

To enable the Form Builder feature in eZ Platform Enterprise Edition, im= port the following file:

=20
mysql -p -u <database_user> <database_name> < vendor=
/ezsystems/ezstudio-form-builder/bundle/Resources/install/form_builder.sql<=
/pre>=20
=20
Date Based Publisher
=20

1.7.0

To enable the Date-Based Publisher feature in Enterprise, import the fol= lowing file:

=20
mysql -p -u <database_user> <database_name> < vendor=
/ezsystems/date-based-publisher/bundle/Resources/install/datebasedpublisher=
_scheduled_version.sql
=20

In order to activate Date-Based Publisher open console (terminal) and us= e:

=20
crontab -e
=20

and add below configuration at the end of edited file.

For production environment:

=20
* * * * *   (cd /path/to/your/ezstudio-project && app/conso=
le ezpublish:cron:run -e=3Dprod)
=20

For development environment:

=20
* * * * *   (cd /path/to/your/ezstudio-project && app/conso=
le ezpublish:cron:run -e=3Ddev)
=20
=20

5. Dump assets

The web assets must be dumped again if you are using the prod environment. In dev this happens automatically:

=20
php app/console assetic:dump -e=3Dprod
=20

If you encounter problems, additionally clear the cache and install asse= ts:

=20
php app/console cache:clear -e=3Dprod
php app/console assets:install --symlink -e=3Dprod
php app/console assetic:dump -e=3Dprod
=20

6. Commit, test and mer= ge

Once all the conflicts have been resolved, and composer.lock updated, the merge can be committed. Note that you may or may not ke= ep composer.lock, depending on your version management wo= rkflow. If you do not wish to keep it, run git reset HEAD <fi= le> to remove it from the changes. Run git commit= , and adapt the message if necessary. You can now verify the project= and once the update has been approved, go back to master, and= merge your update branch:

=20
git checkout master
git merge <branch_name>
=20

 

Your eZ Platform should now be up-to-date with the chosen versio= n!

 

=20
=20
=20
=20

Related:

In this topic:

=20
=20
=20
------=_Part_2749_550788461.1485850680825--