description | month_change |
---|---|
Update your installation to the latest v3.3 version from an earlier v3.3 version. |
false |
This update procedure applies if you're using a v3.3 installation without the latest maintenance release. To update from an 3.2 to 3.3, see Updating the app to v3.3. From older version, explore this section.
Go through the following steps to update to the latest maintenance release of v3.3 (v[[= latest_tag_3_3 =]]).
!!! note
You can only update to the latest patch release of 3.3.x.
!!! note
If you're using v3.3.15 or earlier v3.3 version, or encounter an error related to flex.ibexa.co, you need to [update your Flex server](#update-flex-server) first.
Run:
=== "[[= product_name_content =]]"
``` bash
composer require ibexa/content:[[= latest_tag_3_3 =]] --with-all-dependencies --no-scripts
```
=== "[[= product_name_exp =]]"
``` bash
composer require ibexa/experience:[[= latest_tag_3_3 =]] --with-all-dependencies --no-scripts
```
=== "[[= product_name_com =]]"
``` bash
composer require ibexa/commerce:[[= latest_tag_3_3 =]] --with-all-dependencies --no-scripts
```
To avoid deprecations when updating from an older PHP version to PHP 8.2 or 8.3, run the following commands:
composer config extra.runtime.error_handler "\\Ibexa\\Contracts\\Core\\MVC\\Symfony\\ErrorHandler\\Php82HideDeprecationsErrorHandler"
composer dump-autoload
The flex.ibexa.co
Flex server has been disabled.
If you're using v3.3.15 or earlier v3.3 version, you need to update your Flex server.
In your composer.json
check whether the https://flex.ibexa.co
endpoint is still listed in extra.symfony.endpoint
.
If that's the case, you need to perform the following update procedure.
First, update the symfony/flex
bundle to handle the new endpoint:
composer update symfony/flex --no-plugins --no-scripts;
Then, replace the https://flex.ibexa.co
endpoint with the new https://api.github.com/repos/ibexa/recipes/contents/index.json?ref=flex/main
endpoint in composer.json
under extra.symfony.endpoint
.
You can do it manually, or by running the following command:
composer config extra.symfony.endpoint "https://api.github.com/repos/ibexa/recipes/contents/index.json?ref=flex/main"
Next, continue with updating the app:
=== "[[= product_name_content =]]"
``` bash
composer recipes:install ibexa/content --force -v
composer run post-install-cmd
```
=== "[[= product_name_exp =]]"
``` bash
composer recipes:install ibexa/experience --force -v
composer run post-install-cmd
```
=== "[[= product_name_com =]]"
``` bash
composer recipes:install ibexa/commerce --force -v
composer run post-install-cmd
```
Review the changes to make sure your custom configuration wasn't affected.
Remove the vendor
folder to prevent issues related to the new Flex server.
Then, perform a database upgrade and other steps relevant to the version you're updating to.
!!! caution "Clear Redis cache"
If you're using Redis as your persistence cache storage you should always clear it manually after an upgrade.
You can do it by executing the following command:
```bash
php bin/console cache:pool:clear cache.redis
```
Version v3.3.2 introduces new entity managers. To ensure that they work in multi-repository setups, you must update the Doctrine schema. You do this manually by following this procedure:
-
Update your project to v3.3.2 and run the
php bin/console cache:clear
command to generate the service container. -
Run the following command to discover the names of the new entity managers. Take note of the names that you discover:
php bin/console debug:container --parameter=doctrine.entity_managers --format=json | grep ibexa_
-
For every entity manager prefixed with
ibexa_
, run the following command:php bin/console doctrine:schema:update --em=<ENTITY_MANAGER_NAME> --dump-sql
-
Review the queries and ensure that there are no harmful changes that could affect your data.
-
For every entity manager prefixed with
ibexa_
, run the following command to run queries on the database:php bin/console doctrine:schema:update --em=<ENTITY_MANAGER_NAME> --force
[[% include 'snippets/update/vcl_configuration_for_fastly_v3.md' %]]
Run the following SQL queries to optimize workflow performance:
CREATE INDEX idx_workflow_co_id_ver ON ezeditorialworkflow_workflows(content_id, version_no);
CREATE INDEX idx_workflow_name ON ezeditorialworkflow_workflows(workflow_name);
Commerce features in Experience and Content editions are disabled by default.
If you use these features, after the update enable Commerce features by going to config\packages\ecommerce.yaml
and setting the following:
ezplatform:
system:
default:
commerce:
enabled: true
Next, run the following command:
php bin/console ibexa:upgrade --force
If you're using MySQL, run the following update script:
mysql -u<username> -p<password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.1-to-3.3.2.sql
Remove Kaliop\eZMigrationBundle\eZMigrationBundle::class => ['all' => true],
from config/bundles.php
before running composer require
.
Then, in composer.json
, set minimum stability to stable
:
"minimum-stability": "stable",
To update to Symfony 5.3, update the following package versions in your composer.json
,
including the Symfony version (line 9):
"symfony/flex": "^1.3.1"
"sensio/framework-extra-bundle": "^6.1",
"symfony/runtime": "*",
"doctrine/doctrine-bundle": "^2.4"
"symfony/maker-bundle": "^1.0",
"symfony": {
"allow-contrib": true,
"require": "5.3.*",
"endpoint": "https://flex.ibexa.co"
},
See https://github.com/ibexa/website-skeleton/pull/5/files for details of the package version change.
If you're using Commerce, run the following migration action to update the way Commerce configuration is stored:
mkdir --parent src/Migrations/Ibexa/migrations
cp vendor/ibexa/installer/src/bundle/Resources/install/migrations/content/Components/move_configuration_to_settings.yaml src/Migrations/Ibexa/migrations/
php bin/console ibexa:migrations:migrate --file=move_configuration_to_settings.yaml
Run the following scripts:
=== "MySQL"
``` shell
mysql -u<username> -p<password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.6-to-3.3.7.sql
```
=== "PostgreSQL"
``` shell
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-3.3.6-to-3.3.7.sql
```
If you have no access to [[= product_name =]]'s ibexa/installer
package, apply the following database upgrade script:
=== "MySQL"
``` sql
DROP TABLE IF EXISTS `ibexa_setting`;
CREATE TABLE `ibexa_setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group` varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`identifier` varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ibexa_setting_group_identifier` (`group`, `identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
```
=== "PostgreSQL"
``` sql
DROP TABLE IF EXISTS ibexa_setting;
CREATE TABLE ibexa_setting (
id SERIAL NOT NULL,
"group" varchar(128) NOT NULL,
identifier varchar(128) NOT NULL,
value json NOT NULL,
PRIMARY KEY (id),
CONSTRAINT ibexa_setting_group_identifier UNIQUE ("group", identifier)
);
```
Run the following scripts:
=== "MySQL"
``` shell
mysql -u<username> -p<password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.8-to-3.3.9.sql
```
=== "PostgreSQL"
``` shell
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-3.3.8-to-3.3.9.sql
```
!!! note "Symfony 5.4"
Prior to v3.3.13, Symfony 5.3 was used by default.
If you're still 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: [content](https://github.com/ibexa/content-skeleton/blob/v3.3.13/composer.json), [experience](https://github.com/ibexa/experience-skeleton/blob/v3.3.13/composer.json), [commerce](https://github.com/ibexa/commerce-skeleton/blob/v3.3.13/composer.json).
The following `sed` commands should update the relevant lines.
Use them with caution and properly check the result:
```shell
sed -i -E 's/"symfony\/(.+)": "5.3.*"/"symfony\/\1": "5.4.*"/' composer.json;
sed -i -E 's/"require": "5.3.*"/"require": "5.4.*"/' composer.json;
```
After this `composer.json` update, run `composer update "symfony/*"`.
You may need to adapt configuration to fit the new minor version of Symfony.
For example, you might have to remove `timeout` related config from `nelmio_solarium` bundle config:
```shell
sed -i -E '/ *timeout: [0-9]+/d' ./config/packages/nelmio_solarium.yaml ./config/packages/ezcommerce/ezcommerce_advanced.yaml
composer update "symfony/*"
```
Update Platform.sh configuration and scripts.
Generate new configuration with the following command:
composer ibexa:setup --platformsh
Review the changes applied to .platform.app.yaml
, .platform/
and bin/platformsh_prestart_cacheclear.sh
,
merge with your custom settings if needed, and commit them to Git.
Update your Varnish VCL file to align with docs/varnish/vcl/varnish5.vcl
.
Make sure it contains the highlighted additions.
// Compressing the content
// ...
// Modify xkey header to add translation suffix
if (beresp.http.xkey && beresp.http.x-lang) {
set beresp.http.xkey = beresp.http.xkey + " " + regsuball(beresp.http.xkey, "(\S+)", "\1" + beresp.http.x-lang);
}
// ...
if (client.ip ~ debuggers) {
/// ...
} else {
// Remove tag headers when delivering to non debug client
unset resp.http.xkey;
unset resp.http.x-lang;
// Sanity check to prevent ever exposing the hash to a non debug client.
unset resp.http.x-user-context-hash;
}
Adapt your composer.json
file according to manifest.json
, by adding and moving the following lines:
"composer-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
- "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd",
"yarn install": "script",
+ "ibexa:encore:compile --config-name app": "symfony-cmd",
+ "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd",
"ibexa:encore:compile": "symfony-cmd"
}
See Update Flex server.
[[= product_name =]] now supports Fastly shielding. If you're using Fastly and want to use shielding, you need to update your VCL files.
!!! tip
Even if you don't plan to use Fastly shielding, it's recommended to update the VCL files for future compatibility.
- Locate the
vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl
file and update your VCL file with the recent changes. - Do the same with
vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_user_hash.vcl
. - Upload a new
snippet_re_enable_shielding.vcl
snippet file, based onvendor/ezsystems/ezplatform-http-cache-fastly/fastly/snippet_re_enable_shielding.vcl
.
On Experience or Commerce edition, run the following scripts:
=== "MySQL"
``` shell
mysql -u<username> -p<password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.24-to-3.3.25.sql
```
=== "PostgreSQL"
``` shell
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-3.3.24-to-3.3.25.sql
```
Following Security advisory: IBEXA-SA-2022-009, unless you can verify based on your log files that the vulnerability hasn't been exploited, you should revoke passwords for all affected users.
Run the following scripts:
=== "MySQL"
``` sql
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-3.3.33-to-3.3.34.sql
```
=== "PostgreSQL"
``` sql
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-3.3.33-to-3.3.34.sql
```
If you have no access to [[= product_name =]]'s ibexa/installer
package, apply the following database upgrade script:
=== "MySQL"
ALTER TABLE `ezcontentobject_attribute` ADD INDEX `ezcontentobject_attribute_co_id_ver` (`contentobject_id`,`version`);
ALTER TABLE `ezurl_object_link` ADD INDEX `ezurl_ol_coa_id_cav` (`contentobject_attribute_id`,`contentobject_attribute_version`);
ALTER TABLE `ezcontentobject_link` ADD INDEX `ezco_link_cca_id` (`contentclassattribute_id`);
=== "PostgreSQL"
CREATE INDEX "ezco_link_cca_id" O##N "ezcontentobject_link" ("contentclassattribute_id");
CREATE INDEX "ezcontentobject_attribute_co_id_ver" ON "ezcontentobject_attribute" ("contentobject_id", "version");
CREATE INDEX "ezurl_ol_coa_id_cav" ON "ezurl_object_link" ("contentobject_attribute_id", "contentobject_attribute_version");
No additional steps needed.
This release contains security fixes. For more information, see the published security advisory. For each of the following fixes, evaluate the vulnerability to determine whether you might have been affected. If so, take appropriate action, for example by revoking passwords for all affected users.
The BREACH attack is a security vulnerability against HTTPS when using HTTP compression.
If you're using Varnish, update the VCL configuration to stop compressing both the [[= product_name =]]'s REST API and JSON responses from your backend. Fastly users are not affected.
=== "Varnish on [[= product_name_cloud =]]"
Update the Varnish configuration.
Generate new configuration with the following command:
```bash
composer ibexa:setup --platformsh
```
Review the changes, merge with your custom settings if needed, and commit them to Git before deployment.
=== "Varnish 6"
Update your Varnish VCL file to align it with the [`vendor/ezsystems/ezplatform-http-cache/docs/varnish/vcl/varnish5.vcl`](https://github.com/ezsystems/ezplatform-http-cache/blob/2.3/docs/varnish/vcl/varnish5.vcl) file.
=== "Varnish 7"
Update your Varnish VCL file to align it with the [`vendor/ezsystems/ezplatform-http-cache/docs/varnish/vcl/varnish7.vcl`](https://github.com/ezsystems/ezplatform-http-cache/blob/2.3/docs/varnish/vcl/varnish7.vcl) file.
```
If you're not using a reverse proxy like Varnish or Fastly, adjust the compressed Content-Type
in the web server configuration.
For more information, see the updated Apache and nginx template configuration.
There are no additional update steps to execute.
This release comes with a command to clean up duplicated entries in the ezcontentobject_attribute
table, which were created due to an issue described in IBX-8562.
If you're affected, remove the duplicated entries by running the following command:
php bin/console ibexa:content:remove-duplicate-fields
!!! caution
Remember about [**proper database backup**](backup.md) before running the command in the production environment.
You can customize the behavior of the command with the following options:
--batch-size
or-b
- number of attributes affected per iteration. Default value = 10000.--max-iterations
or-i
- maximum iterations count. Default value = -1 (unlimited).--sleep
or-s
- wait time between iterations, in milliseconds. Default value = 0.
Adjust the web server configuration to prevent direct access to the index.php
file when using URLs consisting of multiple path segments.
See the updated Apache and nginx template files for more information.
This release no longer directly requires the symfony/serializer-pack
Composer dependency, which can remove some dependencies from your project during the update process.
If you rely on them in your project, for example by using Symfony's ObjectNormalizer
to create your own REST endpoints, run the following command before updating [[= product_name_base =]] packages:
composer require symfony/serializer-pack
Then, verify that Symfony Flex installed the versions you were using before.
[[% include 'snippets/update/finish_the_update.md' %]]
[[% include 'snippets/update/notify_support.md' %]]