Did you encounter difficulties when updating to Ibexa 3.3.7 and you get below issue:
Attempted to load class BatchIterator from namespace "eZ\Publish\API\Repository\Iterator". Did you forget a "use" statement for another namespace?
This post can help you to fix it
If you run into more issues don’t hesitate to contact me or just ping me in the ezcommunity.slack.com :
Ibexa DXP 3.3.7 (Release date: September 3, 2021)
Please always refer to Ibexa 3.3 Upgrade Documentation
let’s start with the update steps:
dev
project branch
1 |
gitch -b upgrade_ibexa_to_337 |
1 |
composer recipes:install ibexa/experience --force -v |
You will notice below changes:
1 2 3 4 |
modified: .env modified: config/bundles.php modified: config/packages/dfs/dfs.yaml modified: config/packages/ezplatform.yaml |
At this Step, Ibexa mention reviewing the changes and add them to our project.
In my case, I had to restore bundles.php
because it adds the KaliopMigration
bundle and it is not supported in v3.x. The ezplatform.yaml
contains some custom configuration and nothing special was added to this file.
1 |
git restore config/packages/ezplatform.yaml config/bundles.php |
1 |
composer require ibexa/experience:^3.3 --no-update |
This will add below line in composer.json
1 |
+ "ibexa/experience": "^3.3", |
âšī¸ Please pay attention to -
and +
lines
1 2 3 4 5 6 7 8 |
"extra": { "symfony": { "allow-contrib": true, - "require": "5.2.*", + "require": "5.3.*", "endpoint": "https://flex.ibexa.co" } }, |
1 |
composer update |
UPS! You will get the below error:
1 2 3 |
Problem 1 - symfony/web-profiler-bundle[v5.3.0-BETA1, ..., 5.3.x-dev] require symfony/framework-bundle ^5.3 -> found symfony/framework-bundle[v5.3.0-BETA1, ..., 5.4.x-dev] but it conflicts with your root composer.json require (5.2.*). - Root composer.json requires symfony/web-profiler-bundle ^5.2 -> satisfiable by symfony/web-profiler-bundle[v5.3.0-BETA1, ..., 5.3.x-dev]. |
At this Step, you have to consider this documentation page and some additional steps: https://doc.ibexa.co/en/latest/updating/updating_to_3.3/#update-to-v33x
AT THIS STEP, JUST READ DO NOT DO ANY CHANGES YET! Goto: Next Step
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
- "doctrine/doctrine-bundle": "^2.3", + "doctrine/doctrine-bundle": "^2.4", - "sensio/framework-extra-bundle": "^5.6.1", + "sensio/framework-extra-bundle": "^6.1", - "symfony/flex": "^1.11.0", + "symfony/flex": "^1.3.1", - "twig/twig": "^2.12|^3.0" + "twig/twig": "^2.12|^3.0", + "symfony/runtime": "*" - "symfony/maker-bundle": "^1.26.1", + "symfony/maker-bundle": "^1.0", |
According to the documentation, we should now run:
1 |
composer require ibexa/experience:3.3.7 --with-all-dependencies --no-scripts |
BUT you will get below error:
1 2 |
Problem 1 - ibexa/oss v3.3.6 requires symfony/form ^5.3.0 -> found symfony/form[v5.3.0, ..., v5.3.7] but it conflicts with your root composer.json require (5.2.*). |
I noticed in my Installation that composer.json
contains a lot of required symfony 5.2 bundles e.g:
1 2 3 4 5 6 7 8 9 |
"symfony/security-bundle": "5.2.*", "symfony/serializer": "5.2.*", "symfony/string": "5.2.*", "symfony/translation": "5.2.*", "symfony/twig-bundle": "^5.2", "symfony/validator": "5.2.*", "symfony/web-link": "5.2.*", "symfony/yaml": "5.2.*", .... |
Do not set these bundles to 5.3
otherwise you will end up with a lot of compatibility issues like (lock file version)
I was not able at this step to get the right composer.json
for Ibexa Experience either from https://github.com/ezsystems/ezplatform-ee
or https://github.com/ibexa/experience
.
Next Step: I decided to install Ibexa Experience 3.3.7 from the scratch in another folder and check the difference between the composer.json
files.
To install Ibexa Experience 3.3.7 you have to run the below command:
1 |
composer create-project ibexa/experience-skeleton . |
Now my composer.json
looks like this: https://gist.github.com/arfaram/b793bb7944d8802e3f2b52ce052db0a9
âšī¸ Consider to add your custom bundles or configuration to this file. You can use phpstorm history function for that purpose đ )
At this Step, I decided to make the update in a different way because the composer require ibexa/experience:3.3.7
always fails.
1 |
composer update --prefer-dist --no-progress --no-interaction --optimize-autoloader |
Now everything should looks good regarding the symfony 5.3
and Ibexa 3.3.7
bundle versions
1 2 3 4 5 6 7 8 9 10 11 12 |
- Upgrading symfony/config (v5.2.12 => v5.3.4): Extracting archive - Upgrading babdev/pagerfanta-bundle (v2.10.1 => v2.11.0): Extracting archive - Upgrading symfony/process (v5.2.12 => v5.3.7): Extracting archive - Upgrading symfony/stopwatch (v5.2.12 => v5.3.4): Extracting archive - Upgrading symfony/console (v5.2.14 => v5.3.7): Extracting archive - Upgrading ibexa/content (v3.3.3 => v3.3.7) - Upgrading ibexa/experience (v3.3.2 => v3.3.7) - Upgrading ibexa/oss (v3.3.3 => v3.3.7) ezsystems/ezplatform-kernel v1.3.7 ezsystems/ezplatform-admin-ui v2.3.7 |
1 2 3 |
composer run post-install-cmd php bin/console ibexa:graphql:generate-schema php bin/console cache:clear |