|
| 1 | +--- |
| 2 | +description: Update your installation to v5.0 from the latest v4.6 version. |
| 3 | +month_change: true |
| 4 | +--- |
| 5 | + |
| 6 | +# Update from v4.6 to v5.0 |
| 7 | + |
| 8 | +## Update from v4.6.x to v4.6.latest |
| 9 | + |
| 10 | +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). |
| 11 | + |
| 12 | +## Update from v4.6.latest to v5.0.TODO |
| 13 | + |
| 14 | +When you have the last version of 4.6, you can update to v5.0. |
| 15 | + |
| 16 | +First, check v5.0's [requirements](requirements.md). |
| 17 | +It supports only PHP 8.3 and above. |
| 18 | + |
| 19 | +### Update custom code for PHP 8.3 (TODO: 8.3+?) |
| 20 | + |
| 21 | +If your DXP 4.6 is running on a PHP below 8.3, start migrating it to PHP 8.3. |
| 22 | + |
| 23 | +Use Ibexa Rector to help yourself to upgrade PHP code for 8.3, |
| 24 | +see [`ibexa/rector`'s README](https://github.com/ibexa/rector?tab=readme-ov-file#ibexa-dxp-rector) for more information about installation and usage. |
| 25 | + |
| 26 | +TODO: Example with our own code samples? |
| 27 | +TODO: list of features deprecated in 4.6 removed in 5.0? |
| 28 | + |
| 29 | +### TODO: Other updates like moving from any deprecated stuff? |
| 30 | + |
| 31 | +### Update [[= product_name =]] application |
| 32 | + |
| 33 | +=== "[[= product_name_headless =]]" |
| 34 | + |
| 35 | + ``` bash |
| 36 | + composer require ibexa/headless:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts |
| 37 | + composer recipes:install ibexa/headless --force -v |
| 38 | + ``` |
| 39 | +=== "[[= product_name_exp =]]" |
| 40 | + |
| 41 | + ``` bash |
| 42 | + composer require ibexa/experience:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts |
| 43 | + composer recipes:install ibexa/experience --force -v |
| 44 | + ``` |
| 45 | +=== "[[= product_name_com =]]" |
| 46 | + |
| 47 | + ``` bash |
| 48 | + composer require ibexa/commerce:[[= latest_tag_5_0 =]] --with-all-dependencies --no-scripts |
| 49 | + composer recipes:install ibexa/commerce --force -v |
| 50 | + ``` |
| 51 | + |
| 52 | +### composer.json clean-up |
| 53 | + |
| 54 | +If you have required 4.6 LTS Update packages, |
| 55 | +they're included by default in 5.0. |
| 56 | +You can now remove them from your composer.json |
| 57 | +so you won't have to maintain which of their versions your composer.json is referring to. |
| 58 | + |
| 59 | +TODO: Do it earlier? |
| 60 | +TODO: A reminding list of removable LTS Update packages |
| 61 | + |
| 62 | +### Update database |
| 63 | + |
| 64 | +Apply the following database update script: |
| 65 | + |
| 66 | +TODO: Fix SQL file path |
| 67 | + |
| 68 | +### [[= product_name =]] |
| 69 | + |
| 70 | +=== "MySQL" |
| 71 | + |
| 72 | + ``` bash |
| 73 | + mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-4.6.latest-to-5.0.0.sql |
| 74 | + ``` |
| 75 | + |
| 76 | +=== "PostgreSQL" |
| 77 | + |
| 78 | + ``` bash |
| 79 | + psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql |
| 80 | + ``` |
| 81 | + |
| 82 | +TODO: Migration files? |
| 83 | + |
| 84 | +Many tables names have changed. If you have custom code directly querying these tables, you will need to update them. |
| 85 | + |
| 86 | +TODO: old name/new name table |
| 87 | + |
| 88 | +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. |
| 89 | + |
| 90 | +### Update custom code for [[= product_name =]] 5.0 |
| 91 | + |
| 92 | +TODO: Rector again, this time with 5.0 rules. |
| 93 | + |
| 94 | +### Update Back Office extensions |
| 95 | + |
| 96 | +TODO: Update JS, templates, CSS… |
| 97 | +TODO: Some old deprecated Webpack file names were supported in 4.6 for backward compatibility; They aren't in 5.0 |
| 98 | +TODO: Conversion tables |
0 commit comments