Skip to content

Commit

Permalink
"Update to 4.6" doc improvements (#2325)
Browse files Browse the repository at this point in the history
* Updated Update page to take the latest LTS into account

* Applied update doc feedback

* Added Recent Activity Dashboard block migration to upgrade procedure

* Added missing Dashboard and Image Picker scripts

* Applied feedback from IBX-7910

* Added missing extension

* Added missing Dashboard migrations

* Removed param info

* Added missing filename

* Applied suggestions

Co-authored-by: Justyna Koralewicz <79849375+juskora@users.noreply.github.com>

* Applied suggestions from code review

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>

* Update docs/update_and_migration/from_2.5/update_from_2.5.md

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>

* Update docs/update_and_migration/update_ibexa_dxp.md

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>

* Applied review suggestion

* Updated texts in the generic update page

* Added mention about customizing the Dashboard permissions

---------

Co-authored-by: Andrew Longosz <alongosz@users.noreply.github.com>
Co-authored-by: Justyna Koralewicz <79849375+juskora@users.noreply.github.com>
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
  • Loading branch information
4 people committed Apr 3, 2024
1 parent b73162b commit 74a2edc
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 9 deletions.
5 changes: 3 additions & 2 deletions docs/update_and_migration/from_2.5/update_from_2.5.md
@@ -1,14 +1,15 @@
---
description: Update your installation to the latest v3.3 version from v2.5.
target_version: '3.2'
latest_tag: '3.3.24'
---

# From 2.5

This update procedure applies if you are using v2.5.

Go through the following steps to update to the latest v3.3 LTS (v[[= latest_tag =]]).
Go through the following steps to update to the v3.3 LTS (v[[= latest_tag_3_3 =]]).

Afterwards, it is strongly recommended to also [update to the latest v4.6 LTS](to_4.0.md).

1. [Check out a version](to_3.2.md)
1. [Resolve conflicts](to_3.2.md#2-resolve-conflicts)
Expand Down
70 changes: 67 additions & 3 deletions docs/update_and_migration/from_4.5/update_from_4.5.md
Expand Up @@ -55,6 +55,8 @@ Depending on the version you started from, you may have several scripts to run:
## Update from v4.5.latest to v4.6

When you have the latest version of v4.5, you can update to v4.6.
Check [the requirements](../../getting_started/requirements.md) first.
This version adds support for PHP 8.2 and 8.3, but requires using at least Node 18.

### Update the application

Expand Down Expand Up @@ -91,6 +93,16 @@ First, run:
The `recipes:install` command installs new YAML configuration files.
Review the old YAML files and move your custom configuration to the relevant new files.

## Remove `node_modules` and `yarn.lock`

Next, remove `node_modules` and `yarn.lock` before running `composer run post-update-cmd`,
otherwise you can encounter errors during compiling.

``` bash
rm -Rf node_modules
rm yarn.lock
```

## Finish code update

Finish the code update by running:
Expand All @@ -108,7 +120,17 @@ You may encounter one of the following errors during the process.
If you encounter a `You have requested a non-existent parameter` error
(like, for example, `You have requested a non-existent parameter "ibexa.dashboard.ibexa_news.limit".`),
this is due to incorrect order of entries in `config/bundles.php`.
To fix this, use the order from https://github.com/ibexa/commerce-skeleton/blob/v4.6.0/config/bundles.php, and add any extra bundles again.
To fix this, use the order from the skeleton you're using, and add any extra bundles again.

=== "[[= product_name_headless =]]"
Use [https://github.com/ibexa/headless-skeleton/blob/v[[= latest_tag_4_6 =]]/config/bundles.php](https://github.com/ibexa/headless-skeleton/blob/v[[= latest_tag_4_6 =]]/config/bundles.php) as a reference.

=== "[[= product_name_exp =]]"
Use [https://github.com/ibexa/experience-skeleton/blob/v[[= latest_tag_4_6 =]]/config/bundles.php](https://github.com/ibexa/experience-skeleton/blob/v[[= latest_tag_4_6 =]]/config/bundles.php) as a reference.

=== "[[= product_name_com =]]"
Use [https://github.com/ibexa/commerce-skeleton/blob/v[[= latest_tag_4_6 =]]/config/bundles.php](https://github.com/ibexa/commerce-skeleton/blob/v[[= latest_tag_4_6 =]]/config/bundles.php) as a reference.


#### Non-existent service

Expand Down Expand Up @@ -151,7 +173,7 @@ For [[= product_name_com =]] installations, you also need to run the following c
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/commerce/ibexa-4.5.latest-to-4.6.0.sql
```

And to play the following table creation request:
And apply the following database script:

=== "MySQL"

Expand Down Expand Up @@ -183,6 +205,17 @@ And to play the following table creation request:

## Run data migration

### Image picker migration

The new Image picker by default expects an `ezkeyword` Field Type to exist in the `image` content type.

You can add it running the following commands:

```bash
php bin/console ibexa:migrations:import vendor/ibexa/image-picker/src/bundle/Resources/migrations/2023_12_06_15_00_image_content_type.yaml --name=2023_12_06_15_00_image_content_type.yaml
php bin/console ibexa:migrations:migrate --file=2023_12_06_15_00_image_content_type.yaml
```

### Dashboard migration [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]]

If you are using [[= product_name_exp =]] or [[= product_name_com =]],
Expand All @@ -191,9 +224,40 @@ you must run data migration required by the dashboard and other features to fini
```bash
php bin/console ibexa:migrations:import vendor/ibexa/dashboard/src/bundle/Resources/migrations/structure.yaml --name=2023_09_23_14_15_dashboard_structure.yaml
php bin/console ibexa:migrations:import vendor/ibexa/dashboard/src/bundle/Resources/migrations/permissions.yaml --name=2023_10_10_16_14_dashboard_permissions.yaml
php bin/console ibexa:migrations:migrate --file=2023_09_23_14_15_dashboard_structure.yaml --file=2023_10_10_16_14_dashboard_permissions.yaml
php bin/console ibexa:migrations:import vendor/ibexa/activity-log/src/bundle/Resources/migrations/dashboard_structure.yaml --name=2023_12_04_13_34_activity_log_dashboard_structure.yaml
php bin/console ibexa:migrations:import vendor/ibexa/personalization/src/bundle/Resources/migrations/dashboard_structure.yaml --name=2023_12_05_17_00_personalization_dashboard_structure.yaml
php bin/console ibexa:migrations:import vendor/ibexa/product-catalog/src/bundle/Resources/migrations/dashboard_structure.yaml --name=2023_11_20_21_32_product_catalog_dashboard_structure.yaml
php bin/console ibexa:migrations:migrate --file=2023_09_23_14_15_dashboard_structure.yaml --file=2023_10_10_16_14_dashboard_permissions.yaml --file=2023_12_04_13_34_activity_log_dashboard_structure.yaml --file=2023_12_05_17_00_personalization_dashboard_structure.yaml --file=2023_11_20_21_32_product_catalog_dashboard_structure.yaml
```

!!! caution

The `2023_10_10_16_14_dashboard_permissions.yaml` migration creates a Role dedicated for dashboard management and assigns it to the Editors User Group. If you have custom User Groups which need to manipulate dashboards, you need to skip this migration, copy it to your migrations folder (by default, `src/Migrations/Ibexa/migrations`) and adjust it according to your needs before execution.

For [[= product_name_com =]] there's an additional migration:
``` bash
php bin/console ibexa:migrations:import vendor/ibexa/order-management/src/bundle/Resources/install/migrations/dashboard_structure.yaml --name=2023_11_20_14_33_order_dashboard_structure.yaml
php bin/console ibexa:migrations:migrate --file=2023_11_20_14_33_order_dashboard_structure.yaml
```

### Ibexa Open Source

If you don't have access to [[= product_name =]]'s `ibexa/installer` package and cannot apply the scripts from `vendor/ibexa/installer` directory, apply the following database update instead:

=== "MySQL"

``` sql
ALTER TABLE `ibexa_token`
ADD COLUMN `revoked` BOOLEAN NOT NULL DEFAULT false;
```

=== "PostgreSQL"

``` sql
ALTER TABLE "ibexa_token"
ADD "revoked" BOOLEAN DEFAULT false NOT NULL;
```

## Revisit configuration

### Revisit mandatory configuration
Expand Down
10 changes: 6 additions & 4 deletions docs/update_and_migration/update_ibexa_dxp.md
Expand Up @@ -11,18 +11,20 @@ To update [[= product_name =]] to a newer version, select the version you are cu
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 is strongly recommended to also [update to the latest LTS, v3.3](from_2.5/update_from_2.5.md).
Afterwards, it is 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).

=== "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 is 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).

=== "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).

You can also [update to v4](from_3.3/to_4.0.md).
Afterwards, it is 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).

=== "I am using v4.0"
=== "I am using v4.x"

If you already have a v4.0 installation, [update to the latest v4.5 version](from_4.4/update_from_4.4.md).
If you already have a v4.x installation, [update to the v4.6 LTS](from_4.5/update_from_4.5.md).

0 comments on commit 74a2edc

Please sign in to comment.