Update from v3.3.x to v4.0¶
This update procedure applies if you are using v3.3.
Go through the following steps to update to v4.0.
Besides updating the application and database, you need to account for changes related to code refactoring and numerous namespace changes. See a list of all changed namespaces, configuration key, service names, and other changes.
An additional compatibility layer makes the process of updating your code easier.
Temporary need of Composer conflict
To go through this update, map the conflicting packages in your composer.json
file as following:
1 2 3 4 |
|
Symfony 5.4
If you are using Symfony 5.3, you need to update your installation to Symfony 5.4.
To do this, update your composer.json to refer to 5.4.*
instead or 5.3.*
.
Refer to the relevant website skeleton for an example: content, experience, commerce.
Update the app to v4.0¶
First, run:
1 |
|
1 |
|
1 |
|
Update Flex server¶
The flex.ibexa.co
Flex server has been disabled.
If you are using v4.0.2 or earlier v4.0 version, you need to update your Flex server.
To do it, in your composer.json
check whether the https://flex.ibexa.co
endpoint is still listed in extra.symfony.endpoint
.
If so, replace it with the new https://api.github.com/repos/ibexa/recipes/contents/index.json?ref=flex/main
endpoint.
If your composer.json
still uses the https://flex.ibexa.co
endpoint in extra.symfony.endpoint
,
replace it with the new https://api.github.com/repos/ibexa/recipes/contents/index.json?ref=flex/main
endpoint.
You can do it manually, or by running the following command:
1 |
|
Next, continue with updating the app:
1 |
|
1 |
|
1 |
|
The recipes:install
command installs new YAML configuration files,
which have been renamed in this release.
Look through the old YAML files and move your custom configuration to the relevant new files.
In bundles.php
, remove all entries starting with eZ
, EzSystems
, Ibexa\Platform
, Silversolutions
and Siso
.
Leave only third-party entires and entries added by the recipes:install
command, starting with Ibexa\Bundle
.
Add compatibility layer package¶
You can use the provided compatibility layer to speed up adaptation of your custom code to the new namespaces.
Add the compatibility layer package using Composer:
1 2 |
|
Make sure that Ibexa\Bundle\CompatibilityLayer\IbexaCompatibilityLayerBundle
is last in your bundle list in config/bundles.php
.
Next, clear the cache:
1 |
|
Update the database¶
Apply the following database update script:
1 |
|
1 |
|
Prepare new database tables¶
For every database connection you have configured, perform the following steps:
- Run
php bin/console doctrine:schema:update --dump-sql --em=ibexa_{connection}
- Check the queries and verify that they are safe and will not damage the data.
- Run
php bin/console doctrine:schema:update --dump-sql --em=ibexa_{connection} --force
Next, run the following commands to import necessary data migration scripts:
1 2 3 4 5 6 |
|
Run php bin/console ibexa:migrations:migrate -v --dry-run
to ensure that all migrations are ready to be performed.
If the dry run is successful, run:
1 |
|
Update your custom code¶
Back Office customization¶
The v4 version of Ibexa DXP is using Bootstrap 5 in the Back Office. If you were using Bootstrap 4 for styling, you need to update and adjust all custom Back Office components following the migration guide from Bootstrap 4.
Online editor¶
Custom plugins and buttons¶
If you added your own Online Editor plugins or buttons, you need to rewrite them using CKEditor 5's extensibility.
Custom tags¶
If you created a custom tag, you need to adapt it to the new configuration, for example:
1 2 3 4 5 6 7 8 9 10 11 |
|
Personalization¶
In Personalization, the included_content_types
configuration key has changed to included_item_types
.
Update your configuration, if it applies.
Finish update¶
Adapt your composer.json
file according to manifest.json
, by adding the following lines:
1 2 3 4 |
|
Then, finish the update process:
1 |
|
Finally, generate the new GraphQl schema:
1 |
|