Skip to content

Commit 2eaca6c

Browse files
committed
update_to_5.0.md: self review
1 parent 18e0b45 commit 2eaca6c

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

docs/update_and_migration/from_4.6/update_to_5.0.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ php vendor/bin/rector --dry-run
6767

6868
### Move from annotation to attribute
6969

70-
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.
70+
Delete [`config/routes/annotations.yaml`](https://github.com/symfony/recipes/blob/main/doctrine/annotations/1.0/config/routes/annotations.yaml)
71+
if you haven't customized it.
7172

72-
If you have customized it, you have to move from `type: annotation` to `type: attribute`.
73-
TODO: Any help or recommendation to provide to the reader? Rector?
73+
If you have customized it,
74+
you have to move from `type: annotation` to `type: attribute`.
7475

7576
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):
7677

@@ -82,18 +83,13 @@ controllers:
8283
type: attribute
8384
```
8485
85-
- 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.
86-
- Or edit the file and copy-paste the new declaration at top of it.
87-
88-
89-
```bash
90-
rm config/routes/annotations.yaml
91-
rm config/routes.yaml
92-
```
86+
- You can delete the file and let the recipe recreate it.
87+
Then, if you have eventually customized it, merge with your previous version from your version system.
88+
- Or edit the file and copy-paste the new declaration on top of it.
9389
9490
### Remove GraphQL schema
9591
96-
4.6 GraphQL isn't compatible with 5.0 so delete it.
92+
4.6 GraphQL schema isn't compatible with 5.0 so delete it, for example, with the following command:
9793
9894
```bash
9995
rm -r config/graphql
@@ -106,6 +102,7 @@ rm -r config/graphql
106102
[[= product_name =]] 5.0 is based on Symfony 7.3 and both must be updated.
107103
Your development package must be updated as well.
108104
The process example below considers [`symfony/debug-pack`](https://symfony.com/packages/Debug%20Pack) and `ibexa/rector` as installed.
105+
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.
109106

110107
=== "[[= product_name_headless =]]"
111108

@@ -188,10 +185,10 @@ The process example below considers [`symfony/debug-pack`](https://symfony.com/p
188185
You can now remove them from your composer.json
189186
so you don't have to maintain which of their versions your composer.json is referring to.
190187

191-
TODO: Test the following command
188+
For example, the following command removes several formerly LTS Update packages from `composer.json:
192189

193190
```bash
194-
composer remove --no-update --no-scripts \
191+
composer remove --no-update \
195192
ibexa/connector-ai \
196193
ibexa/collaboration \
197194
ibexa/share \
@@ -223,7 +220,7 @@ To help moving from Symfony's Webpack Encore bundle 1.x to 2.x,
223220
delete the Stimulus bootstrap file
224221
and reset Webpack Encore recipe:
225222

226-
```
223+
```bash
227224
rm assets/bootstrap.js
228225
composer recipes:install symfony/webpack-encore-bundle --reset --force --yes
229226
```
@@ -268,8 +265,6 @@ Your `auto-scripts` entry should look like this:
268265
},
269266
```
270267

271-
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
272-
273268
#### Remove Ibexa Icons
274269

275270
Remove from your `config/bundles.php` the line about `IbexaIconsBundle`.
@@ -297,16 +292,14 @@ The main schema has changed and the provided SQL file `ibexa-4.6.latest-to-5.0.0
297292
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.6.latest-to-5.0.0.sql
298293
```
299294

300-
As this is made for the Commerce edition, you may encounter unimportant errors on other editions which can be ignored.
295+
As this is made for all the editions at once, you may encounter unimportant errors on other editions which can be ignored.
301296

302297
Many tables and columns are renamed.
303298
If you have custom code directly querying those, you will need to update them.
304299

305300
You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below.
306301

307302
??? note "Tables and columns renaming map"
308-
309-
TODO: Keep up-to-date
310303

311304
| Old name | New name |
312305
|:------------------------------------------------------|:------------------------------------------------------------------------|
@@ -390,8 +383,6 @@ You can track the renaming in the `ibexa-4.6.latest-to-5.0.0.sql` file or below.
390383
| ezuser_role | ibexa_user_role |
391384
| ezuser_setting | ibexa_user_setting |
392385

393-
TODO: Something about renamed indexes?
394-
395386
??? note "DFS (Distributed File System)"
396387

397388
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.
405396
ALTER TABLE ibexa_dfs_file RENAME INDEX ezdfsfile_mtime TO ibexa_dfs_file_mtime;
406397
```
407398

408-
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.
409-
410399
### Install new features' schemas
411400

412401
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
503492

504493
### Update search indexes
505494

506-
```
495+
Ensure your index are up to date with the following command:
496+
497+
```bash
507498
php bin/console ibexa:reindex
508499
```
509500

@@ -641,13 +632,13 @@ module.exports = {
641632

642633
Install the tool dependencies once with the following command:
643634

644-
```
635+
```bash
645636
yarn --cwd ./vendor/ibexa/rector/js install
646637
```
647638

648-
Run it:
639+
Run it using the following command:
649640

650-
```
641+
```bash
651642
yarn --cwd ./vendor/ibexa/rector/js transform
652643
```
653644

@@ -707,9 +698,9 @@ You may have to update them in several places.
707698

708699
#### Update icons
709700

710-
The names of the provided icons have changed.
701+
The names of the icons provided in `all-icons.svg` have changed.
711702
`ibexa/rector` JavaScript Transform module's plugin `ibexa-rename-icons.js` deals with those changes in JavaScript.
712-
You may have to update them in other contexts like config files associating icons to content types or page builder blocks.
703+
You may have to update them in other contexts like, for example, config files associating icons to content types or page builder blocks.
713704

714705
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).
715706

@@ -959,6 +950,8 @@ You can find an [`ibexa-rename-icons` map in `vendor/ibexa/rector/js/rules.confi
959950
| warning | alert-warning |
960951
| warning-triangle | alert-warning |
961952

953+
The following example illustrates the update of a custom page block's icon:
954+
962955
```diff+yaml
963956
ibexa_fieldtype_page:
964957
blocks:

0 commit comments

Comments
 (0)