From c4ed2a5876f2ed09ede4cafa60d3b033b41ecfac Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 27 May 2025 17:31:02 +0200 Subject: [PATCH 01/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 98 +++++++++++++++++++ .../from_5.0/update_from_5.0.md | 12 +++ docs/update_and_migration/update_ibexa_dxp.md | 20 +++- mkdocs.yml | 3 + 4 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 docs/update_and_migration/from_4.6/update_to_5.0.md create mode 100644 docs/update_and_migration/from_5.0/update_from_5.0.md diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md new file mode 100644 index 0000000000..6783debaac --- /dev/null +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -0,0 +1,98 @@ +--- +description: Update your installation to v5.0 from the latest v4.6 version. +month_change: true +--- + +# Update from v4.6 to v5.0 + +## Update from v4.6.x to v4.6.latest + +Before you update to v5.0, you need to [update to the latest maintenance release of v4.6 (v[[= latest_tag_4_6 =]])](update_from_4.6.md). + +## Update from v4.6.latest to v5.0.TODO + +When you have the last version of 4.6, you can update to v5.0. + +First, check v5.0's [requirements](requirements.md). +It supports only PHP 8.3 and above. + +### Update custom code for PHP 8.3 (TODO: 8.3+?) + +If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. + +Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, +see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) for more information about installation and usage. + +TODO: Example with our own code samples? +TODO: list of features deprecated in 4.6 removed in 5.0? + +### TODO: Other updates like moving from any deprecated stuff? + +### Update [[= product_name =]] application + +=== "[[= product_name_headless =]]" + + ``` bash + composer require ibexa/headless:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts + composer recipes:install ibexa/headless --force -v + ``` +=== "[[= product_name_exp =]]" + + ``` bash + composer require ibexa/experience:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts + composer recipes:install ibexa/experience --force -v + ``` +=== "[[= product_name_com =]]" + + ``` bash + composer require ibexa/commerce:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts + composer recipes:install ibexa/commerce --force -v + ``` + +### composer.json clean-up + +If you have required 4.6 LTS Update packages, +they're included by default in 5.0. +You can now remove them from your composer.json +so you won't have to maintain which of their versions your composer.json is referring to. + +TODO: Do it earlier? +TODO: A reminding list of removable LTS Update packages + +### Update database + +Apply the following database update script: + +TODO: Fix SQL file path + +### [[= product_name =]] + +=== "MySQL" + + ``` bash + mysql -u -p < vendor/ibexa/installer/upgrade/db/mysql/ibexa-4.6.latest-to-5.0.0.sql + ``` + +=== "PostgreSQL" + + ``` bash + psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql + ``` + +TODO: Migration files? + +Many tables names have changed. If you have custom code directly querying these tables, you will need to update them. + +TODO: old name/new name table + +TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. + +### Update custom code for [[= product_name =]] 5.0 + +TODO: Rector again, this time with 5.0 rules. + +### Update Back Office extensions + +TODO: Update JS, templates, CSS… +TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 +TODO: Conversion tables diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md new file mode 100644 index 0000000000..9a8ddbf07f --- /dev/null +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -0,0 +1,12 @@ +--- +description: Update your installation to the latest v5.0 version from an earlier v5.0 version. +month_change: true +--- + +# Update from v5.0.x to v5.0.latest + +Ibexa DXP v5.0.0 is the latest version for now. If you have it, you're update-to-date. +Come back to this page later to discover if some patch has been released and how to install it. + +To update from v4.6.x, see [Update from v4.6 to v5.0](update_to_5.0.md) +From older version, explore [this section](update_ibexa_dxp.md). diff --git a/docs/update_and_migration/update_ibexa_dxp.md b/docs/update_and_migration/update_ibexa_dxp.md index 351cbd9175..5a90b91bbc 100644 --- a/docs/update_and_migration/update_ibexa_dxp.md +++ b/docs/update_and_migration/update_ibexa_dxp.md @@ -11,20 +11,32 @@ To update [[= product_name =]] to a newer version, select the version you're cur If you have a v1.13 installation, or a v2.x installation lower than the latest v2.5, [update to the v2.5 LTS](from_1.x_2.x/update_from_1.x_2.x.md). - Afterwards, it's strongly recommended to [update to the v3.3 LTS](from_2.5/update_from_2.5.md) and then update to the latest LTS, [v4.6](from_4.5/update_from_4.5.md) (through [v4.0](from_3.3/to_4.0.md) up to v4.6). + Afterwards, it's strongly recommended to [update to the v3.3 LTS](from_2.5/update_from_2.5.md), + then [update to v4.6 LTS](from_4.5/update_from_4.5.md) (through [v4.0](from_3.3/to_4.0.md) up to v4.6), + and finally [to the lastest v5.0 LTS](from_4.6/update_to_5.0.md). === "I am using v2.5" If you have a v2.5 installation, [update to the v3.3 LTS](from_2.5/update_from_2.5.md). - Afterwards, it's strongly recommended to also update to the latest LTS, [v4.6](from_4.5/update_from_4.5.md) (through [v4.0](from_3.3/to_4.0.md) up to v4.6). + Afterwards, it's strongly recommended to also [update to v4.6 LTS](from_4.5/update_from_4.5.md) (through [v4.0](from_3.3/to_4.0.md) up to v4.6), + and finally [to the lastest v5.0 LTS](from_4.6/update_to_5.0.md). === "I am using v3.3" If you already have a v3.3 installation, [update to the latest v3.3 version](from_3.3/update_from_3.3.md). - Afterwards, it's strongly recommended to also update to the latest LTS, [v4.6](from_4.5/update_from_4.5.md) (through [v4.0](from_3.3/to_4.0.md) up to v4.6). + Afterwards, it's strongly recommended to also [update to v4.6 LTS](from_4.5/update_from_4.5.md) (through [v4.0](from_3.3/to_4.0.md) up to v4.6), + and finally [to the lastest v5.0 LTS](from_4.6/update_to_5.0.md). === "I am using v4.x" - If you already have a v4.x installation, [update to the v4.6 LTS](from_4.5/update_from_4.5.md). + - If you have a v4.x installation prior to v4.6, [update to the v4.6 LTS](from_4.5/update_from_4.5.md). + - If you have a v4.6 installation, (update to the latest patch v[[= latest_tag_4_6 =]])(from_4.6/update_from_4.6.md). + + Afterwards, it's strongly recommended to also [update to the lastest v5.0 LTS](from_4.6/update_to_5.0.md). + +=== "I am using v5.0" + + If you're using [[= latest_tag_5_0 =]], You're update-to-date. + Monitor [this v5.0 update page](from_5.0/update_from_5.0.md) for futur patches. diff --git a/mkdocs.yml b/mkdocs.yml index 3e237819e4..5f8e4747ce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -849,6 +849,9 @@ nav: - Update to v4.6: update_and_migration/from_4.5/update_from_4.5.md - Update from v4.6: - Update to v4.6: update_and_migration/from_4.6/update_from_4.6.md + - Update to v5.0: update_and_migration/from_4.6/update_to_5.0.md + - Update from v5.0: + - Update to v5.0: update_and_migration/from_5.0/update_from_5.0.md - Migrate to Ibexa DXP: - Migrate from eZ Publish Platform: update_and_migration/migrate_to_ibexa_dxp/migrating_from_ez_publish_platform.md - Migrate from eZ Publish: update_and_migration/migrate_to_ibexa_dxp/migrating_from_ez_publish.md From fbf95340c5cd714293cef3bd0a1437ec29e8cd6d Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:29:17 +0200 Subject: [PATCH 02/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 24 ++++++++++++++++++- .../from_5.0/update_from_5.0.md | 4 ++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 6783debaac..1a72a38f45 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -49,7 +49,29 @@ TODO: list of features deprecated in 4.6 removed in 5.0? composer recipes:install ibexa/commerce --force -v ``` -### composer.json clean-up +### composer.json + +#### Sort commands + +Recipe appends a command to `composer.json`'s `auto-scripts`. +You have to manually resort the commands so the `tsconfig.json` file +is created by `yarn ibexa-generate-tsconfig` +before being used by `ibexa:encore:compile`. +Your `auto-scripts` entry should look like this: + +```json + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd", + "yarn install": "script", + "ibexa:encore:compile --config-name app": "symfony-cmd", + "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd", + "yarn ibexa-generate-tsconfig": "script", + "ibexa:encore:compile": "symfony-cmd" + }, +``` + +#### Clean-up If you have required 4.6 LTS Update packages, they're included by default in 5.0. diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index 9a8ddbf07f..cde6899044 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -8,5 +8,5 @@ month_change: true Ibexa DXP v5.0.0 is the latest version for now. If you have it, you're update-to-date. Come back to this page later to discover if some patch has been released and how to install it. -To update from v4.6.x, see [Update from v4.6 to v5.0](update_to_5.0.md) -From older version, explore [this section](update_ibexa_dxp.md). +To update from v4.6.x, see [Update from v4.6 to v5.0](update_to_5.0.md). +From an older version, explore [this section](update_ibexa_dxp.md). From 42cf1b405866ad3d2f9ef62a642933b15cd02175 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:24:49 +0200 Subject: [PATCH 03/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 1a72a38f45..48bec8867e 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -81,6 +81,25 @@ so you won't have to maintain which of their versions your composer.json is refe TODO: Do it earlier? TODO: A reminding list of removable LTS Update packages +#### GraphQL + +Contrary to 4.6, [GraphQL](graphql.md) isn't included by default in 5.0. + +If you are using it, add it back: + +TODO: Too soon + +``` bash +composer require ibexa/graphql +php bin/console ibexa:graphql:generate-schema +``` + +If you aren't using it, remove its configuration: + +``` bash +rm -r config/graphql +``` + ### Update database Apply the following database update script: @@ -101,6 +120,8 @@ TODO: Fix SQL file path psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql ``` +TODO: Inject "Now included 4.6 LTS Updates" schemas + TODO: Migration files? Many tables names have changed. If you have custom code directly querying these tables, you will need to update them. From 8e5e1d7526764760a1da2d35790a6e73ced4a5d8 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 3 Jun 2025 16:54:00 +0200 Subject: [PATCH 04/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 122 +++++++++++++----- 1 file changed, 90 insertions(+), 32 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 48bec8867e..4d16c17d90 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -13,10 +13,10 @@ Before you update to v5.0, you need to [update to the latest maintenance release When you have the last version of 4.6, you can update to v5.0. -First, check v5.0's [requirements](requirements.md). +First, match v5.0's [requirements](requirements.md). It supports only PHP 8.3 and above. -### Update custom code for PHP 8.3 (TODO: 8.3+?) +### Update custom code for PHP 8.3+ If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. @@ -28,30 +28,92 @@ TODO: list of features deprecated in 4.6 removed in 5.0? ### TODO: Other updates like moving from any deprecated stuff? +### TODO: Install all 4.6 LTS Updates? + +### Move from annotation to attribute + +TODO: Rename the file? Does it need clean-up? What about custom code? Rector? + +Edit `config/routes/annotations.yaml` +and replace `type: annotation` by `type: attribute`. + +```bash +sed -i 's/type: annotation/type: attribute/g' config/routes/annotations.yaml +``` + +### Remove GraphQL schema + +GraphQL package (`ibexa/graphql`) isn't part of the default package anymore. +If you use GraphQL, it can be reinstalled later in the upgrade process. +Whatever your situation, its schema is out-dated and must be deleted. + +``` +rm -r config/graphql +``` + +### Remove Stimulus bootstrap + +Edit `assets/app.js` and remove the following lines: + +``` +// start the Stimulus application +import './bootstrap'; +``` + +Delete the bootstrap file: + +``` +rm assets/bootstrap.js +``` + ### Update [[= product_name =]] application +#### Update required packages + +[[= product_name =]] 5.0 is based on Symfony 7.2 and both must be updated. +Your development package must be updated as well. +The process example below considers [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` as installed. + === "[[= product_name_headless =]]" ``` bash - composer require ibexa/headless:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts - composer recipes:install ibexa/headless --force -v + TODO ``` === "[[= product_name_exp =]]" ``` bash - composer require ibexa/experience:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts - composer recipes:install ibexa/experience --force -v + TODO ``` === "[[= product_name_com =]]" ``` bash - composer require ibexa/commerce:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts - composer recipes:install ibexa/commerce --force -v + # Update required PHP version + composer require --no-update 'php:>=8.3'; + # Update required Symfony version + composer config extra.symfony.require '7.2.*' + # Upgrade Ibexa and Symfony packages: application + composer require --no-update \ + ibexa/commerce:[[= latest_tag_5_0 =]] \ + symfony/console:^7.2 \ + symfony/dotenv:^7.2 \ + symfony/framework-bundle:^7.2 \ + symfony/runtime:^7.2 \ + symfony/yaml:^7.2 \ + ; + # Upgrade Ibexa and Symfony packages: development tools + ddev composer require --dev --no-update \ + ibexa/rector:[[= latest_tag_5_0 =]] \ + symfony/debug-bundle:^7.2 \ + symfony/stopwatch:^7.2 \ + symfony/web-profiler-bundle:^7.2 \ + ; + # Update packages / Install new dependencies + ddev composer update --with-all-dependencies --no-scripts --verbose ``` -### composer.json +#### `composer.json` management -#### Sort commands +##### Sort commands Recipe appends a command to `composer.json`'s `auto-scripts`. You have to manually resort the commands so the `tsconfig.json` file @@ -71,34 +133,19 @@ Your `auto-scripts` entry should look like this: }, ``` -#### Clean-up +##### Clean-up -If you have required 4.6 LTS Update packages, -they're included by default in 5.0. +4.6 LTS Update packages are included by default in 5.0. You can now remove them from your composer.json -so you won't have to maintain which of their versions your composer.json is referring to. +so you don't have to maintain which of their versions your composer.json is referring to. -TODO: Do it earlier? -TODO: A reminding list of removable LTS Update packages +You can remove the following packages: -#### GraphQL - -Contrary to 4.6, [GraphQL](graphql.md) isn't included by default in 5.0. - -If you are using it, add it back: - -TODO: Too soon +- `ibexa/connector-ai` +- `ibexa/collaboration` +- `ibexa/share` -``` bash -composer require ibexa/graphql -php bin/console ibexa:graphql:generate-schema -``` -If you aren't using it, remove its configuration: - -``` bash -rm -r config/graphql -``` ### Update database @@ -139,3 +186,14 @@ TODO: Rector again, this time with 5.0 rules. TODO: Update JS, templates, CSS… TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 TODO: Conversion tables + +#### GraphQL + +As previously mentioned, GraphQL package (`ibexa/graphql`) isn't part of the default package anymore. + +If you are using it, add it back: + +``` bash +composer require ibexa/graphql +php bin/console ibexa:graphql:generate-schema +``` From 5bac8658d9137f95481b9860ccefef9bd4383fde Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 3 Jun 2025 19:19:14 +0200 Subject: [PATCH 05/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 224 +++++++++++++++--- 1 file changed, 185 insertions(+), 39 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 4d16c17d90..118463ac12 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -28,26 +28,41 @@ TODO: list of features deprecated in 4.6 removed in 5.0? ### TODO: Other updates like moving from any deprecated stuff? -### TODO: Install all 4.6 LTS Updates? +### TODO: Install all 4.6 LTS Updates? It could help with the DB schemas or configs… ### Move from annotation to attribute -TODO: Rename the file? Does it need clean-up? What about custom code? Rector? +Delete [`config/routes/annotations.yaml`](https://github.com/symfony/recipes/blob/main/doctrine/annotations/1.0/config/routes/annotations.yaml) if you haven't customised it. + +If you have customized it, you have to move from `type: annotation` to `type: attribute`. +TODO: Any help or recommendation to provide to the reader? + +The `config/routes.yaml` file should start with the following declaration from [its recipe](https://github.com/symfony/recipes/blob/main/symfony/routing/7.0/config/routes.yaml): + +```yaml +controllers: + resource: + path: ../src/Controller/ + namespace: App\Controller + type: attribute +``` + +- You can delete the file and let the recipe recreate it. Then, if you have customized it, merge with your previous version from your version system. +- Or edit the file and copy-paste the new declaration at top of it. -Edit `config/routes/annotations.yaml` -and replace `type: annotation` by `type: attribute`. ```bash -sed -i 's/type: annotation/type: attribute/g' config/routes/annotations.yaml +rm config/routes/annotations.yaml +rm config/routes.yaml ``` ### Remove GraphQL schema -GraphQL package (`ibexa/graphql`) isn't part of the default package anymore. +GraphQL package (`ibexa/graphql`) isn't part of the default package list anymore. If you use GraphQL, it can be reinstalled later in the upgrade process. -Whatever your situation, its schema is out-dated and must be deleted. +Whatever your situation, its schema is out-dated and must be deleted before going further. -``` +```bash rm -r config/graphql ``` @@ -68,7 +83,7 @@ rm assets/bootstrap.js ### Update [[= product_name =]] application -#### Update required packages +#### Update package requirements [[= product_name =]] 5.0 is based on Symfony 7.2 and both must be updated. Your development package must be updated as well. @@ -76,17 +91,17 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p === "[[= product_name_headless =]]" - ``` bash + ```bash TODO ``` === "[[= product_name_exp =]]" - ``` bash + ```bash TODO ``` === "[[= product_name_com =]]" - ``` bash + ```bash # Update required PHP version composer require --no-update 'php:>=8.3'; # Update required Symfony version @@ -111,9 +126,54 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p ddev composer update --with-all-dependencies --no-scripts --verbose ``` -#### `composer.json` management +#### Remove 4.6 LTS Updates constraints + +4.6 LTS Update packages are included by default in 5.0. +You can now remove them from your composer.json +so you don't have to maintain which of their versions your composer.json is referring to. + +TODO: Test the following command + +```bash +composer remove --no-update \ + ibexa/connector-ai \ + ibexa/collaboration \ + ibexa/share \ +; +``` + +#### Update required packages + +It's time to apply the new composer.json and update the dependencies: + +TODO: 🤞 + +```bash +composer update --with-all-dependencies --no-scripts +``` + +#### Remove PHP 8.2 error handler -##### Sort commands +TODO: Do it earlier? + +If you were using the [`Php82HideDeprecationsErrorHandler`](update_from_4.6.md#v468) to avoid deprecation messages, +you can remove it: + +```bash +# Remove Php82HideDeprecationsErrorHandler +ddev composer config --unset extra.runtime.error_handler +``` + +#### Recipes + +```bash +# Force recipes reset +rm symfony.lock +# Run recipes +composer recipes:install ibexa/commerce --force --yes -v +``` + +#### Sort commands Recipe appends a command to `composer.json`'s `auto-scripts`. You have to manually resort the commands so the `tsconfig.json` file @@ -133,47 +193,133 @@ Your `auto-scripts` entry should look like this: }, ``` -##### Clean-up - -4.6 LTS Update packages are included by default in 5.0. -You can now remove them from your composer.json -so you don't have to maintain which of their versions your composer.json is referring to. - -You can remove the following packages: - -- `ibexa/connector-ai` -- `ibexa/collaboration` -- `ibexa/share` - +#### Post update script +```bash +# Manually clear cache to ensure script won't use a piece of it +rm -rf var/cache +# A.k.a "auto-scripts" +ddev composer run-script post-update-cmd +``` ### Update database Apply the following database update script: -TODO: Fix SQL file path - ### [[= product_name =]] +TODO: Rework 4.6 LTS Update schemas injection + === "MySQL" - ``` bash + ```bash mysql -u -p < vendor/ibexa/installer/upgrade/db/mysql/ibexa-4.6.latest-to-5.0.0.sql + # LTS Update related schemas to inject only if the add-on was never installed + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p ``` === "PostgreSQL" - ``` bash + ```bash psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql + # LTS Update related schemas to inject only if the add-on was never installed + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql ``` -TODO: Inject "Now included 4.6 LTS Updates" schemas - -TODO: Migration files? - -Many tables names have changed. If you have custom code directly querying these tables, you will need to update them. - -TODO: old name/new name table +TODO: Migration files? Content type updates? + +Many tables are renamed. Some columns are also renamed. +If you have custom code directly querying those, you will need to update them. + +You can track the renamming in the `ibexa-4.6.latest-to-5.0.0.sql` files or in the folded map below. + +??? note "Renaming map" + + TODO: Keep up-to-date + + | old name | new name | + |:------------------------------------------|:----------------------------------------------------| + | ezbinaryfile | ibexa_binary_file | + | ezcobj_state | ibexa_object_state | + | ezcobj_state_group | ibexa_object_state_group | + | ezcobj_state_group_language | ibexa_object_state_group_language | + | ezcobj_state_language | ibexa_object_state_language | + | ezcobj_state_link | ibexa_object_state_link | + | ezcontent_language | ibexa_content_language | + | ezcontentbrowsebookmark | ibexa_content_bookmark | + | ezcontentclass | ibexa_content_type | + | ezcontentclass_attribute | ibexa_content_type_field_definition | + | ezcontentclass_attribute.contentclass_id | ibexa_content_type_field_definition.content_type_id | + | ezcontentclass_attribute_ml | ibexa_content_type_field_definition_ml | + | ezcontentclass_classgroup | ibexa_content_type_group_assignment | + | ezcontentclass_classgroup.contentclass_id | ibexa_content_type_group_assignment.content_type_id | + | ezcontentclass_name | ibexa_content_type_name | + | ezcontentclass_name.contentclass_id | ibexa_content_type_name.content_type_id | + | ezcontentclassgroup | ibexa_content_type_group | + | ezcontentobject | ibexa_content | + | ezcontentobject.contentclass_id | ibexa_content.content_type_id | + | ezcontentobject_attribute | ibexa_content_field | + | ezcontentobject_link | ibexa_content_relation | + | ezcontentobject_name | ibexa_content_name | + | ezcontentobject_trash | ibexa_content_trash | + | ezcontentobject_tree | ibexa_content_tree | + | ezcontentobject_version | ibexa_content_version | + | ezdatebasedpublisher_scheduled_entries | ibexa_scheduler_scheduled_entries | + | ezdfsfile | ibexa_dfs_file | + | ezeditorialworkflow_markings | ibexa_workflow_markings | + | ezeditorialworkflow_transitions | ibexa_workflow_transitions | + | ezeditorialworkflow_workflows | ibexa_workflow_workflows | + | ezform_field_attributes | ibexa_form_field_attributes | + | ezform_field_validators | ibexa_form_field_validators | + | ezform_fields | ibexa_form_fields | + | ezform_form_submission_data | ibexa_form_form_submission_data | + | ezform_form_submissions | ibexa_form_form_submissions | + | ezform_forms | ibexa_form_forms | + | ezgmaplocation | ibexa_map_location | + | ezimagefile | ibexa_image_file | + | ezkeyword | ibexa_keyword | + | ezkeyword_attribute_link | ibexa_keyword_field_link | + | ezmedia | ibexa_media | + | eznode_assignment | ibexa_node_assignment | + | eznotification | ibexa_notification | + | ezpackage | ibexa_package | + | ezpage_attributes | ibexa_page_attributes | + | ezpage_blocks | ibexa_page_blocks | + | ezpage_blocks_design | ibexa_page_blocks_design | + | ezpage_blocks_visibility | ibexa_page_blocks_visibility | + | ezpage_map_attributes_blocks | ibexa_page_map_attributes_blocks | + | ezpage_map_blocks_zones | ibexa_page_map_blocks_zones | + | ezpage_map_zones_pages | ibexa_page_map_zones_pages | + | ezpage_pages | ibexa_page_pages | + | ezpage_zones | ibexa_page_zones | + | ezpolicy | ibexa_policy | + | ezpolicy_limitation | ibexa_policy_limitation | + | ezpolicy_limitation_value | ibexa_policy_limitation_value | + | ezpreferences | ibexa_preferences | + | ezrole | ibexa_role | + | ezsearch_object_word_link | ibexa_search_object_word_link | + | ezsearch_object_word_link.contentclass_id | ibexa_search_object_word_link.content_type_id | + | ezsearch_word | ibexa_search_word | + | ezsection | ibexa_section | + | ezsite | ibexa_site | + | ezsite_data | ibexa_site_data | + | ezsite_public_access | ibexa_site_public_access | + | ezurl | ibexa_url | + | ezurl_object_link | ibexa_url_content_link | + | ezurlalias | ibexa_url_alias | + | ezurlalias_ml | ibexa_url_alias_ml | + | ezurlalias_ml_incr | ibexa_url_alias_ml_incr | + | ezurlwildcard | ibexa_url_wildcard | + | ezuser | ibexa_user | + | ezuser_accountkey | ibexa_user_accountkey | + | ezuser_role | ibexa_user_role | + | ezuser_setting | ibexa_user_setting | + + TODO: Something about renamed indexes? TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. @@ -189,11 +335,11 @@ TODO: Conversion tables #### GraphQL -As previously mentioned, GraphQL package (`ibexa/graphql`) isn't part of the default package anymore. +As previously mentioned, GraphQL package (`ibexa/graphql`) isn't part of the default anymore. If you are using it, add it back: -``` bash +```bash composer require ibexa/graphql php bin/console ibexa:graphql:generate-schema ``` From 508fd532e54b50a28971c8cf9958601f50b1837b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 4 Jun 2025 17:56:41 +0200 Subject: [PATCH 06/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 118463ac12..57e87502fe 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -56,16 +56,6 @@ rm config/routes/annotations.yaml rm config/routes.yaml ``` -### Remove GraphQL schema - -GraphQL package (`ibexa/graphql`) isn't part of the default package list anymore. -If you use GraphQL, it can be reinstalled later in the upgrade process. -Whatever your situation, its schema is out-dated and must be deleted before going further. - -```bash -rm -r config/graphql -``` - ### Remove Stimulus bootstrap Edit `assets/app.js` and remove the following lines: @@ -81,6 +71,16 @@ Delete the bootstrap file: rm assets/bootstrap.js ``` +### Remove GraphQL schema + +4.6 GraphQL isn't compatible with 5.0 so delete it. + +TODO: Is `@=resolver` to `@=query` change need to be detailed? + +```bash +rm -r config/graphql +``` + ### Update [[= product_name =]] application #### Update package requirements @@ -196,10 +196,10 @@ Your `auto-scripts` entry should look like this: #### Post update script ```bash -# Manually clear cache to ensure script won't use a piece of it +# Manually clear cache to ensure scripts won't use a piece of it rm -rf var/cache # A.k.a "auto-scripts" -ddev composer run-script post-update-cmd +composer run-script post-update-cmd ``` ### Update database @@ -333,13 +333,13 @@ TODO: Update JS, templates, CSS… TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 TODO: Conversion tables -#### GraphQL +#### Generate GraphQL schema -As previously mentioned, GraphQL package (`ibexa/graphql`) isn't part of the default anymore. +GraphQL is used by 4.6's Back Office +but isn't used by 5.0's one. -If you are using it, add it back: +Optionaly, if you are using GraphQL, generate its schema: ```bash -composer require ibexa/graphql php bin/console ibexa:graphql:generate-schema ``` From f2105808b0caf67335196b862184776c949b6432 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 5 Jun 2025 11:25:08 +0200 Subject: [PATCH 07/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 57e87502fe..1d79bdb748 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -13,16 +13,21 @@ Before you update to v5.0, you need to [update to the latest maintenance release When you have the last version of 4.6, you can update to v5.0. +### Requirements + First, match v5.0's [requirements](requirements.md). It supports only PHP 8.3 and above. -### Update custom code for PHP 8.3+ +### Update custom code for PHP 8.3+ and DXP 4.6 If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) for more information about installation and usage. +Rector might also find out code deprecated in 4.6 which are likely removed in 5.0. +Update according to its report to reduce this debt and have less code not compatible with 5.0. + TODO: Example with our own code samples? TODO: list of features deprecated in 4.6 removed in 5.0? @@ -323,23 +328,28 @@ You can track the renamming in the `ibexa-4.6.latest-to-5.0.0.sql` files or in t TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. -### Update custom code for [[= product_name =]] 5.0 - -TODO: Rector again, this time with 5.0 rules. - -### Update Back Office extensions - -TODO: Update JS, templates, CSS… -TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 -TODO: Conversion tables - #### Generate GraphQL schema GraphQL is used by 4.6's Back Office but isn't used by 5.0's one. -Optionaly, if you are using GraphQL, generate its schema: +Optionally, if you are using GraphQL in your project, generate its schema: ```bash php bin/console ibexa:graphql:generate-schema ``` + +### Update custom code for [[= product_name =]] 5.0 + +Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set +by running the recipe: + +```bash +composer recipe:install ibexa/rector --force --reset --yes +``` + +### Update Back Office extensions + +TODO: Update JS, templates, CSS… +TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 +TODO: Conversion tables From 28eb9be74ea45020af1ed9b6bdf462c535d966e1 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:39:50 +0200 Subject: [PATCH 08/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 87 ++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 1d79bdb748..4161f007ef 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -242,7 +242,7 @@ If you have custom code directly querying those, you will need to update them. You can track the renamming in the `ibexa-4.6.latest-to-5.0.0.sql` files or in the folded map below. -??? note "Renaming map" +??? note "Tables and columns renaming map" TODO: Keep up-to-date @@ -341,6 +341,8 @@ php bin/console ibexa:graphql:generate-schema ### Update custom code for [[= product_name =]] 5.0 +#### Update PHP framework standards + Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set by running the recipe: @@ -348,8 +350,89 @@ by running the recipe: composer recipe:install ibexa/rector --force --reset --yes ``` -### Update Back Office extensions +TODO: Add other rule sets? + +You can add some other rule sets like the Symfony and SensioLabs ones to match newer standards: + +```php +//use Rector\Doctrine\Set\DoctrineSetList; +use Rector\Symfony\Set\SymfonySetList; +use Rector\Symfony\Set\SensiolabsSetList; + +//… + + ->withSets( + [ + IbexaSetList::IBEXA_50->value, // rule set for upgrading to Ibexa DXP 5.0 + SymfonySetList::SYMFONY_60, + SymfonySetList::SYMFONY_61, + SymfonySetList::SYMFONY_62, + SymfonySetList::SYMFONY_63, + SymfonySetList::SYMFONY_64, + SymfonySetList::SYMFONY_70, + SymfonySetList::SYMFONY_71, + SymfonySetList::SYMFONY_72, + SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, + //DoctrineSetList::DOCTRINE_DBAL_211, //TODO: Useful? + //TODO: Other usefull sets? + ] + )->withAttributesSets(symfony: true); +``` + +TODO: Set deprecation and withAttributesSets + +#### Update field type identifiers + +- Update in template + - TODO: `{% block ezstring_field %)` → `{% block ibexa_string_field %}` (content_fields.html.twig) and others (field edit, field def, field def edit,…) + - TODO: Configs, template paths, template rules, whatever needed… +- Update in migration files + +??? note "Field type identifiers renaming map" + +| old name | new name | +|:--------------------------------|:--------------------------------| +| ibexa_address | ibexa_address | +| ezauthor | ibexa_author | +| ezbinaryfile | ibexa_binaryfile | +| ezboolean | ibexa_boolean | +| ezcontentquery | ibexa_content_query | +| ezcountry | ibexa_country | +| ibexa_customer_group | ibexa_customer_group | +| ezdate | ibexa_date | +| ezdatetime | ibexa_datetime | +| ezemail | ibexa_email | +| ezfloat | ibexa_float | +| ezform | ibexa_form | +| ezgmaplocation | ibexa_gmap_location | +| ezimage | ibexa_image | +| ezimageasset | ibexa_image_asset | +| ezinteger | ibexa_integer | +| ezisbn | ibexa_isbn | +| ezkeyword | ibexa_keyword | +| ezlandingpage | ibexa_landing_page | +| ezmatrix | ibexa_matrix | +| ibexa_measurement | ibexa_measurement | +| ezmedia | ibexa_media | +| ezobjectrelation | ibexa_object_relation | +| ezobjectrelationlist | ibexa_object_relation_list | +| ibexa_product_specification | ibexa_product_specification | +| ezpage | ezpage (?!) | +| ezrichtext | ibexa_richtext | +| ezselection | ibexa_selection | +| ibexa_seo | ibexa_seo | +| ezstring | ibexa_string | +| ibexa_taxonomy_entry | ibexa_taxonomy_entry | +| ibexa_taxonomy_entry_assignment | ibexa_taxonomy_entry_assignment | +| eztext | ibexa_text | +| eztime | ibexa_time | +| ezurl | ibexa_url | +| ezuser | ibexa_user | + +#### Update Back Office extensions TODO: Update JS, templates, CSS… TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 TODO: Conversion tables +TODO: Icons +TODO: Shared with front? From a265627bec47829c9986ca136eb4dc7621c95512 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:33:56 +0200 Subject: [PATCH 09/49] Draft 5.0 update process --- docs/update_and_migration/from_4.6/update_to_5.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 4161f007ef..977b7b6496 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -24,6 +24,7 @@ If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) for more information about installation and usage. +TODO: For example, you might have to remove the inclusion of `tests/ directory. Rector might also find out code deprecated in 4.6 which are likely removed in 5.0. Update according to its report to reduce this debt and have less code not compatible with 5.0. @@ -355,12 +356,11 @@ TODO: Add other rule sets? You can add some other rule sets like the Symfony and SensioLabs ones to match newer standards: ```php +//… //use Rector\Doctrine\Set\DoctrineSetList; use Rector\Symfony\Set\SymfonySetList; use Rector\Symfony\Set\SensiolabsSetList; - //… - ->withSets( [ IbexaSetList::IBEXA_50->value, // rule set for upgrading to Ibexa DXP 5.0 From bb672ddf63d8fb3f50f6d2b0f960200c9d0a100c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:19:23 +0200 Subject: [PATCH 10/49] Draft 5.0 update process --- .../update_and_migration/from_4.6/update_to_5.0.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 977b7b6496..e7e21ed657 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -353,7 +353,8 @@ composer recipe:install ibexa/rector --force --reset --yes TODO: Add other rule sets? -You can add some other rule sets like the Symfony and SensioLabs ones to match newer standards: +You can add some other rule sets like the Symfony and SensioLabs ones to match newer standards. +It's recommended to activate one set at a time, check the output, and decide if kept now, or discarded for a later usage. ```php //… @@ -373,13 +374,16 @@ use Rector\Symfony\Set\SensiolabsSetList; SymfonySetList::SYMFONY_71, SymfonySetList::SYMFONY_72, SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, - //DoctrineSetList::DOCTRINE_DBAL_211, //TODO: Useful? - //TODO: Other usefull sets? + //DoctrineSetList::DOCTRINE_DBAL_211, //TODO: Useful? No really. Deprecated. I'll remove it. + //TODO: Other useful sets? ] - )->withAttributesSets(symfony: true); + ) + ->withAttributesSets(symfony: true) // Duplicate SymfonySetList in witch way? Which rule sets is it adding? + ->withPhpSets() + ; ``` -TODO: Set deprecation and withAttributesSets +TODO: SymfonySetList deprecation and withAttributesSets #### Update field type identifiers From f84fd3c859995159abc0d80ab3beedf7124076a2 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Jun 2025 09:21:32 +0200 Subject: [PATCH 11/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index e7e21ed657..2164c9d5da 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -357,29 +357,14 @@ You can add some other rule sets like the Symfony and SensioLabs ones to match n It's recommended to activate one set at a time, check the output, and decide if kept now, or discarded for a later usage. ```php -//… -//use Rector\Doctrine\Set\DoctrineSetList; -use Rector\Symfony\Set\SymfonySetList; -use Rector\Symfony\Set\SensiolabsSetList; -//… ->withSets( [ - IbexaSetList::IBEXA_50->value, // rule set for upgrading to Ibexa DXP 5.0 - SymfonySetList::SYMFONY_60, - SymfonySetList::SYMFONY_61, - SymfonySetList::SYMFONY_62, - SymfonySetList::SYMFONY_63, - SymfonySetList::SYMFONY_64, - SymfonySetList::SYMFONY_70, - SymfonySetList::SYMFONY_71, - SymfonySetList::SYMFONY_72, - SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, - //DoctrineSetList::DOCTRINE_DBAL_211, //TODO: Useful? No really. Deprecated. I'll remove it. - //TODO: Other useful sets? + IbexaSetList::IBEXA_50->value // rule set for upgrading to Ibexa DXP 5.0 ] ) - ->withAttributesSets(symfony: true) // Duplicate SymfonySetList in witch way? Which rule sets is it adding? ->withPhpSets() + ->withComposerBased(twig: true, symfony: true) + ->withAttributesSets(symfony: true, sensiolabs: true) ; ``` From 57271bb8b7e42529c12efba44dc73a6d4e2bcf77 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 13 Jun 2025 09:35:28 +0200 Subject: [PATCH 12/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 2164c9d5da..883adf700a 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -351,10 +351,32 @@ by running the recipe: composer recipe:install ibexa/rector --force --reset --yes ``` -TODO: Add other rule sets? +You can add some other rule sets (like, for example, the Symfony ones) to match newer standards. -You can add some other rule sets like the Symfony and SensioLabs ones to match newer standards. -It's recommended to activate one set at a time, check the output, and decide if kept now, or discarded for a later usage. +It's recommended to activate one set at a time, check the output, and decide if kept now, or discarded for another time. + +```php +//… +use Rector\Symfony\Set\SymfonySetList; +use Rector\Symfony\Set\SensiolabsSetList; +//… + ->withSets( + [ + IbexaSetList::IBEXA_50->value, + SymfonySetList::SYMFONY_60, + SymfonySetList::SYMFONY_61, + SymfonySetList::SYMFONY_62, + SymfonySetList::SYMFONY_63, + SymfonySetList::SYMFONY_64, + SymfonySetList::SYMFONY_70, + SymfonySetList::SYMFONY_71, + SymfonySetList::SYMFONY_72, + SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, + ] + ); +``` + +But you can also go faster with bigger [rule sets in the modern way](https://getrector.com/documentation/set-lists) like in the following example: ```php ->withSets( @@ -368,8 +390,6 @@ It's recommended to activate one set at a time, check the output, and decide if ; ``` -TODO: SymfonySetList deprecation and withAttributesSets - #### Update field type identifiers - Update in template From eb9c7a324c3cdbe3e742fbbe13f570e386df9d56 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:46:15 +0200 Subject: [PATCH 13/49] update_to_5.0.md: Update old/new names tables --- .../from_4.6/update_to_5.0.md | 237 +++++++++--------- 1 file changed, 120 insertions(+), 117 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 883adf700a..073761ce32 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -236,7 +236,7 @@ TODO: Rework 4.6 LTS Update schemas injection php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql ``` -TODO: Migration files? Content type updates? +TODO: Migration files? Content type updates? Seems not. Many tables are renamed. Some columns are also renamed. If you have custom code directly querying those, you will need to update them. @@ -247,84 +247,88 @@ You can track the renamming in the `ibexa-4.6.latest-to-5.0.0.sql` files or in t TODO: Keep up-to-date - | old name | new name | - |:------------------------------------------|:----------------------------------------------------| - | ezbinaryfile | ibexa_binary_file | - | ezcobj_state | ibexa_object_state | - | ezcobj_state_group | ibexa_object_state_group | - | ezcobj_state_group_language | ibexa_object_state_group_language | - | ezcobj_state_language | ibexa_object_state_language | - | ezcobj_state_link | ibexa_object_state_link | - | ezcontent_language | ibexa_content_language | - | ezcontentbrowsebookmark | ibexa_content_bookmark | - | ezcontentclass | ibexa_content_type | - | ezcontentclass_attribute | ibexa_content_type_field_definition | - | ezcontentclass_attribute.contentclass_id | ibexa_content_type_field_definition.content_type_id | - | ezcontentclass_attribute_ml | ibexa_content_type_field_definition_ml | - | ezcontentclass_classgroup | ibexa_content_type_group_assignment | - | ezcontentclass_classgroup.contentclass_id | ibexa_content_type_group_assignment.content_type_id | - | ezcontentclass_name | ibexa_content_type_name | - | ezcontentclass_name.contentclass_id | ibexa_content_type_name.content_type_id | - | ezcontentclassgroup | ibexa_content_type_group | - | ezcontentobject | ibexa_content | - | ezcontentobject.contentclass_id | ibexa_content.content_type_id | - | ezcontentobject_attribute | ibexa_content_field | - | ezcontentobject_link | ibexa_content_relation | - | ezcontentobject_name | ibexa_content_name | - | ezcontentobject_trash | ibexa_content_trash | - | ezcontentobject_tree | ibexa_content_tree | - | ezcontentobject_version | ibexa_content_version | - | ezdatebasedpublisher_scheduled_entries | ibexa_scheduler_scheduled_entries | - | ezdfsfile | ibexa_dfs_file | - | ezeditorialworkflow_markings | ibexa_workflow_markings | - | ezeditorialworkflow_transitions | ibexa_workflow_transitions | - | ezeditorialworkflow_workflows | ibexa_workflow_workflows | - | ezform_field_attributes | ibexa_form_field_attributes | - | ezform_field_validators | ibexa_form_field_validators | - | ezform_fields | ibexa_form_fields | - | ezform_form_submission_data | ibexa_form_form_submission_data | - | ezform_form_submissions | ibexa_form_form_submissions | - | ezform_forms | ibexa_form_forms | - | ezgmaplocation | ibexa_map_location | - | ezimagefile | ibexa_image_file | - | ezkeyword | ibexa_keyword | - | ezkeyword_attribute_link | ibexa_keyword_field_link | - | ezmedia | ibexa_media | - | eznode_assignment | ibexa_node_assignment | - | eznotification | ibexa_notification | - | ezpackage | ibexa_package | - | ezpage_attributes | ibexa_page_attributes | - | ezpage_blocks | ibexa_page_blocks | - | ezpage_blocks_design | ibexa_page_blocks_design | - | ezpage_blocks_visibility | ibexa_page_blocks_visibility | - | ezpage_map_attributes_blocks | ibexa_page_map_attributes_blocks | - | ezpage_map_blocks_zones | ibexa_page_map_blocks_zones | - | ezpage_map_zones_pages | ibexa_page_map_zones_pages | - | ezpage_pages | ibexa_page_pages | - | ezpage_zones | ibexa_page_zones | - | ezpolicy | ibexa_policy | - | ezpolicy_limitation | ibexa_policy_limitation | - | ezpolicy_limitation_value | ibexa_policy_limitation_value | - | ezpreferences | ibexa_preferences | - | ezrole | ibexa_role | - | ezsearch_object_word_link | ibexa_search_object_word_link | - | ezsearch_object_word_link.contentclass_id | ibexa_search_object_word_link.content_type_id | - | ezsearch_word | ibexa_search_word | - | ezsection | ibexa_section | - | ezsite | ibexa_site | - | ezsite_data | ibexa_site_data | - | ezsite_public_access | ibexa_site_public_access | - | ezurl | ibexa_url | - | ezurl_object_link | ibexa_url_content_link | - | ezurlalias | ibexa_url_alias | - | ezurlalias_ml | ibexa_url_alias_ml | - | ezurlalias_ml_incr | ibexa_url_alias_ml_incr | - | ezurlwildcard | ibexa_url_wildcard | - | ezuser | ibexa_user | - | ezuser_accountkey | ibexa_user_accountkey | - | ezuser_role | ibexa_user_role | - | ezuser_setting | ibexa_user_setting | - + | old name | new name | + |:------------------------------------------------------|:------------------------------------------------------------------------| + | ezbinaryfile | ibexa_binary_file | + | ezcobj_state | ibexa_object_state | + | ezcobj_state_group | ibexa_object_state_group | + | ezcobj_state_group_language | ibexa_object_state_group_language | + | ezcobj_state_language | ibexa_object_state_language | + | ezcobj_state_link | ibexa_object_state_link | + | ezcontent_language | ibexa_content_language | + | ezcontentbrowsebookmark | ibexa_content_bookmark | + | ezcontentclass | ibexa_content_type | + | ezcontentclass_attribute | ibexa_content_type_field_definition | + | ezcontentclass_attribute.contentclass_id | ibexa_content_type_field_definition.content_type_id | + | ezcontentclass_attribute_ml | ibexa_content_type_field_definition_ml | + | ezcontentclass_attribute_ml.contentclass_attribute_id | ibexa_content_type_field_definition_ml.content_type_field_definition_id | + | ezcontentclass_classgroup | ibexa_content_type_group_assignment | + | ezcontentclass_classgroup.contentclass_id | ibexa_content_type_group_assignment.content_type_id | + | ezcontentclass_name | ibexa_content_type_name | + | ezcontentclass_name.contentclass_id | ibexa_content_type_name.content_type_id | + | ezcontentclassgroup | ibexa_content_type_group | + | ezcontentobject | ibexa_content | + | ezcontentobject.contentclass_id | ibexa_content.content_type_id | + | ezcontentobject_attribute | ibexa_content_field | + | ezcontentobject_attribute.contentclassattribute_id | ibexa_content_field.content_type_field_definition_id | + | ezcontentobject_link | ibexa_content_relation | + | ezcontentobject_link.contentclassattribute_id | ibexa_content_relation.content_type_field_definition_id | + | ezcontentobject_name | ibexa_content_name | + | ezcontentobject_trash | ibexa_content_trash | + | ezcontentobject_tree | ibexa_content_tree | + | ezcontentobject_version | ibexa_content_version | + | ezdatebasedpublisher_scheduled_entries | ibexa_scheduler_scheduled_entries | + | ezdfsfile | ibexa_dfs_file | + | ezeditorialworkflow_markings | ibexa_workflow_markings | + | ezeditorialworkflow_transitions | ibexa_workflow_transitions | + | ezeditorialworkflow_workflows | ibexa_workflow_workflows | + | ezform_field_attributes | ibexa_form_field_attributes | + | ezform_field_validators | ibexa_form_field_validators | + | ezform_fields | ibexa_form_fields | + | ezform_form_submission_data | ibexa_form_form_submission_data | + | ezform_form_submissions | ibexa_form_form_submissions | + | ezform_forms | ibexa_form_forms | + | ezgmaplocation | ibexa_map_location | + | ezimagefile | ibexa_image_file | + | ezkeyword | ibexa_keyword | + | ezkeyword_attribute_link | ibexa_keyword_field_link | + | ezmedia | ibexa_media | + | eznode_assignment | ibexa_node_assignment | + | eznotification | ibexa_notification | + | ezpackage | ibexa_package | + | ezpage_attributes | ibexa_page_attributes | + | ezpage_blocks | ibexa_page_blocks | + | ezpage_blocks_design | ibexa_page_blocks_design | + | ezpage_blocks_visibility | ibexa_page_blocks_visibility | + | ezpage_map_attributes_blocks | ibexa_page_map_attributes_blocks | + | ezpage_map_blocks_zones | ibexa_page_map_blocks_zones | + | ezpage_map_zones_pages | ibexa_page_map_zones_pages | + | ezpage_pages | ibexa_page_pages | + | ezpage_zones | ibexa_page_zones | + | ezpolicy | ibexa_policy | + | ezpolicy_limitation | ibexa_policy_limitation | + | ezpolicy_limitation_value | ibexa_policy_limitation_value | + | ezpreferences | ibexa_preferences | + | ezrole | ibexa_role | + | ezsearch_object_word_link | ibexa_search_object_word_link | + | ezsearch_object_word_link.contentclass_id | ibexa_search_object_word_link.content_type_id | + | ezsearch_object_word_link.contentclass_attribute_id | ibexa_search_object_word_link.content_type_field_definition_id | + | ezsearch_word | ibexa_search_word | + | ezsection | ibexa_section | + | ezsite | ibexa_site | + | ezsite_data | ibexa_site_data | + | ezsite_public_access | ibexa_site_public_access | + | ezurl | ibexa_url | + | ezurl_object_link | ibexa_url_content_link | + | ezurlalias | ibexa_url_alias | + | ezurlalias_ml | ibexa_url_alias_ml | + | ezurlalias_ml_incr | ibexa_url_alias_ml_incr | + | ezurlwildcard | ibexa_url_wildcard | + | ezuser | ibexa_user | + | ezuser_accountkey | ibexa_user_accountkey | + | ezuser_role | ibexa_user_role | + | ezuser_setting | ibexa_user_setting | + TODO: Something about renamed indexes? TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. @@ -399,44 +403,43 @@ But you can also go faster with bigger [rule sets in the modern way](https://get ??? note "Field type identifiers renaming map" -| old name | new name | -|:--------------------------------|:--------------------------------| -| ibexa_address | ibexa_address | -| ezauthor | ibexa_author | -| ezbinaryfile | ibexa_binaryfile | -| ezboolean | ibexa_boolean | -| ezcontentquery | ibexa_content_query | -| ezcountry | ibexa_country | -| ibexa_customer_group | ibexa_customer_group | -| ezdate | ibexa_date | -| ezdatetime | ibexa_datetime | -| ezemail | ibexa_email | -| ezfloat | ibexa_float | -| ezform | ibexa_form | -| ezgmaplocation | ibexa_gmap_location | -| ezimage | ibexa_image | -| ezimageasset | ibexa_image_asset | -| ezinteger | ibexa_integer | -| ezisbn | ibexa_isbn | -| ezkeyword | ibexa_keyword | -| ezlandingpage | ibexa_landing_page | -| ezmatrix | ibexa_matrix | -| ibexa_measurement | ibexa_measurement | -| ezmedia | ibexa_media | -| ezobjectrelation | ibexa_object_relation | -| ezobjectrelationlist | ibexa_object_relation_list | -| ibexa_product_specification | ibexa_product_specification | -| ezpage | ezpage (?!) | -| ezrichtext | ibexa_richtext | -| ezselection | ibexa_selection | -| ibexa_seo | ibexa_seo | -| ezstring | ibexa_string | -| ibexa_taxonomy_entry | ibexa_taxonomy_entry | -| ibexa_taxonomy_entry_assignment | ibexa_taxonomy_entry_assignment | -| eztext | ibexa_text | -| eztime | ibexa_time | -| ezurl | ibexa_url | -| ezuser | ibexa_user | + | old name | new name | + |:--------------------------------|:--------------------------------| + | ibexa_address | ibexa_address | + | ezauthor | ibexa_author | + | ezbinaryfile | ibexa_binaryfile | + | ezboolean | ibexa_boolean | + | ezcontentquery | ibexa_content_query | + | ezcountry | ibexa_country | + | ibexa_customer_group | ibexa_customer_group | + | ezdate | ibexa_date | + | ezdatetime | ibexa_datetime | + | ezemail | ibexa_email | + | ezfloat | ibexa_float | + | ezform | ibexa_form | + | ezgmaplocation | ibexa_gmap_location | + | ezimage | ibexa_image | + | ezimageasset | ibexa_image_asset | + | ezinteger | ibexa_integer | + | ezisbn | ibexa_isbn | + | ezkeyword | ibexa_keyword | + | ezlandingpage | ibexa_landing_page | + | ezmatrix | ibexa_matrix | + | ibexa_measurement | ibexa_measurement | + | ezmedia | ibexa_media | + | ezobjectrelation | ibexa_object_relation | + | ezobjectrelationlist | ibexa_object_relation_list | + | ibexa_product_specification | ibexa_product_specification | + | ezrichtext | ibexa_richtext | + | ezselection | ibexa_selection | + | ibexa_seo | ibexa_seo | + | ezstring | ibexa_string | + | ibexa_taxonomy_entry | ibexa_taxonomy_entry | + | ibexa_taxonomy_entry_assignment | ibexa_taxonomy_entry_assignment | + | eztext | ibexa_text | + | eztime | ibexa_time | + | ezurl | ibexa_url | + | ezuser | ibexa_user | #### Update Back Office extensions From 4bd1ce3fa24a17254ecf7470e5eeaa7d9d1c3ced Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Jun 2025 11:41:49 +0200 Subject: [PATCH 14/49] Draft 5.0 update process --- .../from_4.6/update_to_5.0.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 073761ce32..771a8d9cb5 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -23,11 +23,13 @@ It supports only PHP 8.3 and above. If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, -see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) for more information about installation and usage. +see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) +and [Rector's documentation](https://getrector.com/documentation) +for more information about installation and usage. TODO: For example, you might have to remove the inclusion of `tests/ directory. Rector might also find out code deprecated in 4.6 which are likely removed in 5.0. -Update according to its report to reduce this debt and have less code not compatible with 5.0. +Let Rector reduce this debt and have less code not compatible with 5.0. TODO: Example with our own code samples? TODO: list of features deprecated in 4.6 removed in 5.0? @@ -212,9 +214,7 @@ composer run-script post-update-cmd Apply the following database update script: -### [[= product_name =]] - -TODO: Rework 4.6 LTS Update schemas injection +TODO: Rework injection of 4.6 LTS Updates' schemas === "MySQL" @@ -335,10 +335,8 @@ TODO: Compatibility "views" layers? Even if there is this layer to save time, it #### Generate GraphQL schema -GraphQL is used by 4.6's Back Office -but isn't used by 5.0's one. - -Optionally, if you are using GraphQL in your project, generate its schema: +4.6's Back Office uses GraphQL while 5.0's one doesn't. +But, optionally, if you are using GraphQL in your project, generate its schema: ```bash php bin/console ibexa:graphql:generate-schema @@ -349,7 +347,7 @@ php bin/console ibexa:graphql:generate-schema #### Update PHP framework standards Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set -by running the recipe: +by running its recipe: ```bash composer recipe:install ibexa/rector --force --reset --yes @@ -357,7 +355,7 @@ composer recipe:install ibexa/rector --force --reset --yes You can add some other rule sets (like, for example, the Symfony ones) to match newer standards. -It's recommended to activate one set at a time, check the output, and decide if kept now, or discarded for another time. +It's recommended to activate one set at a time, check the output, and decide if kept right now, or discarded for another time. ```php //… From 94ba3e2cdc7c271abb85ac044d557d77b1d8e51c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:56:00 +0200 Subject: [PATCH 15/49] Remove old Commerce --- docs/update_and_migration/from_4.6/update_to_5.0.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 771a8d9cb5..e24e61f9fe 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -9,7 +9,12 @@ month_change: true Before you update to v5.0, you need to [update to the latest maintenance release of v4.6 (v[[= latest_tag_4_6 =]])](update_from_4.6.md). -## Update from v4.6.latest to v5.0.TODO +### Move from old to new Commerce + +If circa v4.3 you kept [deprecated old Commerce packages](update_from_4.3_old_commerce.md), +you have to move to [new Commerce ones](update_from_4.3_new_commerce.md). + +## Update from v4.6.latest to v5.0.0 When you have the last version of 4.6, you can update to v5.0. From 8cec138d75d81a3fbe6efb329335dad3e1fd21e8 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:43:37 +0200 Subject: [PATCH 16/49] update_to_5.0.md: Continue Rector exploration --- .../from_4.6/update_to_5.0.md | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index e24e61f9fe..d753b77dee 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -27,6 +27,10 @@ It supports only PHP 8.3 and above. If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. +//TODO: Update composer.json require.php to help Rector find out the right PHP version your project is using + +//IbexaSetList::IBEXA_46->value is only about Ibexa, add some PHP rule set + Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) and [Rector's documentation](https://getrector.com/documentation) @@ -351,8 +355,8 @@ php bin/console ibexa:graphql:generate-schema #### Update PHP framework standards -Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set -by running its recipe: +Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set. +If you didn't edit it the first time, you can run its recipe: ```bash composer recipe:install ibexa/rector --force --reset --yes @@ -360,7 +364,8 @@ composer recipe:install ibexa/rector --force --reset --yes You can add some other rule sets (like, for example, the Symfony ones) to match newer standards. -It's recommended to activate one set at a time, check the output, and decide if kept right now, or discarded for another time. +It's recommended to activate one set at a time, run a first time with the `--dry-run` option, +check the output, and decide if kept right now, or discarded for another time. ```php //… @@ -370,14 +375,15 @@ use Rector\Symfony\Set\SensiolabsSetList; ->withSets( [ IbexaSetList::IBEXA_50->value, - SymfonySetList::SYMFONY_60, - SymfonySetList::SYMFONY_61, - SymfonySetList::SYMFONY_62, - SymfonySetList::SYMFONY_63, - SymfonySetList::SYMFONY_64, - SymfonySetList::SYMFONY_70, - SymfonySetList::SYMFONY_71, - SymfonySetList::SYMFONY_72, + SymfonySetList::SYMFONY_60, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-60 + SymfonySetList::SYMFONY_61, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-61 + SymfonySetList::SYMFONY_62, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-62 + SymfonySetList::SYMFONY_63, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-63 + SymfonySetList::SYMFONY_64, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-64 + SymfonySetList::SYMFONY_70, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-70 + SymfonySetList::SYMFONY_71, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-71 + SymfonySetList::SYMFONY_72, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-72 + SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, ] ); @@ -394,7 +400,20 @@ But you can also go faster with bigger [rule sets in the modern way](https://get ->withPhpSets() ->withComposerBased(twig: true, symfony: true) ->withAttributesSets(symfony: true, sensiolabs: true) - ; + ->withPreparedSets( + deadCode: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-dead-code + codeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-code-quality + codingStyle: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-coding-style + typeDeclarations: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-type-declarations + // privatization: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-privatization + naming: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-naming + instanceOf: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-instanceof + earlyReturn: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-early-return + // strictBooleans: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-strict-booleans + rectorPreset: true, + symfonyCodeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-code-quality + symfonyConfigs: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-configs + ); ``` #### Update field type identifiers From 08e485a6a7d1711a734f8e0b8c3198f9c5227a2d Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:26:34 +0200 Subject: [PATCH 17/49] update_to_5.0.md: Continue Rector exploration --- .../from_4.6/update_to_5.0.md | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index d753b77dee..783a1e9cc5 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -25,25 +25,43 @@ It supports only PHP 8.3 and above. ### Update custom code for PHP 8.3+ and DXP 4.6 -If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. +Rector helps to upgrade your code. -//TODO: Update composer.json require.php to help Rector find out the right PHP version your project is using +Install [`ibexa/rector`](https://github.com/ibexa/rector) which contains rules to ensure custom code is up to date with DXP 4.6: -//IbexaSetList::IBEXA_46->value is only about Ibexa, add some PHP rule set - -Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, -see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) -and [Rector's documentation](https://getrector.com/documentation) -for more information about installation and usage. -TODO: For example, you might have to remove the inclusion of `tests/ directory. +```bash +composer require --dev ibexa/rector +``` -Rector might also find out code deprecated in 4.6 which are likely removed in 5.0. -Let Rector reduce this debt and have less code not compatible with 5.0. +Customize the `rector.php` config file. +Make is match your directory structure (for example, you may have to remove the `tests` directory). +You can add rules [for PHP with `withPhpSets`](https://getrector.com/documentation/set-lists#content-php-sets) +or [for Symfony with `withComposerBased`](https://getrector.com/blog/introducing-composer-version-based-sets). +It's recommended to activate one rule set at a time, run a first time with the `--dry-run` option, +check the output, and decide if kept right now, or discarded for another time. +TODO: Can it be kept for another time or will it break? +Your configuration could look like the following: -TODO: Example with our own code samples? -TODO: list of features deprecated in 4.6 removed in 5.0? +```php +return RectorConfig::configure() + ->withPaths( + [ + __DIR__ . '/src', + ] + ) + ->withSets( + [ + IbexaSetList::IBEXA_46->value, + ] + ) + ->withPhpSets(php83: true) + ->withComposerBased(symfony: true) +; +``` -### TODO: Other updates like moving from any deprecated stuff? +```bash +php vendor/bin/rector --dry-run +``` ### TODO: Install all 4.6 LTS Updates? It could help with the DB schemas or configs… @@ -355,6 +373,8 @@ php bin/console ibexa:graphql:generate-schema #### Update PHP framework standards +TODO: Merge up / deduplicate with DXP 4.6 / Symfony 5.4 usage of Rector above… + Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set. If you didn't edit it the first time, you can run its recipe: @@ -364,7 +384,7 @@ composer recipe:install ibexa/rector --force --reset --yes You can add some other rule sets (like, for example, the Symfony ones) to match newer standards. -It's recommended to activate one set at a time, run a first time with the `--dry-run` option, +Again, it's recommended to activate one set at a time, run a first time with the `--dry-run` option, check the output, and decide if kept right now, or discarded for another time. ```php @@ -375,6 +395,7 @@ use Rector\Symfony\Set\SensiolabsSetList; ->withSets( [ IbexaSetList::IBEXA_50->value, + SymfonySetList::SYMFONY_54, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-54 SymfonySetList::SYMFONY_60, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-60 SymfonySetList::SYMFONY_61, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-61 SymfonySetList::SYMFONY_62, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-symfonysymfony-62 From 9b895fdadb281e26a9fd814862b1043d0d41aa44 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:22:35 +0200 Subject: [PATCH 18/49] update_to_5.0.md: About legacy_alias --- .../from_4.6/update_to_5.0.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 783a1e9cc5..76bcc9d8ec 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -439,14 +439,16 @@ But you can also go faster with bigger [rule sets in the modern way](https://get #### Update field type identifiers -- Update in template - - TODO: `{% block ezstring_field %)` → `{% block ibexa_string_field %}` (content_fields.html.twig) and others (field edit, field def, field def edit,…) - - TODO: Configs, template paths, template rules, whatever needed… -- Update in migration files +Several field type identifiers have changed. +Old identifiers are still supported, but it's recommended to migrate as soon as possible +and to include this action to the verion update task list. + +You can list existing field type services with the command `php bin/console debug:container --tag=ibexa.field_type`. +The output as an `alias` column with new identifiers and a `legacy_alias` with the old ones. ??? note "Field type identifiers renaming map" - | old name | new name | + | old identifier (`legacy_alias`) | new identifier (`alias`) | |:--------------------------------|:--------------------------------| | ibexa_address | ibexa_address | | ezauthor | ibexa_author | @@ -484,6 +486,13 @@ But you can also go faster with bigger [rule sets in the modern way](https://get | ezurl | ibexa_url | | ezuser | ibexa_user | + +- Update in template + - TODO: `{% block ezstring_field %)` → `{% block ibexa_string_field %}` (content_fields.html.twig) and others (field edit, field def, field def edit,…) + - TODO: Configs, template paths, template rules, whatever needed… +- Update in migration files +- TODO: Update in DB? + #### Update Back Office extensions TODO: Update JS, templates, CSS… From 5a3f546ee585569689536b7a6e4a14aa4a4c5e06 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 24 Jun 2025 18:05:57 +0200 Subject: [PATCH 19/49] update_to_5.0.md: Rework recipes Remove Stimulus bootstrap w/ Webpack Encore recipe Write all edition recipes --- .../from_4.6/update_to_5.0.md | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 76bcc9d8ec..f6d7a9ec2a 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -91,21 +91,6 @@ rm config/routes/annotations.yaml rm config/routes.yaml ``` -### Remove Stimulus bootstrap - -Edit `assets/app.js` and remove the following lines: - -``` -// start the Stimulus application -import './bootstrap'; -``` - -Delete the bootstrap file: - -``` -rm assets/bootstrap.js -``` - ### Remove GraphQL schema 4.6 GraphQL isn't compatible with 5.0 so delete it. @@ -129,11 +114,13 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p ```bash TODO ``` + === "[[= product_name_exp =]]" ```bash TODO ``` + === "[[= product_name_com =]]" ```bash @@ -199,15 +186,37 @@ you can remove it: ddev composer config --unset extra.runtime.error_handler ``` -#### Recipes +#### Remove Stimulus bootstrap -```bash -# Force recipes reset -rm symfony.lock -# Run recipes -composer recipes:install ibexa/commerce --force --yes -v +To help moving from Symfony's Webpack Encore bundle 1.x to 2.x, +delete the Stimulus bootstrap file +and reset Webpack Encore recipe: + +``` +rm assets/bootstrap.js +composer recipes:install symfony/webpack-encore-bundle --reset --force --yes ``` +#### Apply [[= product_name =]] recipe + +=== "[[= product_name_headless =]]" + + ```bash + composer recipes:install ibexa/headless --reset --force --yes + ``` + +=== "[[= product_name_exp =]]" + + ```bash + composer recipes:install ibexa/experience --reset --force --yes + ``` + +=== "[[= product_name_com =]]" + + ```bash + composer recipes:install ibexa/commerce --reset --force --yes + ``` + #### Sort commands Recipe appends a command to `composer.json`'s `auto-scripts`. From 1a4d83fe3c3ef02911112e76a1169db4ebaea1c3 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:32:13 +0200 Subject: [PATCH 20/49] update_to_5.0.md --- .../from_4.6/update_to_5.0.md | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index f6d7a9ec2a..6832dd189e 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -16,7 +16,7 @@ you have to move to [new Commerce ones](update_from_4.3_new_commerce.md). ## Update from v4.6.latest to v5.0.0 -When you have the last version of 4.6, you can update to v5.0. +When you have the last version of 4.6, you can update to v5.0.0. ### Requirements @@ -161,29 +161,28 @@ composer remove --no-update \ ibexa/connector-ai \ ibexa/collaboration \ ibexa/share \ + ibexa/discounts \ + ibexa/discounts-codes \ ; ``` -#### Update required packages - -It's time to apply the new composer.json and update the dependencies: +#### Remove PHP 8.2 error handler -TODO: 🤞 +If you were using the [`Php82HideDeprecationsErrorHandler`](update_from_4.6.md#v468) to avoid deprecation messages, +you can remove it: ```bash -composer update --with-all-dependencies --no-scripts +composer config --unset extra.runtime.error_handler ``` -#### Remove PHP 8.2 error handler +#### Update required packages -TODO: Do it earlier? +It's time to apply the new composer.json and update the dependencies: -If you were using the [`Php82HideDeprecationsErrorHandler`](update_from_4.6.md#v468) to avoid deprecation messages, -you can remove it: +TODO: 🤞 ```bash -# Remove Php82HideDeprecationsErrorHandler -ddev composer config --unset extra.runtime.error_handler +composer update --with-all-dependencies --no-scripts ``` #### Remove Stimulus bootstrap @@ -240,9 +239,7 @@ Your `auto-scripts` entry should look like this: #### Post update script ```bash -# Manually clear cache to ensure scripts won't use a piece of it rm -rf var/cache -# A.k.a "auto-scripts" composer run-script post-update-cmd ``` @@ -250,8 +247,6 @@ composer run-script post-update-cmd Apply the following database update script: -TODO: Rework injection of 4.6 LTS Updates' schemas - === "MySQL" ```bash @@ -260,6 +255,8 @@ TODO: Rework injection of 4.6 LTS Updates' schemas php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | ddev mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | ddev mysql -u -p ``` === "PostgreSQL" @@ -270,6 +267,8 @@ TODO: Rework injection of 4.6 LTS Updates' schemas php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql ``` TODO: Migration files? Content type updates? Seems not. @@ -277,7 +276,7 @@ TODO: Migration files? Content type updates? Seems not. Many tables are renamed. Some columns are also renamed. If you have custom code directly querying those, you will need to update them. -You can track the renamming in the `ibexa-4.6.latest-to-5.0.0.sql` files or in the folded map below. +You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` files or below. ??? note "Tables and columns renaming map" @@ -450,10 +449,10 @@ But you can also go faster with bigger [rule sets in the modern way](https://get Several field type identifiers have changed. Old identifiers are still supported, but it's recommended to migrate as soon as possible -and to include this action to the verion update task list. +and to include this action to the current version update task list. You can list existing field type services with the command `php bin/console debug:container --tag=ibexa.field_type`. -The output as an `alias` column with new identifiers and a `legacy_alias` with the old ones. +The output as an `alias` column with new identifiers and a `legacy_alias` column with the old identifiers. ??? note "Field type identifiers renaming map" From 587bccb35018988fca83815ec06943d27f4bb704 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:05:36 +0200 Subject: [PATCH 21/49] update_to_5.0.md: About search engines --- docs/update_and_migration/from_4.6/update_to_5.0.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 6832dd189e..25a5d3da64 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -368,7 +368,7 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` files or below TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. -#### Generate GraphQL schema +### Generate GraphQL schema 4.6's Back Office uses GraphQL while 5.0's one doesn't. But, optionally, if you are using GraphQL in your project, generate its schema: @@ -501,6 +501,16 @@ The output as an `alias` column with new identifiers and a `legacy_alias` column - Update in migration files - TODO: Update in DB? +### Update search indexes + +TODO: Earlier? + +TODO: For Solr and Elasticsearch, it seems that the schema/config/template haven't change. A re-index should be enough + +``` +php bin/console ibexa:reindex +``` + #### Update Back Office extensions TODO: Update JS, templates, CSS… From 873508f0c11bdafabd099a86884debfe60c84d43 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:56:20 +0200 Subject: [PATCH 22/49] update_to_5.0.md: There might be nothing to do about search indexes --- docs/update_and_migration/from_4.6/update_to_5.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 25a5d3da64..08c597c2b3 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -505,7 +505,8 @@ The output as an `alias` column with new identifiers and a `legacy_alias` column TODO: Earlier? -TODO: For Solr and Elasticsearch, it seems that the schema/config/template haven't change. A re-index should be enough +TODO: For Solr and Elasticsearch, it seems that the schema/config/template haven't changed. +TODO: Is a re-index needed? Maybe not either. ``` php bin/console ibexa:reindex From 33e84cb958556b5577d61eb97f5b0f093f43dc07 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 1 Jul 2025 13:50:29 +0200 Subject: [PATCH 23/49] update_to_5.0.md: increasing stricness; optimization example --- .../from_4.6/update_to_5.0.md | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 08c597c2b3..080187020b 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -415,16 +415,6 @@ use Rector\Symfony\Set\SensiolabsSetList; SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, ] - ); -``` - -But you can also go faster with bigger [rule sets in the modern way](https://getrector.com/documentation/set-lists) like in the following example: - -```php - ->withSets( - [ - IbexaSetList::IBEXA_50->value // rule set for upgrading to Ibexa DXP 5.0 - ] ) ->withPhpSets() ->withComposerBased(twig: true, symfony: true) @@ -445,6 +435,36 @@ But you can also go faster with bigger [rule sets in the modern way](https://get ); ``` +TODO: Among other things, the type hinting strictness has been increased. + +TODO: `AsCommand` attribute; Rector doesn't move `parent::__construct('app:test');` into `AsCommand`? + +In the following example, you can see optimization thanks to the following features: + +- [Constructor parameter promoted as properties](https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion) (available since PHP 8.0) +- [`AsCommand` attribute to register a command](https://symfony.com/doc/7.2/console.html#console_registering-the-command) (available since Symfony 6.2) + +```diff ++#[AsCommand(name: 'app:test', description: 'Command to test something.')] + class TestCommand extends Command + { +- private Repository $repository; +- +- public function __construct(Repository $repository) ++ public function __construct(private readonly Repository $repository) + { +- $this->repository = $repository; +- parent::__construct('app:test'); + } +- +- protected function configure() +- { +- $this->setDescription('Command to test something.'); +- } + + protected function execute(InputInterface $input, OutputInterface $output): int +``` + #### Update field type identifiers Several field type identifiers have changed. From dc8cf71b02b98ccbe15efdc17700132655d9ee54 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:22:48 +0200 Subject: [PATCH 24/49] update_to_5.0.md: DFS --- .../from_4.6/update_to_5.0.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 080187020b..6dc1432b15 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -276,7 +276,7 @@ TODO: Migration files? Content type updates? Seems not. Many tables are renamed. Some columns are also renamed. If you have custom code directly querying those, you will need to update them. -You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` files or below. +You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ??? note "Tables and columns renaming map" @@ -366,6 +366,19 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` files or below TODO: Something about renamed indexes? +??? note "DFS (Distributed File System)" + + If [DFS IO handler](clustering.md#dfs-io-handler) is used and, as recommended, its table is on its own database, you'll have to rename table and columns there. + Here are the DFS renamming queries (extracted from `ibexa-4.6.latest-to-5.0.0.sql`): + + ```sql + ALTER TABLE ezdfsfile RENAME TO ibexa_dfs_file; + ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_name_trunk TO ibexa_dfs_file_name_trunk; + ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_expired_name TO ibexa_dfs_file_expired_name; + ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_name TO ibexa_dfs_file_name; + ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_mtime TO ibexa_dfs_file_mtime; + ``` + TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. ### Generate GraphQL schema From 9347f72acd755106bf4147dd7169698e99d6aa4f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:09:26 +0200 Subject: [PATCH 25/49] update_to_5.0.md: cache:pool:clear --- docs/update_and_migration/from_4.6/update_to_5.0.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 6dc1432b15..4a2b516cc9 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -381,6 +381,14 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. +### Clear cache pool + +The persistence cache pool needs to be cleared. + +``` +php bin/console cache:pool:clear --all +``` + ### Generate GraphQL schema 4.6's Back Office uses GraphQL while 5.0's one doesn't. From fd72362f719445a443c85bf423281203809351f8 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 9 Jul 2025 12:19:18 +0200 Subject: [PATCH 26/49] update_to_5.0.md: 2025_07_08_09_27_set_container_to_company.yaml --- .../from_4.6/update_to_5.0.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 4a2b516cc9..875a4d2c9f 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -271,8 +271,6 @@ Apply the following database update script: php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql ``` -TODO: Migration files? Content type updates? Seems not. - Many tables are renamed. Some columns are also renamed. If you have custom code directly querying those, you will need to update them. @@ -383,12 +381,25 @@ TODO: Compatibility "views" layers? Even if there is this layer to save time, it ### Clear cache pool -The persistence cache pool needs to be cleared. +The persistence cache pool needs to be cleared to be able to use the repository again. ``` php bin/console cache:pool:clear --all ``` +TODO: Only Redis/Memcached? + +### Migration file(s) + +TODO: Keep up to date + +On Experience or Commerce, the following migration file(s) must be applied. + +``` +php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/2025_07_08_09_27_set_container_to_company.yaml +php bin/console ibexa:migrations:migrate --file=2025_07_08_09_27_set_container_to_company.yaml --siteaccess=admin +``` + ### Generate GraphQL schema 4.6's Back Office uses GraphQL while 5.0's one doesn't. From 2e55fde69fb618b10d1f2dbe1660bf0301a55019 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:10:20 +0200 Subject: [PATCH 27/49] update_to_5.0.md: Update from experiment with RC1 --- .../from_4.6/update_to_5.0.md | 102 ++++++++++++++---- 1 file changed, 80 insertions(+), 22 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 875a4d2c9f..4893ddf88c 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -63,14 +63,12 @@ return RectorConfig::configure() php vendor/bin/rector --dry-run ``` -### TODO: Install all 4.6 LTS Updates? It could help with the DB schemas or configs… - ### Move from annotation to attribute Delete [`config/routes/annotations.yaml`](https://github.com/symfony/recipes/blob/main/doctrine/annotations/1.0/config/routes/annotations.yaml) if you haven't customised it. If you have customized it, you have to move from `type: annotation` to `type: attribute`. -TODO: Any help or recommendation to provide to the reader? +TODO: Any help or recommendation to provide to the reader? Rector? The `config/routes.yaml` file should start with the following declaration from [its recipe](https://github.com/symfony/recipes/blob/main/symfony/routing/7.0/config/routes.yaml): @@ -218,6 +216,8 @@ composer recipes:install symfony/webpack-encore-bundle --reset --force --yes #### Sort commands +TODO: Is ibexa/ts-config-ibexa removal change this? + Recipe appends a command to `composer.json`'s `auto-scripts`. You have to manually resort the commands so the `tsconfig.json` file is created by `yarn ibexa-generate-tsconfig` @@ -236,6 +236,10 @@ Your `auto-scripts` entry should look like this: }, ``` +#### Remove Ibexa Icons + +Remove from your `config/bundles.php` the line about `IbexaIconsBundle`. + #### Post update script ```bash @@ -245,33 +249,21 @@ composer run-script post-update-cmd ### Update database -Apply the following database update script: +The main schema has changed and the provided SQL file `ibexa-4.6.latest-to-5.0.0.sql` updates it: === "MySQL" ```bash mysql -u -p < vendor/ibexa/installer/upgrade/db/mysql/ibexa-4.6.latest-to-5.0.0.sql - # LTS Update related schemas to inject only if the add-on was never installed - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | ddev mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | ddev mysql -u -p ``` === "PostgreSQL" ```bash psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql - # LTS Update related schemas to inject only if the add-on was never installed - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql ``` -Many tables are renamed. Some columns are also renamed. +Many tables and columns are renamed. If you have custom code directly querying those, you will need to update them. You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. @@ -379,23 +371,89 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. +### Install new features' schemas + +Features which were optional 4.6 LTS Updates are now part of 5.0.0. + +* If you have already installed the feature, its schema has been updated by the previous step. +* If you haven't installed the feature, you need to add its schema to your database. +* If you mistakenly reinstall a schema, no worries, you will encounter a "Table already exists" error which can be ignored. + +#### Install AI actions schema + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql + ``` + +#### Install collaboration + +TODO: collaboration will be out as a regular part of 5.0 before being released as a 4.6 LTS Update + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql + ``` + +#### Install discounts [[% include 'snippets/commerce_badge.md' %]] + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql + ``` + ### Clear cache pool The persistence cache pool needs to be cleared to be able to use the repository again. -``` +```bash php bin/console cache:pool:clear --all ``` -TODO: Only Redis/Memcached? +### Migrations -### Migration file(s) +#### Taxonomy -TODO: Keep up to date +```bash +php bin/console ibexa:migrations:import vendor/ibexa/taxonomy/src/bundle/Resources/install/migrations/2025_08_09_14_47_mark_tag_as_container.yaml +php bin/console ibexa:migrations:migrate --file=2025_08_09_14_47_mark_tag_as_container.yaml --siteaccess=admin +``` -On Experience or Commerce, the following migration file(s) must be applied. +#### Product catalog +```bash +php bin/console ibexa:migrations:import vendor/ibexa/product-catalog/src/bundle/Resources/migrations/2025_07_09_13_52_mark_product_category_container.yaml +php bin/console ibexa:migrations:migrate --file=2025_07_09_13_52_mark_product_category_container.yaml --siteaccess=admin ``` + +#### Corporate accounts [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]] + +```bash php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/2025_07_08_09_27_set_container_to_company.yaml php bin/console ibexa:migrations:migrate --file=2025_07_08_09_27_set_container_to_company.yaml --siteaccess=admin ``` From b60aa94808ed7c76e6f1284aa14fac9f85eae3ce Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:10:56 +0200 Subject: [PATCH 28/49] update_to_5.0.md: Remove ibexa/ts-config-ibexa --- .../from_4.6/update_to_5.0.md | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 4893ddf88c..25cfe0b0f3 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -214,28 +214,6 @@ composer recipes:install symfony/webpack-encore-bundle --reset --force --yes composer recipes:install ibexa/commerce --reset --force --yes ``` -#### Sort commands - -TODO: Is ibexa/ts-config-ibexa removal change this? - -Recipe appends a command to `composer.json`'s `auto-scripts`. -You have to manually resort the commands so the `tsconfig.json` file -is created by `yarn ibexa-generate-tsconfig` -before being used by `ibexa:encore:compile`. -Your `auto-scripts` entry should look like this: - -```json - "auto-scripts": { - "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd", - "yarn install": "script", - "ibexa:encore:compile --config-name app": "symfony-cmd", - "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd", - "yarn ibexa-generate-tsconfig": "script", - "ibexa:encore:compile": "symfony-cmd" - }, -``` - #### Remove Ibexa Icons Remove from your `config/bundles.php` the line about `IbexaIconsBundle`. From 77368b35dda827e08475e04c7c3a57bdae4dece0 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:07:08 +0200 Subject: [PATCH 29/49] update_to_5.0.md: yarn ibexa-generate-tsconfig needed anyway --- .../from_4.6/update_to_5.0.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 25cfe0b0f3..cac8f1fa9c 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -214,6 +214,26 @@ composer recipes:install symfony/webpack-encore-bundle --reset --force --yes composer recipes:install ibexa/commerce --reset --force --yes ``` +#### Sort commands + +Recipe appends a command to `composer.json`'s `auto-scripts`. +You have to manually resort the commands so the `tsconfig.json` file +is created by `yarn ibexa-generate-tsconfig` +before being used by `ibexa:encore:compile`. +Your `auto-scripts` entry should look like this: + +```json + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd", + "yarn install": "script", + "ibexa:encore:compile --config-name app": "symfony-cmd", + "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd", + "yarn ibexa-generate-tsconfig": "script", + "ibexa:encore:compile": "symfony-cmd" + }, +``` + #### Remove Ibexa Icons Remove from your `config/bundles.php` the line about `IbexaIconsBundle`. From f6e00fd55271c103375a9b86983ed5570a9582d8 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:08:37 +0200 Subject: [PATCH 30/49] update_to_5.0.md: Move to SF 7.3 --- .../from_4.6/update_to_5.0.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index cac8f1fa9c..99e772cae9 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -103,7 +103,7 @@ rm -r config/graphql #### Update package requirements -[[= product_name =]] 5.0 is based on Symfony 7.2 and both must be updated. +[[= product_name =]] 5.0 is based on Symfony 7.3 and both must be updated. Your development package must be updated as well. The process example below considers [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` as installed. @@ -125,22 +125,22 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p # Update required PHP version composer require --no-update 'php:>=8.3'; # Update required Symfony version - composer config extra.symfony.require '7.2.*' + composer config extra.symfony.require '7.3.*' # Upgrade Ibexa and Symfony packages: application composer require --no-update \ ibexa/commerce:[[= latest_tag_5_0 =]] \ - symfony/console:^7.2 \ - symfony/dotenv:^7.2 \ - symfony/framework-bundle:^7.2 \ - symfony/runtime:^7.2 \ - symfony/yaml:^7.2 \ + symfony/console:^7.3 \ + symfony/dotenv:^7.3 \ + symfony/framework-bundle:^7.3 \ + symfony/runtime:^7.3 \ + symfony/yaml:^7.3 \ ; # Upgrade Ibexa and Symfony packages: development tools ddev composer require --dev --no-update \ ibexa/rector:[[= latest_tag_5_0 =]] \ - symfony/debug-bundle:^7.2 \ - symfony/stopwatch:^7.2 \ - symfony/web-profiler-bundle:^7.2 \ + symfony/debug-bundle:^7.3 \ + symfony/stopwatch:^7.3 \ + symfony/web-profiler-bundle:^7.3 \ ; # Update packages / Install new dependencies ddev composer update --with-all-dependencies --no-scripts --verbose @@ -530,7 +530,7 @@ TODO: `AsCommand` attribute; Rector doesn't move `parent::__construct('app:test' In the following example, you can see optimization thanks to the following features: - [Constructor parameter promoted as properties](https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion) (available since PHP 8.0) -- [`AsCommand` attribute to register a command](https://symfony.com/doc/7.2/console.html#console_registering-the-command) (available since Symfony 6.2) +- [`AsCommand` attribute to register a command](https://symfony.com/doc/7.3/console.html#console_registering-the-command) (available since Symfony 6.2) ```diff +#[AsCommand(name: 'app:test', description: 'Command to test something.')] From e5129b858297cc5b6c62f34ffefb08148ba1ef7b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:25:47 +0200 Subject: [PATCH 31/49] update_to_5.0.md: Update yarn ibexa-generate-tsconfig --- docs/update_and_migration/from_4.6/update_to_5.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 99e772cae9..23839d0a73 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -227,13 +227,15 @@ Your `auto-scripts` entry should look like this: "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd", "yarn install": "script", + "yarn ibexa-generate-tsconfig --relative-paths": "script", "ibexa:encore:compile --config-name app": "symfony-cmd", "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd", - "yarn ibexa-generate-tsconfig": "script", "ibexa:encore:compile": "symfony-cmd" }, ``` +TODO: https://github.com/ibexa/recipes-dev/blob/master/ibexa/commerce/5.0/manifest.json#L168 VS https://github.com/ibexa/recipes/blob/master/ibexa/commerce/5.0/manifest.json#L168 + #### Remove Ibexa Icons Remove from your `config/bundles.php` the line about `IbexaIconsBundle`. From 18e0b45fc2e3f701f64d3c6925e6cda66e648c8d Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:16:40 +0200 Subject: [PATCH 32/49] update_to_5.0.md: JS Transform module --- .../from_4.6/update_to_5.0.md | 419 ++++++++++++++++-- 1 file changed, 379 insertions(+), 40 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 23839d0a73..6f9007bccc 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -25,7 +25,9 @@ It supports only PHP 8.3 and above. ### Update custom code for PHP 8.3+ and DXP 4.6 -Rector helps to upgrade your code. +It's important to stop using deprecated PHP classes as they're removed in 5.0. + +[Rector](https://getrector.com/) and the Ibexa rule sets help to upgrade your code. Install [`ibexa/rector`](https://github.com/ibexa/rector) which contains rules to ensure custom code is up to date with DXP 4.6: @@ -34,13 +36,13 @@ composer require --dev ibexa/rector ``` Customize the `rector.php` config file. -Make is match your directory structure (for example, you may have to remove the `tests` directory). +Make it match your directory structure (for example, you may have to remove the `tests` directory). You can add rules [for PHP with `withPhpSets`](https://getrector.com/documentation/set-lists#content-php-sets) or [for Symfony with `withComposerBased`](https://getrector.com/blog/introducing-composer-version-based-sets). It's recommended to activate one rule set at a time, run a first time with the `--dry-run` option, check the output, and decide if kept right now, or discarded for another time. -TODO: Can it be kept for another time or will it break? -Your configuration could look like the following: + +Your configuration could look like the following example: ```php return RectorConfig::configure() @@ -93,8 +95,6 @@ rm config/routes.yaml 4.6 GraphQL isn't compatible with 5.0 so delete it. -TODO: Is `@=resolver` to `@=query` change need to be detailed? - ```bash rm -r config/graphql ``` @@ -110,13 +110,51 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p === "[[= product_name_headless =]]" ```bash - TODO + # Update required PHP version + composer require --no-update 'php:>=8.3'; + # Update required Symfony version + composer config extra.symfony.require '7.3.*' + # Upgrade Ibexa and Symfony packages: application + composer require --no-update \ + ibexa/headless:[[= latest_tag_5_0 =]] \ + symfony/console:^7.3 \ + symfony/dotenv:^7.3 \ + symfony/framework-bundle:^7.3 \ + symfony/runtime:^7.3 \ + symfony/yaml:^7.3 \ + ; + # Upgrade Ibexa and Symfony packages: development tools + composer require --dev --no-update \ + ibexa/rector:[[= latest_tag_5_0 =]] \ + symfony/debug-bundle:^7.3 \ + symfony/stopwatch:^7.3 \ + symfony/web-profiler-bundle:^7.3 \ + ; ``` === "[[= product_name_exp =]]" ```bash - TODO + # Update required PHP version + composer require --no-update 'php:>=8.3'; + # Update required Symfony version + composer config extra.symfony.require '7.3.*' + # Upgrade Ibexa and Symfony packages: application + composer require --no-update \ + ibexa/experience:[[= latest_tag_5_0 =]] \ + symfony/console:^7.3 \ + symfony/dotenv:^7.3 \ + symfony/framework-bundle:^7.3 \ + symfony/runtime:^7.3 \ + symfony/yaml:^7.3 \ + ; + # Upgrade Ibexa and Symfony packages: development tools + composer require --dev --no-update \ + ibexa/rector:[[= latest_tag_5_0 =]] \ + symfony/debug-bundle:^7.3 \ + symfony/stopwatch:^7.3 \ + symfony/web-profiler-bundle:^7.3 \ + ; ``` === "[[= product_name_com =]]" @@ -136,14 +174,12 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p symfony/yaml:^7.3 \ ; # Upgrade Ibexa and Symfony packages: development tools - ddev composer require --dev --no-update \ + composer require --dev --no-update \ ibexa/rector:[[= latest_tag_5_0 =]] \ symfony/debug-bundle:^7.3 \ symfony/stopwatch:^7.3 \ symfony/web-profiler-bundle:^7.3 \ ; - # Update packages / Install new dependencies - ddev composer update --with-all-dependencies --no-scripts --verbose ``` #### Remove 4.6 LTS Updates constraints @@ -155,7 +191,7 @@ so you don't have to maintain which of their versions your composer.json is refe TODO: Test the following command ```bash -composer remove --no-update \ +composer remove --no-update --no-scripts \ ibexa/connector-ai \ ibexa/collaboration \ ibexa/share \ @@ -177,8 +213,6 @@ composer config --unset extra.runtime.error_handler It's time to apply the new composer.json and update the dependencies: -TODO: 🤞 - ```bash composer update --with-all-dependencies --no-scripts ``` @@ -263,6 +297,8 @@ The main schema has changed and the provided SQL file `ibexa-4.6.latest-to-5.0.0 psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql ``` +As this is made for the Commerce edition, you may encounter unimportant errors on other editions which can be ignored. + Many tables and columns are renamed. If you have custom code directly querying those, you will need to update them. @@ -272,7 +308,7 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. TODO: Keep up-to-date - | old name | new name | + | Old name | New name | |:------------------------------------------------------|:------------------------------------------------------------------------| | ezbinaryfile | ibexa_binary_file | | ezcobj_state | ibexa_object_state | @@ -395,8 +431,6 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. #### Install collaboration -TODO: collaboration will be out as a regular part of 5.0 before being released as a 4.6 LTS Update - === "MySQL" ```bash @@ -467,11 +501,19 @@ But, optionally, if you are using GraphQL in your project, generate its schema: php bin/console ibexa:graphql:generate-schema ``` +### Update search indexes + +``` +php bin/console ibexa:reindex +``` + ### Update custom code for [[= product_name =]] 5.0 #### Update PHP framework standards -TODO: Merge up / deduplicate with DXP 4.6 / Symfony 5.4 usage of Rector above… +Among other things, +previously deprecated classes have been removed, +and the type hinting strictness has been increased. Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set. If you didn't edit it the first time, you can run its recipe: @@ -484,6 +526,7 @@ You can add some other rule sets (like, for example, the Symfony ones) to match Again, it's recommended to activate one set at a time, run a first time with the `--dry-run` option, check the output, and decide if kept right now, or discarded for another time. +As the gap is larger, many rules can be considered, see a selection in the example below. ```php //… @@ -525,10 +568,6 @@ use Rector\Symfony\Set\SensiolabsSetList; ); ``` -TODO: Among other things, the type hinting strictness has been increased. - -TODO: `AsCommand` attribute; Rector doesn't move `parent::__construct('app:test');` into `AsCommand`? - In the following example, you can see optimization thanks to the following features: - [Constructor parameter promoted as properties](https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion) (available since PHP 8.0) @@ -555,6 +594,63 @@ In the following example, you can see optimization thanks to the following featu protected function execute(InputInterface $input, OutputInterface $output): int ``` +#### Update JavaScript + +If you haven't renamed your Webpack file since 3.3, +you have to do it as 5.0 doesn't support the old names like 4.6 does. + +| Old name | New name | +|:----------------------------|:-------------------------------| +| ez.config.js | ibexa.config.js | +| ez.config.manager.js | ibexa.config.manager.js | +| ez.webpack.custom.config.js | ibexa.webpack.custom.config.js | + +`ibexa/rector` 5.0 also come with the [JavaScript Transform module](https://github.com/ibexa/rector/blob/v5.0.0/js/README.md) to help you maintain your JS. + +Customize the `rector.config.js` config file. +Make it match your directory structure. Eventually modify the enabled plugin list. + +The example below is made to fix in place the JS files from `asset/js/` directory, +and is ready to enable plugin rule sets one at a time (plugin path is relative to `vendor/ibexa/rector/` directory). + +```js +module.exports = { + config: { + paths: [ + { + input: 'assets/js', + output: 'assets/js', + }, + ], + }, + plugins: (plugins) => { + return [ + './js/ibexa-rename-ez-global.js', + //'./js/ibexa-rename-variables.js', + //'./js/ibexa-rename-string-values.js', + //'./js/ibexa-rename-trans-id.js', + //'./js/ibexa-rename-in-translations.js', + //'./js/ibexa-rename-icons.js', + ]; + }, + pluginsConfig: (config) => { + return config; + }, +}; +``` + +Install the tool dependencies once with the following command: + +``` +yarn --cwd ./vendor/ibexa/rector/js install +``` + +Run it: + +``` +yarn --cwd ./vendor/ibexa/rector/js transform +``` + #### Update field type identifiers Several field type identifiers have changed. @@ -604,28 +700,271 @@ The output as an `alias` column with new identifiers and a `legacy_alias` column | ezurl | ibexa_url | | ezuser | ibexa_user | +You may have to update them in several places. -- Update in template - - TODO: `{% block ezstring_field %)` → `{% block ibexa_string_field %}` (content_fields.html.twig) and others (field edit, field def, field def edit,…) - - TODO: Configs, template paths, template rules, whatever needed… +- Update in templates to display or edit fields or their definition. For example, in a `@IbexaCore/content_fields.html.twig` extension, `{% block ezstring_field %)` must be changed for `{% block ibexa_string_field %}`. - Update in migration files -- TODO: Update in DB? -### Update search indexes +#### Update icons -TODO: Earlier? +The names of the provided icons have changed. +`ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` deals with those changes in JavaScript. +You may have to update them in other contexts like config files associating icons to content types or page builder blocks. -TODO: For Solr and Elasticsearch, it seems that the schema/config/template haven't changed. -TODO: Is a re-index needed? Maybe not either. +You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). +??? note "Icons renaming map" + + | Old name | New name | + |:------------------------|:-----------------------------| + | about-info | help | + | about | info-square | + | airtime | signal-radio | + | align-center | align-text-center | + | align-justify | align-text-justified | + | align-left | align-text-left | + | align-right | align-text-right | + | approved | check-circle | + | article | file-text | + | assign-section | assign | + | author | user-editor | + | autosave-error | cloud-error | + | autosave-off | cloud-discard | + | autosave-on | cloud | + | autosave-saved | cloud-check | + | autosave-saving | cloud-synch | + | b2b | handshake | + | back | arrow-left | + | back-current-date | calendar-back | + | bestseller | badge-star | + | block-invisible | block-hidden | + | block-visible-recurring | block-lock | + | blog | app-blog | + | blog_post | note-blog | + | bold | text-bold | + | bookmark | favourite-outline | + | bookmark-active | favourite-filled | + | bookmark-manager | book | + | box-collapse | arrow-move-right | + | browse | folder-browse | + | bubbles | message-bubble | + | business-deal-cash | user-money | + | button | cursor-clicked | + | campaign | speaker | + | captcha | form-captcha | + | caret-back | arrow-chevron-left | + | caret-double-back | arrow-double-left | + | caret-double-next | arrow-double-right | + | caret-down | arrow-chevron-down | + | caret-expanded | arrow-double-left | + | caret-next | arrow-chevron-right | + | caret-up | arrow-chevron-up | + | cart | shopping-cart | + | cart-full | shopping-cart | + | cart-upload | shopping-cart-arrow-up | + | cart-wishlist | shopping-cart-heart | + | category | tag | + | checkbox | form-checkbox | + | checkbox-multiple | form-check-list | + | checkmark | form-check | + | circle-caret-down | chevron-down-circle | + | circle-caret-left | chevron-left-circle | + | circle-caret-right | chevron-right-circle | + | circle-caret-up | chevron-up-circle | + | circle-close | discard-circle | + | circle-create | add-circle | + | circle-minus | minus-circle | + | circle-pause | minus-circle | + | clicked-recommendations | cursor-clicked-hand | + | clipboard | clipboard-check | + | collapse | arrow-collapse-right | + | content-write | file-text-write | + | column-settings | table-settings-column | + | comment | message | + | components | box-component | + | connect | connection | + | content-draft | draft | + | contentlist | list-content | + | content-list | list-content | + | content-type | tools | + | content-type-content | file-type | + | content-type-group | tool-group | + | copy-subtree | content-tree-copy | + | create | add | + | create-content | file-add | + | create-location | content-tree-create-location | + | customer | user-customer | + | customer-portal | device-monitor-user | + | customer-portal-page | app-user | + | customer-type | device-monitor-type | + | custom_tags | prompt | + | date | calendar | + | date-updated | calendar-reload | + | discount-coupon | discount-ticket | + | drafts | edit-draft | + | dropdown | form-dropdown | + | earth-access | world-cursor | + | embed | text-embedded | + | embed-inline | text-embedded-inline | + | erp | connection-erp | + | error | exclamation-mark | + | error-icon | file-warning | + | expand-left | arrow-expand-left | + | expand-right | arrow-expand-right | + | explore | ai | + | fields | form-input | + | file-video | video | + | flash | lightning | + | focus | arrows-outside | + | focus-image | focus-target | + | folder-empty | folder-open | + | form | form-check-square | + | full-view | arrows-full-view | + | future-publication | calendar-clock | + | gallery | image-gallery | + | go-right | arrow-to-right | + | go-to-root | content-tree-arrow-up | + | go-up | arrow-to-up | + | h1 | header-1 | + | h2 | header-2 | + | h3 | header-3 | + | h4 | header-4 | + | h5 | header-5 | + | h6 | header-6 | + | hide | visibility-hidden | + | hierarchy | hierarchy-site-map | + | history-file | file-history | + | 'home-page' | home | + | image-center | align-block-center | + | image-editor | image-edit | + | image-left | align-block-left | + | image-right | align-block-right | + | image-variations | image-focus | + | imported-items | database-synch | + | information | info-square | + | input-hidden | form-input-hidden | + | input-line | form-input-single-line | + | input-line-multiple | form-input-multi-line | + | input-number | form-input-number | + | interface-block | forbidden | + | italic | text-italic | + | keyword | hash | + | landing_page | layout-navbar | + | landingpage-add | layout-navbar-add | + | landingpage-preview | layout-navbar-visible | + | languages | world | + | languages-add | world-add | + | last-purchased | cursor-clicked-hand | + | last-viewed | app-recent | + | layout-manager | layout | + | link-content | file-link | + | link-remove | unlink | + | list | list-bullet | + | list-numbered | list-number | + | localize | target-location | + | location-add-new | content-tree-create-location | + | lock-unlock | unlock | + | logout | log-out | + | maform | chart-histogram | + | mail | message-email | + | mail-open | message-email-read | + | markup | file-code | + | menu | menu-hamburger | + | move | folder-open-move | + | newsletter | news | + | notice | alert-error | + | open-newtab | open-new-window | + | open-sametab | open-same-window | + | options | more | + | order-history | file-history | + | order-management | receipt-settings | + | order-status | product-search | + | panels | view-panels | + | paragraph | text-paragraph | + | paragraph-add | text-paragraph-add | + | pdf-file | file-pdf | + | personalize | user-target | + | personalize-block | file-settings | + | personalize-content | tag-settings | + | pin-unpin | unpin | + | place | pin-location | + | places | pins-locations | + | portfolio | suitcase | + | previewed | overdue | + | product-category | product-tag | + | product-list | clipboard-list | + | product_list | clipboard-list | + | product-low | product-arrow-down | + | product type | product-collection | + | product-type | product-collection | + | profile | user-profile | + | publish | rocket | + | publish-later | calendar-number | + | publish-later-cancel | calendar-discard | + | publish-later-create | calendar-add | + | qa-content | qa-file | + | qa-form | qa-form-check | + | radio-button | form-radio | + | radio-button-multiple | form-radio-list | + | rate | stars | + | rate-review | star-circle | + | recent-activity | activity-clock | + | recently-added | history | + | recommendation-calls | arrows-circle | + | redo | action-redo | + | refresh | arrows-reload | + | rejected | arrow-to-down-circle | + | relations | hierarchy-square | + | restore | arrow-restore | + | restore-parent | content-tree-restore-parent | + | review | message-edit | + | roles | user-id | + | rss | signal-rss | + | schedule | calendar-schedule | + | sections | database | + | send-email | send | + | settings-block | settings | + | settings-config | settings-configure | + | sites-all | sites | + | spinner | arrow-rotate | + | stats | chart-dots | + | strikethrough | text-strikethrough | + | subscriber | user-mail | + | subscript | text-subscript | + | superscript | text-superscript | + | swap | arrows-synchronize | + | system-information | info-circle | + | trash-empty | trash-discard | + | trash-notrashed | trash-open | + | underscore | text-underline | + | undo | action-undo | + | un-focus | arrows-inside | + | un-full-view | arrows-full-view-out | + | upload-image | image-upload | + | user-blocked | user-block | + | user_group | user-group | + | users-personalization | user-focus | + | user-recycle | arrows-reload-user | + | users-select | users-add | + | user-tick | user-check | + | version-compare | action-compare-versions | + | version-compare-action | action-compare | + | versions | archived-version | + | vertical-left-right | arrow-collapse-expand | + | view | visibility | + | view-desktop | device-monitor | + | view-hide | visibility-hidden | + | view-mobile | device-mobile | + | view-tablet | device-tablet | + | warning | alert-warning | + | warning-triangle | alert-warning | + +```diff+yaml + ibexa_fieldtype_page: + blocks: + event: + name: About Block + category: Custom +- thumbnail: /bundles/ibexaicons/img/all-icons.svg#about ++ thumbnail: /bundles/ibexaicons/img/all-icons.svg#info-square ``` -php bin/console ibexa:reindex -``` - -#### Update Back Office extensions - -TODO: Update JS, templates, CSS… -TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 -TODO: Conversion tables -TODO: Icons -TODO: Shared with front? From 2eaca6c832b9d79b4b500db16cdae1b2cebbd2c3 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:50:01 +0200 Subject: [PATCH 33/49] update_to_5.0.md: self review --- .../from_4.6/update_to_5.0.md | 53 ++++++++----------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 6f9007bccc..35d50cb3be 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -67,10 +67,11 @@ php vendor/bin/rector --dry-run ### Move from annotation to attribute -Delete [`config/routes/annotations.yaml`](https://github.com/symfony/recipes/blob/main/doctrine/annotations/1.0/config/routes/annotations.yaml) if you haven't customised it. +Delete [`config/routes/annotations.yaml`](https://github.com/symfony/recipes/blob/main/doctrine/annotations/1.0/config/routes/annotations.yaml) +if you haven't customized it. -If you have customized it, you have to move from `type: annotation` to `type: attribute`. -TODO: Any help or recommendation to provide to the reader? Rector? +If you have customized it, +you have to move from `type: annotation` to `type: attribute`. The `config/routes.yaml` file should start with the following declaration from [its recipe](https://github.com/symfony/recipes/blob/main/symfony/routing/7.0/config/routes.yaml): @@ -82,18 +83,13 @@ controllers: type: attribute ``` -- You can delete the file and let the recipe recreate it. Then, if you have customized it, merge with your previous version from your version system. -- Or edit the file and copy-paste the new declaration at top of it. - - -```bash -rm config/routes/annotations.yaml -rm config/routes.yaml -``` +- You can delete the file and let the recipe recreate it. + Then, if you have eventually customized it, merge with your previous version from your version system. +- Or edit the file and copy-paste the new declaration on top of it. ### Remove GraphQL schema -4.6 GraphQL isn't compatible with 5.0 so delete it. +4.6 GraphQL schema isn't compatible with 5.0 so delete it, for example, with the following command: ```bash rm -r config/graphql @@ -106,6 +102,7 @@ rm -r config/graphql [[= product_name =]] 5.0 is based on Symfony 7.3 and both must be updated. Your development package must be updated as well. The process example below considers [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` as installed. +Notice that it uses the `--no-update` option to only edit the composer.json, to not run package installation, and to not run scripts until all necessary changes are made. === "[[= product_name_headless =]]" @@ -188,10 +185,10 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p You can now remove them from your composer.json so you don't have to maintain which of their versions your composer.json is referring to. -TODO: Test the following command +For example, the following command removes several formerly LTS Update packages from `composer.json: ```bash -composer remove --no-update --no-scripts \ +composer remove --no-update \ ibexa/connector-ai \ ibexa/collaboration \ ibexa/share \ @@ -223,7 +220,7 @@ To help moving from Symfony's Webpack Encore bundle 1.x to 2.x, delete the Stimulus bootstrap file and reset Webpack Encore recipe: -``` +```bash rm assets/bootstrap.js composer recipes:install symfony/webpack-encore-bundle --reset --force --yes ``` @@ -268,8 +265,6 @@ Your `auto-scripts` entry should look like this: }, ``` -TODO: https://github.com/ibexa/recipes-dev/blob/master/ibexa/commerce/5.0/manifest.json#L168 VS https://github.com/ibexa/recipes/blob/master/ibexa/commerce/5.0/manifest.json#L168 - #### Remove Ibexa Icons Remove from your `config/bundles.php` the line about `IbexaIconsBundle`. @@ -297,7 +292,7 @@ The main schema has changed and the provided SQL file `ibexa-4.6.latest-to-5.0.0 psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql ``` -As this is made for the Commerce edition, you may encounter unimportant errors on other editions which can be ignored. +As this is made for all the editions at once, you may encounter unimportant errors on other editions which can be ignored. Many tables and columns are renamed. If you have custom code directly querying those, you will need to update them. @@ -305,8 +300,6 @@ If you have custom code directly querying those, you will need to update them. You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ??? note "Tables and columns renaming map" - - TODO: Keep up-to-date | Old name | New name | |:------------------------------------------------------|:------------------------------------------------------------------------| @@ -390,8 +383,6 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. | ezuser_role | ibexa_user_role | | ezuser_setting | ibexa_user_setting | - TODO: Something about renamed indexes? - ??? note "DFS (Distributed File System)" If [DFS IO handler](clustering.md#dfs-io-handler) is used and, as recommended, its table is on its own database, you'll have to rename table and columns there. @@ -405,8 +396,6 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_mtime TO ibexa_dfs_file_mtime; ``` -TODO: Compatibility "views" layers? Even if there is this layer to save time, it is recommended to update your code to use the new tables. - ### Install new features' schemas Features which were optional 4.6 LTS Updates are now part of 5.0.0. @@ -503,7 +492,9 @@ php bin/console ibexa:graphql:generate-schema ### Update search indexes -``` +Ensure your index are up to date with the following command: + +```bash php bin/console ibexa:reindex ``` @@ -641,13 +632,13 @@ module.exports = { Install the tool dependencies once with the following command: -``` +```bash yarn --cwd ./vendor/ibexa/rector/js install ``` -Run it: +Run it using the following command: -``` +```bash yarn --cwd ./vendor/ibexa/rector/js transform ``` @@ -707,9 +698,9 @@ You may have to update them in several places. #### Update icons -The names of the provided icons have changed. +The names of the icons provided in `all-icons.svg` have changed. `ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` deals with those changes in JavaScript. -You may have to update them in other contexts like config files associating icons to content types or page builder blocks. +You may have to update them in other contexts like, for example, config files associating icons to content types or page builder blocks. You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). @@ -959,6 +950,8 @@ You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.confi | warning | alert-warning | | warning-triangle | alert-warning | +The following example illustrates the update of a custom page block's icon: + ```diff+yaml ibexa_fieldtype_page: blocks: From 2e2b08947d84c73b1b159d6b98a96071cc89317b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 16 Jul 2025 15:14:06 +0200 Subject: [PATCH 34/49] update_ibexa_dxp.md: Fix Ibexa.EOLWhitespace --- docs/update_and_migration/update_ibexa_dxp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/update_and_migration/update_ibexa_dxp.md b/docs/update_and_migration/update_ibexa_dxp.md index 5a90b91bbc..3f7c4e9b67 100644 --- a/docs/update_and_migration/update_ibexa_dxp.md +++ b/docs/update_and_migration/update_ibexa_dxp.md @@ -33,7 +33,7 @@ To update [[= product_name =]] to a newer version, select the version you're cur - If you have a v4.x installation prior to v4.6, [update to the v4.6 LTS](from_4.5/update_from_4.5.md). - If you have a v4.6 installation, (update to the latest patch v[[= latest_tag_4_6 =]])(from_4.6/update_from_4.6.md). - + Afterwards, it's strongly recommended to also [update to the lastest v5.0 LTS](from_4.6/update_to_5.0.md). === "I am using v5.0" From a0ac8af144f5dd30daf86c7481bb2b8006fc0caa Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 16 Jul 2025 15:29:24 +0200 Subject: [PATCH 35/49] Apply vale suggestions --- .../from_4.6/update_to_5.0.md | 16 +++++++--------- .../from_5.0/update_from_5.0.md | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 35d50cb3be..422121ef6d 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -27,7 +27,7 @@ It supports only PHP 8.3 and above. It's important to stop using deprecated PHP classes as they're removed in 5.0. -[Rector](https://getrector.com/) and the Ibexa rule sets help to upgrade your code. +[Rector](https://getrector.com/) and the [[= product_name_base =]] rule sets help to upgrade your code. Install [`ibexa/rector`](https://github.com/ibexa/rector) which contains rules to ensure custom code is up to date with DXP 4.6: @@ -183,7 +183,7 @@ Notice that it uses the `--no-update` option to only edit the composer.json, to 4.6 LTS Update packages are included by default in 5.0. You can now remove them from your composer.json -so you don't have to maintain which of their versions your composer.json is referring to. +so you don't have to maintain which of their versions your composer.json is referring to. For example, the following command removes several formerly LTS Update packages from `composer.json: @@ -300,7 +300,6 @@ If you have custom code directly querying those, you will need to update them. You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ??? note "Tables and columns renaming map" - | Old name | New name | |:------------------------------------------------------|:------------------------------------------------------------------------| | ezbinaryfile | ibexa_binary_file | @@ -402,7 +401,7 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. * If you have already installed the feature, its schema has been updated by the previous step. * If you haven't installed the feature, you need to add its schema to your database. -* If you mistakenly reinstall a schema, no worries, you will encounter a "Table already exists" error which can be ignored. +* If you mistakenly reinstall a schema, no worries, you encounter "Table already exists" errors which can be ignored. #### Install AI actions schema @@ -483,7 +482,7 @@ php bin/console ibexa:migrations:migrate --file=2025_07_08_09_27_set_container_t ### Generate GraphQL schema -4.6's Back Office uses GraphQL while 5.0's one doesn't. +4.6's back office uses GraphQL while 5.0's one doesn't. But, optionally, if you are using GraphQL in your project, generate its schema: ```bash @@ -555,7 +554,7 @@ use Rector\Symfony\Set\SensiolabsSetList; // strictBooleans: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-strict-booleans rectorPreset: true, symfonyCodeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-code-quality - symfonyConfigs: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-configs + symfonyConfigs: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-configs ); ``` @@ -693,19 +692,18 @@ The output as an `alias` column with new identifiers and a `legacy_alias` column You may have to update them in several places. -- Update in templates to display or edit fields or their definition. For example, in a `@IbexaCore/content_fields.html.twig` extension, `{% block ezstring_field %)` must be changed for `{% block ibexa_string_field %}`. +- Update in templates to display or edit fields or their definition. For example, in a `@IbexaCore/content_fields.html.twig` extension, `{% block ezstring_field %)` must be changed for `{% block ibexa_string_field %}` - Update in migration files #### Update icons The names of the icons provided in `all-icons.svg` have changed. `ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` deals with those changes in JavaScript. -You may have to update them in other contexts like, for example, config files associating icons to content types or page builder blocks. +You may have to update them in other contexts like, for example, config files associating icons to content types or Page Builder blocks. You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). ??? note "Icons renaming map" - | Old name | New name | |:------------------------|:-----------------------------| | about-info | help | diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index cde6899044..70d074c763 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -5,7 +5,7 @@ month_change: true # Update from v5.0.x to v5.0.latest -Ibexa DXP v5.0.0 is the latest version for now. If you have it, you're update-to-date. +[[= product_name =]] v5.0.0 is the latest version for now. If you have it, you're update-to-date. Come back to this page later to discover if some patch has been released and how to install it. To update from v4.6.x, see [Update from v4.6 to v5.0](update_to_5.0.md). From 1581f3c9e7677e49a87dcfcf8e05f9f3f25605a6 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 18 Jul 2025 16:36:45 +0200 Subject: [PATCH 36/49] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marek Nocoń --- .../from_4.6/update_to_5.0.md | 99 ++++++++++--------- .../from_5.0/update_from_5.0.md | 6 +- docs/update_and_migration/update_ibexa_dxp.md | 3 +- 3 files changed, 55 insertions(+), 53 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 422121ef6d..9d4ef81ae9 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -11,7 +11,7 @@ Before you update to v5.0, you need to [update to the latest maintenance release ### Move from old to new Commerce -If circa v4.3 you kept [deprecated old Commerce packages](update_from_4.3_old_commerce.md), +If you've chosen to use the [deprecated Commerce packages](update_from_4.3_old_commerce.md) during the update to 4.4, you have to move to [new Commerce ones](update_from_4.3_new_commerce.md). ## Update from v4.6.latest to v5.0.0 @@ -35,12 +35,14 @@ Install [`ibexa/rector`](https://github.com/ibexa/rector) which contains rules t composer require --dev ibexa/rector ``` -Customize the `rector.php` config file. -Make it match your directory structure (for example, you may have to remove the `tests` directory). -You can add rules [for PHP with `withPhpSets`](https://getrector.com/documentation/set-lists#content-php-sets) -or [for Symfony with `withComposerBased`](https://getrector.com/blog/introducing-composer-version-based-sets). -It's recommended to activate one rule set at a time, run a first time with the `--dry-run` option, -check the output, and decide if kept right now, or discarded for another time. +Customize the `rector.php` config file by: + +- making it match your directory structure (for example, you may not have the `tests` directory) +- adding project-specific rules: + - specify [PHP rules by using `withPhpSets`](https://getrector.com/documentation/set-lists#content-php-sets) + - specify [Symfony, Twig, or Doctrine rules by using `withComposerBased`](https://getrector.com/documentation/composer-based-sets). + +It's recommended to activate one rule set at a time and preview the output by running Rector with the `--dry-run` option to decide which rulesets should be used and in which order. Your configuration could look like the following example: @@ -60,7 +62,7 @@ return RectorConfig::configure() ->withComposerBased(symfony: true) ; ``` - +Run the following command to preview the changes done by Rector: ```bash php vendor/bin/rector --dry-run ``` @@ -71,9 +73,9 @@ Delete [`config/routes/annotations.yaml`](https://github.com/symfony/recipes/blo if you haven't customized it. If you have customized it, -you have to move from `type: annotation` to `type: attribute`. +change all occurrences of `type: annotation` to `type: attribute`. -The `config/routes.yaml` file should start with the following declaration from [its recipe](https://github.com/symfony/recipes/blob/main/symfony/routing/7.0/config/routes.yaml): +The `config/routes.yaml` file should start with the following declaration from the [Symfony recipe](https://github.com/symfony/recipes/blob/main/symfony/routing/7.0/config/routes.yaml): ```yaml controllers: @@ -83,13 +85,12 @@ controllers: type: attribute ``` -- You can delete the file and let the recipe recreate it. - Then, if you have eventually customized it, merge with your previous version from your version system. -- Or edit the file and copy-paste the new declaration on top of it. +You can add the new declaration to the top of the file manually, or recreate the file by running `composer sync-recipes symfony/routing --force --reset` ### Remove GraphQL schema -4.6 GraphQL schema isn't compatible with 5.0 so delete it, for example, with the following command: +The GraphQL schema used in 4.6 isn't compatible with version 5.0 and must be deleted. +You can do it, for example, with the following command: ```bash rm -r config/graphql @@ -101,8 +102,9 @@ rm -r config/graphql [[= product_name =]] 5.0 is based on Symfony 7.3 and both must be updated. Your development package must be updated as well. -The process example below considers [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` as installed. -Notice that it uses the `--no-update` option to only edit the composer.json, to not run package installation, and to not run scripts until all necessary changes are made. +The example below assumes that [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` are installed. +Adjust the list based on your project requirements. +Notice the use of the `--no-update` option to only edit the `composer.json` entries and avoid triggering the package update and Composer scripts. === "[[= product_name_headless =]]" @@ -182,16 +184,16 @@ Notice that it uses the `--no-update` option to only edit the composer.json, to #### Remove 4.6 LTS Updates constraints 4.6 LTS Update packages are included by default in 5.0. -You can now remove them from your composer.json -so you don't have to maintain which of their versions your composer.json is referring to. +Remove them from your composer.json to avoid updating their version manually with each update. -For example, the following command removes several formerly LTS Update packages from `composer.json: +For example, the following command removes all of the released LTS Updates for 4.6 from `composer.json`: ```bash composer remove --no-update \ ibexa/connector-ai \ - ibexa/collaboration \ - ibexa/share \ + ibexa/connector-openai \ + ibexa/product-catalog-date-time-attribute \ + ibexa/product-catalog-symbol-attribute/ ibexa/discounts \ ibexa/discounts-codes \ ; @@ -200,7 +202,7 @@ composer remove --no-update \ #### Remove PHP 8.2 error handler If you were using the [`Php82HideDeprecationsErrorHandler`](update_from_4.6.md#v468) to avoid deprecation messages, -you can remove it: +you must remove it: ```bash composer config --unset extra.runtime.error_handler @@ -247,8 +249,8 @@ composer recipes:install symfony/webpack-encore-bundle --reset --force --yes #### Sort commands -Recipe appends a command to `composer.json`'s `auto-scripts`. -You have to manually resort the commands so the `tsconfig.json` file +Executing the recipes appends a new command at the end`composer.json`'s `auto-scripts` section, resulting in incorrect script order. +You have to manually sort the commands so the `tsconfig.json` file is created by `yarn ibexa-generate-tsconfig` before being used by `ibexa:encore:compile`. Your `auto-scripts` entry should look like this: @@ -292,7 +294,7 @@ The main schema has changed and the provided SQL file `ibexa-4.6.latest-to-5.0.0 psql < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql ``` -As this is made for all the editions at once, you may encounter unimportant errors on other editions which can be ignored. +As this script targets all editions, on editions lower than Commerce you may encounter errors about missing tables which can safely be ignored. Many tables and columns are renamed. If you have custom code directly querying those, you will need to update them. @@ -385,7 +387,7 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ??? note "DFS (Distributed File System)" If [DFS IO handler](clustering.md#dfs-io-handler) is used and, as recommended, its table is on its own database, you'll have to rename table and columns there. - Here are the DFS renamming queries (extracted from `ibexa-4.6.latest-to-5.0.0.sql`): + Here are the DFS renaming queries (extracted from `ibexa-4.6.latest-to-5.0.0.sql`): ```sql ALTER TABLE ezdfsfile RENAME TO ibexa_dfs_file; @@ -401,7 +403,7 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. * If you have already installed the feature, its schema has been updated by the previous step. * If you haven't installed the feature, you need to add its schema to your database. -* If you mistakenly reinstall a schema, no worries, you encounter "Table already exists" errors which can be ignored. +* If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. #### Install AI actions schema @@ -482,8 +484,8 @@ php bin/console ibexa:migrations:migrate --file=2025_07_08_09_27_set_container_t ### Generate GraphQL schema -4.6's back office uses GraphQL while 5.0's one doesn't. -But, optionally, if you are using GraphQL in your project, generate its schema: +GraphQL usage is no longer required for the Ibexa DXP back office. +If you are using GraphQL in your project, you can generate its schema by running: ```bash php bin/console ibexa:graphql:generate-schema @@ -491,7 +493,7 @@ php bin/console ibexa:graphql:generate-schema ### Update search indexes -Ensure your index are up to date with the following command: +Ensure your search index is up to date with the following command: ```bash php bin/console ibexa:reindex @@ -512,11 +514,11 @@ If you didn't edit it the first time, you can run its recipe: composer recipe:install ibexa/rector --force --reset --yes ``` -You can add some other rule sets (like, for example, the Symfony ones) to match newer standards. +You can adjust the other rule sets (for example, the Symfony ones) to match higher versions. -Again, it's recommended to activate one set at a time, run a first time with the `--dry-run` option, -check the output, and decide if kept right now, or discarded for another time. -As the gap is larger, many rules can be considered, see a selection in the example below. +Again, it's recommended to activate one rule set at a time and preview the output by running Rector with the `--dry-run` option to decide which rulesets should be used and in which order. + +As this update spans across a broad range of versions, multiple rules can be considered as in the example below. ```php //… @@ -586,8 +588,7 @@ In the following example, you can see optimization thanks to the following featu #### Update JavaScript -If you haven't renamed your Webpack file since 3.3, -you have to do it as 5.0 doesn't support the old names like 4.6 does. +If you haven't renamed your Webpack file since 3.3, do it now as v5.0 no longer supports the old names. | Old name | New name | |:----------------------------|:-------------------------------| @@ -595,10 +596,12 @@ you have to do it as 5.0 doesn't support the old names like 4.6 does. | ez.config.manager.js | ibexa.config.manager.js | | ez.webpack.custom.config.js | ibexa.webpack.custom.config.js | -`ibexa/rector` 5.0 also come with the [JavaScript Transform module](https://github.com/ibexa/rector/blob/v5.0.0/js/README.md) to help you maintain your JS. +`ibexa/rector` 5.0 also comes with the [JavaScript Transform module](https://github.com/ibexa/rector/blob/v5.0.0/js/README.md) to help you maintain your JavaScript code. + +Customize the `rector.config.js` config file by: -Customize the `rector.config.js` config file. -Make it match your directory structure. Eventually modify the enabled plugin list. +- making it match your directory structure +- modifying the list of enabled plugins and their configuration The example below is made to fix in place the JS files from `asset/js/` directory, and is ready to enable plugin rule sets one at a time (plugin path is relative to `vendor/ibexa/rector/` directory). @@ -644,8 +647,7 @@ yarn --cwd ./vendor/ibexa/rector/js transform #### Update field type identifiers Several field type identifiers have changed. -Old identifiers are still supported, but it's recommended to migrate as soon as possible -and to include this action to the current version update task list. +The old identifiers are still supported, but it's recommended to migrate as soon as possible. You can list existing field type services with the command `php bin/console debug:container --tag=ibexa.field_type`. The output as an `alias` column with new identifiers and a `legacy_alias` column with the old identifiers. @@ -690,16 +692,17 @@ The output as an `alias` column with new identifiers and a `legacy_alias` column | ezurl | ibexa_url | | ezuser | ibexa_user | -You may have to update them in several places. +```suggestion +You may have to update them in several places, for example: -- Update in templates to display or edit fields or their definition. For example, in a `@IbexaCore/content_fields.html.twig` extension, `{% block ezstring_field %)` must be changed for `{% block ibexa_string_field %}` -- Update in migration files +- Update the field identifiers in templates to display or edit fields or their definition. For example, in a `@IbexaCore/content_fields.html.twig` extension, `{% block ezstring_field %)` must be changed for `{% block ibexa_string_field %}` +- Update the field identifiers in migration files #### Update icons -The names of the icons provided in `all-icons.svg` have changed. -`ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` deals with those changes in JavaScript. -You may have to update them in other contexts like, for example, config files associating icons to content types or Page Builder blocks. +The provided built-it icon set has been changed. +The `ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` refactors the icon usage in JavaScript files. +You may have to update them in other contexts, for example, in configuration files associating icons to content types or Page Builder blocks. You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). @@ -957,5 +960,5 @@ The following example illustrates the update of a custom page block's icon: name: About Block category: Custom - thumbnail: /bundles/ibexaicons/img/all-icons.svg#about -+ thumbnail: /bundles/ibexaicons/img/all-icons.svg#info-square ++ thumbnail: /bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg#info-square ``` diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index 70d074c763..8df53b0c19 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -5,8 +5,8 @@ month_change: true # Update from v5.0.x to v5.0.latest -[[= product_name =]] v5.0.0 is the latest version for now. If you have it, you're update-to-date. -Come back to this page later to discover if some patch has been released and how to install it. +[[= product_name =]] v5.0.0 is the latest version. +Revisit this page when a new bugfix release is available to stay up to date. To update from v4.6.x, see [Update from v4.6 to v5.0](update_to_5.0.md). -From an older version, explore [this section](update_ibexa_dxp.md). +To update from an older version, visit [the update page](update_ibexa_dxp.md) and choose the applicable path. diff --git a/docs/update_and_migration/update_ibexa_dxp.md b/docs/update_and_migration/update_ibexa_dxp.md index 3f7c4e9b67..3c791fb264 100644 --- a/docs/update_and_migration/update_ibexa_dxp.md +++ b/docs/update_and_migration/update_ibexa_dxp.md @@ -38,5 +38,4 @@ To update [[= product_name =]] to a newer version, select the version you're cur === "I am using v5.0" - If you're using [[= latest_tag_5_0 =]], You're update-to-date. - Monitor [this v5.0 update page](from_5.0/update_from_5.0.md) for futur patches. + Refer to the [v5.0 update page](from_5.0/update_from_5.0.md) to make sure you're staying up to date. From 9f4124af59a89f6b1ab6a54b2ce035a0aa635a54 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:23:50 +0200 Subject: [PATCH 37/49] Apply suggestions from code review --- docs/update_and_migration/from_4.6/update_to_5.0.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 9d4ef81ae9..5bc33055c8 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -263,7 +263,8 @@ Your `auto-scripts` entry should look like this: "yarn ibexa-generate-tsconfig --relative-paths": "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" + "ibexa:encore:compile": "symfony-cmd", + "ibexa:encore:compile --frontend-configs-name ibexa,internals,libs,richtext": "symfony-cmd" }, ``` @@ -507,7 +508,7 @@ Among other things, previously deprecated classes have been removed, and the type hinting strictness has been increased. -Update the `rector.php` file to use `IbexaSetList::IBEXA_50` rule set. +Update the `rector.php` file to use [`IbexaSetList::IBEXA_50`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Rector-Sets-IbexaSetList.html#enumcase_IBEXA_50) rule set. If you didn't edit it the first time, you can run its recipe: ```bash From ecc3c007df7c7bbb2b595266943305827f2ead2c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 11:47:04 +0200 Subject: [PATCH 38/49] update_to_5.0.md: outro DB backup warning Detailed icon update HTTP cache's VCL Ibexa Cloud Conclusion --- .../from_4.6/update_to_5.0.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 5bc33055c8..cdf698995d 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -281,6 +281,8 @@ composer run-script post-update-cmd ### Update database +[[% include 'snippets/update/db/db_backup_warning.md' %]] + The main schema has changed and the provided SQL file `ibexa-4.6.latest-to-5.0.0.sql` updates it: === "MySQL" @@ -693,7 +695,6 @@ The output as an `alias` column with new identifiers and a `legacy_alias` column | ezurl | ibexa_url | | ezuser | ibexa_user | -```suggestion You may have to update them in several places, for example: - Update the field identifiers in templates to display or edit fields or their definition. For example, in a `@IbexaCore/content_fields.html.twig` extension, `{% block ezstring_field %)` must be changed for `{% block ibexa_string_field %}` @@ -702,9 +703,13 @@ You may have to update them in several places, for example: #### Update icons The provided built-it icon set has been changed. + The `ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` refactors the icon usage in JavaScript files. You may have to update them in other contexts, for example, in configuration files associating icons to content types or Page Builder blocks. +The icon library file's path changed from `/bundles/ibexaicons/img/all-icons.svg` to `/bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg` + +Some icons have been renamed. You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). ??? note "Icons renaming map" @@ -963,3 +968,25 @@ The following example illustrates the update of a custom page block's icon: - thumbnail: /bundles/ibexaicons/img/all-icons.svg#about + thumbnail: /bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg#info-square ``` + +### Finalising + +#### HTTP Cache + +Use the newer VCL files. +Depending on your reverse proxy, you'll find them in the following directories: + +- Varnish: `vendor/ibexa/http-cache/docs/varnish/vcl/` +- Fastly: `vendor/ibexa/fastly/fastly/` + +#### Ibexa Cloud + +Generate the Ibexa Cloud Platform.sh configuration files, review the changes with your own version, and merge your customizations. + +```bash +composer ibexa:setup --platformsh +``` + +#### Conclusion + +Your project is now running the latest major version of Ibexa DXP. From deae0a6077af1298ff86b9710608d5c9e89f77d9 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:02:59 +0200 Subject: [PATCH 39/49] update_to_5.0.md: outro: post-update-cmd --- docs/update_and_migration/from_4.6/update_to_5.0.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index cdf698995d..71b2d1069a 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -971,6 +971,14 @@ The following example illustrates the update of a custom page block's icon: ### Finalising +#### Clear cache and rebuild + +Finish the update process: + +``` +composer run-script post-update-cmd +``` + #### HTTP Cache Use the newer VCL files. From a3e1ffa97583874cd4cb70705f84bfc2de64c21f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:04:54 +0200 Subject: [PATCH 40/49] update_to_5.0.md: outro: fix punctuation --- docs/update_and_migration/from_4.6/update_to_5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 71b2d1069a..457b200b9a 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -707,7 +707,7 @@ The provided built-it icon set has been changed. The `ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` refactors the icon usage in JavaScript files. You may have to update them in other contexts, for example, in configuration files associating icons to content types or Page Builder blocks. -The icon library file's path changed from `/bundles/ibexaicons/img/all-icons.svg` to `/bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg` +The icon library file's path changed from `/bundles/ibexaicons/img/all-icons.svg` to `/bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg`. Some icons have been renamed. You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). From 5a649ebf50435d9d248c48fb34df304831c16648 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:13:05 +0200 Subject: [PATCH 41/49] update_to_5.0.md: Merge Webpack Encore customization after recipe reset --- docs/update_and_migration/from_4.6/update_to_5.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 457b200b9a..487a315ba5 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -227,6 +227,8 @@ rm assets/bootstrap.js composer recipes:install symfony/webpack-encore-bundle --reset --force --yes ``` +Compare with your previous version, and merge and test customization if needed. + #### Apply [[= product_name =]] recipe === "[[= product_name_headless =]]" From 2312f3b07e84cce11a67d639475047097f8d1c65 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:35:13 +0200 Subject: [PATCH 42/49] update_to_5.0.md: Uncomment withPreparedSets --- docs/update_and_migration/from_4.6/update_to_5.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 487a315ba5..85ef5dfeb6 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -554,11 +554,11 @@ use Rector\Symfony\Set\SensiolabsSetList; codeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-code-quality codingStyle: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-coding-style typeDeclarations: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-type-declarations - // privatization: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-privatization + privatization: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-privatization naming: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-naming instanceOf: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-instanceof earlyReturn: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-early-return - // strictBooleans: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-strict-booleans + strictBooleans: true, // https://getrector.com/find-rule?activeRectorSetGroup=core&rectorSet=core-strict-booleans rectorPreset: true, symfonyCodeQuality: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-code-quality symfonyConfigs: true, // https://getrector.com/find-rule?activeRectorSetGroup=symfony&rectorSet=symfony-configs From b08be426cd3c8ec92c1d36b0e576c3ac65374e36 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:50:16 +0200 Subject: [PATCH 43/49] update_to_5.0.md: About ibexa/compatibility-layer --- docs/update_and_migration/from_4.6/update_to_5.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 85ef5dfeb6..ac9e8d18ca 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -27,6 +27,10 @@ It supports only PHP 8.3 and above. It's important to stop using deprecated PHP classes as they're removed in 5.0. +The [`ibexa/compatibility-layer`](to_4.0.md#add-compatibility-layer-package) isn't supported in 5.0. +If you use it, remove it (`composer remove ibexa/compatibility-layer`) and make the necessary changes. +See [Ibexa DXP v4.0 deprecations and backwards compatibility breaks](ibexa_dxp_v4.0_deprecations.md) for some of the changes it was avoiding. + [Rector](https://getrector.com/) and the [[= product_name_base =]] rule sets help to upgrade your code. Install [`ibexa/rector`](https://github.com/ibexa/rector) which contains rules to ensure custom code is up to date with DXP 4.6: From f0b7de13037bc2d8283299fcd4f886ddeb0a906b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:12:17 +0200 Subject: [PATCH 44/49] update_to_5.0.md: Add date-time and symbol --- .../from_4.6/update_to_5.0.md | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index ac9e8d18ca..bad6e3b000 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -197,7 +197,7 @@ composer remove --no-update \ ibexa/connector-ai \ ibexa/connector-openai \ ibexa/product-catalog-date-time-attribute \ - ibexa/product-catalog-symbol-attribute/ + ibexa/product-catalog-symbol-attribute \ ibexa/discounts \ ibexa/discounts-codes \ ; @@ -428,6 +428,35 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql ``` +#### Install date and time attribute type + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | psql + ``` + +#### Install symbol attribute type + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | psql + ``` + + #### Install collaboration === "MySQL" From 37b8d581bd36550d7cb30b0dc1264b4f70230c79 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:13:29 +0200 Subject: [PATCH 45/49] update_to_5.0.md: tip: store the SQL --- docs/update_and_migration/from_4.6/update_to_5.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index bad6e3b000..35d159f1b9 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -414,6 +414,12 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. * If you haven't installed the feature, you need to add its schema to your database. * If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. +!!! note + + Instead of piping the command to the DB client, + you can redirect the SQL output into a file + to study it or help its sharing and deployment. + #### Install AI actions schema === "MySQL" From 77dd6d830e4072997f57caee604bf70e5a30f061 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:24:55 +0200 Subject: [PATCH 46/49] update_to_5.0.md: Move PHP update sooner to ensure bin/console --- .../from_4.6/update_to_5.0.md | 274 +++++++++--------- 1 file changed, 137 insertions(+), 137 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 35d159f1b9..071685f05c 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -406,143 +406,6 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_mtime TO ibexa_dfs_file_mtime; ``` -### Install new features' schemas - -Features which were optional 4.6 LTS Updates are now part of 5.0.0. - -* If you have already installed the feature, its schema has been updated by the previous step. -* If you haven't installed the feature, you need to add its schema to your database. -* If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. - -!!! note - - Instead of piping the command to the DB client, - you can redirect the SQL output into a file - to study it or help its sharing and deployment. - -#### Install AI actions schema - -=== "MySQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p - ``` - -=== "PostgreSQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql - ``` - -#### Install date and time attribute type - -=== "MySQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p - ``` - -=== "PostgreSQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | psql - ``` - -#### Install symbol attribute type - -=== "MySQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p - ``` - -=== "PostgreSQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | psql - ``` - - -#### Install collaboration - -=== "MySQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p - ``` - -=== "PostgreSQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql - ``` - -#### Install discounts [[% include 'snippets/commerce_badge.md' %]] - -=== "MySQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | mysql -u -p - ``` - -=== "PostgreSQL" - - ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql - ``` - -### Clear cache pool - -The persistence cache pool needs to be cleared to be able to use the repository again. - -```bash -php bin/console cache:pool:clear --all -``` - -### Migrations - -#### Taxonomy - -```bash -php bin/console ibexa:migrations:import vendor/ibexa/taxonomy/src/bundle/Resources/install/migrations/2025_08_09_14_47_mark_tag_as_container.yaml -php bin/console ibexa:migrations:migrate --file=2025_08_09_14_47_mark_tag_as_container.yaml --siteaccess=admin -``` - -#### Product catalog - -```bash -php bin/console ibexa:migrations:import vendor/ibexa/product-catalog/src/bundle/Resources/migrations/2025_07_09_13_52_mark_product_category_container.yaml -php bin/console ibexa:migrations:migrate --file=2025_07_09_13_52_mark_product_category_container.yaml --siteaccess=admin -``` - -#### Corporate accounts [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]] - -```bash -php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/2025_07_08_09_27_set_container_to_company.yaml -php bin/console ibexa:migrations:migrate --file=2025_07_08_09_27_set_container_to_company.yaml --siteaccess=admin -``` - -### Generate GraphQL schema - -GraphQL usage is no longer required for the Ibexa DXP back office. -If you are using GraphQL in your project, you can generate its schema by running: - -```bash -php bin/console ibexa:graphql:generate-schema -``` - -### Update search indexes - -Ensure your search index is up to date with the following command: - -```bash -php bin/console ibexa:reindex -``` - ### Update custom code for [[= product_name =]] 5.0 #### Update PHP framework standards @@ -1010,6 +873,143 @@ The following example illustrates the update of a custom page block's icon: + thumbnail: /bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg#info-square ``` +### Install new features' schemas + +Features which were optional 4.6 LTS Updates are now part of 5.0.0. + +* If you have already installed the feature, its schema has been updated by the previous step. +* If you haven't installed the feature, you need to add its schema to your database. +* If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. + +!!! note + + Instead of piping the command to the DB client, + you can redirect the SQL output into a file + to study it or help its sharing and deployment. + +#### Install AI actions schema + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql + ``` + +#### Install date and time attribute type + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | psql + ``` + +#### Install symbol attribute type + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | psql + ``` + + +#### Install collaboration + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql + ``` + +#### Install discounts [[% include 'snippets/commerce_badge.md' %]] + +=== "MySQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | mysql -u -p + ``` + +=== "PostgreSQL" + + ```bash + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql + ``` + +### Clear cache pool + +The persistence cache pool needs to be cleared to be able to use the repository again. + +```bash +php bin/console cache:pool:clear --all +``` + +### Migrations + +#### Taxonomy + +```bash +php bin/console ibexa:migrations:import vendor/ibexa/taxonomy/src/bundle/Resources/install/migrations/2025_08_09_14_47_mark_tag_as_container.yaml +php bin/console ibexa:migrations:migrate --file=2025_08_09_14_47_mark_tag_as_container.yaml --siteaccess=admin +``` + +#### Product catalog + +```bash +php bin/console ibexa:migrations:import vendor/ibexa/product-catalog/src/bundle/Resources/migrations/2025_07_09_13_52_mark_product_category_container.yaml +php bin/console ibexa:migrations:migrate --file=2025_07_09_13_52_mark_product_category_container.yaml --siteaccess=admin +``` + +#### Corporate accounts [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]] + +```bash +php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/2025_07_08_09_27_set_container_to_company.yaml +php bin/console ibexa:migrations:migrate --file=2025_07_08_09_27_set_container_to_company.yaml --siteaccess=admin +``` + +### Generate GraphQL schema + +GraphQL usage is no longer required for the Ibexa DXP back office. +If you are using GraphQL in your project, you can generate its schema by running: + +```bash +php bin/console ibexa:graphql:generate-schema +``` + +### Update search indexes + +Ensure your search index is up to date with the following command: + +```bash +php bin/console ibexa:reindex +``` + ### Finalising #### Clear cache and rebuild From 0a4f82a77cc99425cc1e2e517adfc9a6493e6fcb Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:27:16 +0200 Subject: [PATCH 47/49] update_to_5.0.md: Format --- docs/update_and_migration/from_4.6/update_to_5.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 071685f05c..62c33f10c8 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -311,6 +311,7 @@ If you have custom code directly querying those, you will need to update them. You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below. ??? note "Tables and columns renaming map" + | Old name | New name | |:------------------------------------------------------|:------------------------------------------------------------------------| | ezbinaryfile | ibexa_binary_file | @@ -617,6 +618,7 @@ Some icons have been renamed. You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.config.json` (`"old-name": "new-name"`)](https://github.com/ibexa/rector/blob/v5.0.0/js/rules.config.json#L63). ??? note "Icons renaming map" + | Old name | New name | |:------------------------|:-----------------------------| | about-info | help | @@ -881,7 +883,7 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. * If you haven't installed the feature, you need to add its schema to your database. * If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. -!!! note +!!! tip Instead of piping the command to the DB client, you can redirect the SQL output into a file From a30b86a8001efef1ba3cf7ae9cbc583c778d795f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 21 Jul 2025 16:34:18 +0200 Subject: [PATCH 48/49] update_to_5.0.md: Store schemas into files --- .../from_4.6/update_to_5.0.md | 59 ++++++++++++------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 62c33f10c8..8092d921bd 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -881,26 +881,25 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. * If you have already installed the feature, its schema has been updated by the previous step. * If you haven't installed the feature, you need to add its schema to your database. + Store the SQL of the schema into a file, review it, then run it. * If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. -!!! tip - - Instead of piping the command to the DB client, - you can redirect the SQL output into a file - to study it or help its sharing and deployment. - #### Install AI actions schema === "MySQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml > schema_connector-ai.sql + # schema_connector-ai.sql review + mysql -u -p < schema_connector-ai.sql ``` === "PostgreSQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml > schema_connector-ai.sql + # Pause to review schema_connector-ai.sql + psql < schema_connector-ai.sql ``` #### Install date and time attribute type @@ -908,13 +907,17 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. === "MySQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml > schema_date-time-attribute.sql + # Pause to review schema_date-time-attribute.sql + mysql -u -p < schema_date-time-attribute.sql ``` === "PostgreSQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-date-time-attribute/src/bundle/Resources/config/schema.yaml > schema_date-time-attribute.sql + # Pause to review schema_date-time-attribute.sql + psql < schema_date-time-attribute.sql ``` #### Install symbol attribute type @@ -922,13 +925,17 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. === "MySQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml > schema_symbol-attribute.sql + # Pause to review schema_symbol-attribute.sql + mysql -u -p < schema_symbol-attribute.sql ``` === "PostgreSQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/product-catalog-symbol-attribute/src/bundle/Resources/config/schema.yaml > schema_symbol-attribute.sql + # Pause to review schema_symbol-attribute.sql + psql < schema_symbol-attribute.sql ``` @@ -937,15 +944,21 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. === "MySQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml > schema_collaboration.sql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml > schema_share.sql + # Pause to review schema_collaboration.sql and schema_share.sql + mysql -u -p < schema_collaboration.sql + mysql -u -p < schema_share.sql ``` === "PostgreSQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/collaboration/src/bundle/Resources/config/schema.yaml > schema_collaboration.sql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/share/src/bundle/Resources/config/schema.yaml > schema_share.sql + # Pause to review schema_collaboration.sql and schema_share.sql + psql < schema_collaboration.sql + psql < schema_share.sql ``` #### Install discounts [[% include 'snippets/commerce_badge.md' %]] @@ -953,15 +966,21 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. === "MySQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | mysql -u -p - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | mysql -u -p + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml > schema_discounts.sql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml > schema_discounts-codes.sql + # Pause to review schema_discounts.sql and schema_discounts-codes.sql + mysql -u -p < schema_discounts.sql + mysql -u -p < schema_discounts-codes.sql ``` === "PostgreSQL" ```bash - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml | psql - php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml | psql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts/src/bundle/Resources/config/schema.yaml > schema_discounts.sql + php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/discounts-codes/src/bundle/Resources/config/schema.yaml > schema_discounts-codes.sql + # Pause to review schema_discounts.sql and schema_discounts-codes.sql + psql < schema_discounts.sql + psql < schema_discounts-codes.sql ``` ### Clear cache pool From 57a81742d087dc5b9a84620e8430bf631dc9ed40 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:39:19 +0200 Subject: [PATCH 49/49] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marek Nocoń --- .../update_and_migration/from_4.6/update_to_5.0.md | 14 +++++++------- docs/update_and_migration/update_ibexa_dxp.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/update_and_migration/from_4.6/update_to_5.0.md b/docs/update_and_migration/from_4.6/update_to_5.0.md index 8092d921bd..6bb184100f 100644 --- a/docs/update_and_migration/from_4.6/update_to_5.0.md +++ b/docs/update_and_migration/from_4.6/update_to_5.0.md @@ -29,7 +29,7 @@ It's important to stop using deprecated PHP classes as they're removed in 5.0. The [`ibexa/compatibility-layer`](to_4.0.md#add-compatibility-layer-package) isn't supported in 5.0. If you use it, remove it (`composer remove ibexa/compatibility-layer`) and make the necessary changes. -See [Ibexa DXP v4.0 deprecations and backwards compatibility breaks](ibexa_dxp_v4.0_deprecations.md) for some of the changes it was avoiding. +See [Ibexa DXP v4.0 deprecations and backwards compatibility breaks](ibexa_dxp_v4.0_deprecations.md) for the list of changes. [Rector](https://getrector.com/) and the [[= product_name_base =]] rule sets help to upgrade your code. @@ -105,7 +105,7 @@ rm -r config/graphql #### Update package requirements [[= product_name =]] 5.0 is based on Symfony 7.3 and both must be updated. -Your development package must be updated as well. +Your development packages must be updated as well. The example below assumes that [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` are installed. Adjust the list based on your project requirements. Notice the use of the `--no-update` option to only edit the `composer.json` entries and avoid triggering the package update and Composer scripts. @@ -231,7 +231,7 @@ rm assets/bootstrap.js composer recipes:install symfony/webpack-encore-bundle --reset --force --yes ``` -Compare with your previous version, and merge and test customization if needed. +Compare with your previous version, merge them together and test your customizations if needed. #### Apply [[= product_name =]] recipe @@ -865,7 +865,7 @@ You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.confi The following example illustrates the update of a custom page block's icon: -```diff+yaml +```diff ibexa_fieldtype_page: blocks: event: @@ -881,7 +881,7 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. * If you have already installed the feature, its schema has been updated by the previous step. * If you haven't installed the feature, you need to add its schema to your database. - Store the SQL of the schema into a file, review it, then run it. + Store the SQL of the schema into a file, **review it carefully**, then run it. * If you mistakenly reinstall a schema, you might encounter "Table already exists" errors which can be ignored. #### Install AI actions schema @@ -890,7 +890,7 @@ Features which were optional 4.6 LTS Updates are now part of 5.0.0. ```bash php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/connector-ai/src/bundle/Resources/config/schema.yaml > schema_connector-ai.sql - # schema_connector-ai.sql review + # Pause to review schema_connector-ai.sql mysql -u -p < schema_connector-ai.sql ``` @@ -1031,7 +1031,7 @@ Ensure your search index is up to date with the following command: php bin/console ibexa:reindex ``` -### Finalising +### Finalizing #### Clear cache and rebuild diff --git a/docs/update_and_migration/update_ibexa_dxp.md b/docs/update_and_migration/update_ibexa_dxp.md index 3c791fb264..fbeec4c43c 100644 --- a/docs/update_and_migration/update_ibexa_dxp.md +++ b/docs/update_and_migration/update_ibexa_dxp.md @@ -32,7 +32,7 @@ To update [[= product_name =]] to a newer version, select the version you're cur === "I am using v4.x" - If you have a v4.x installation prior to v4.6, [update to the v4.6 LTS](from_4.5/update_from_4.5.md). - - If you have a v4.6 installation, (update to the latest patch v[[= latest_tag_4_6 =]])(from_4.6/update_from_4.6.md). + - If you have a v4.6 installation, [update to the latest patch v[[= latest_tag_4_6 =]]](from_4.6/update_from_4.6.md). Afterwards, it's strongly recommended to also [update to the lastest v5.0 LTS](from_4.6/update_to_5.0.md).