sulu / SuluFormBundle

Form Bundle for handling Dynamic and Symfony Forms in https://sulu.io
MIT License
81 stars 78 forks source link

Bundle not compatible with sulu 2.6 #389

Closed lesmyrmidons closed 4 months ago

lesmyrmidons commented 4 months ago
Q A
Bug? yes
New Feature? no
Bundle Version 2.5.3
Sulu Version 2.6.3
Browser Version command line

Actual Behavior

How does it behave at the moment? The command composer require sulu/form-bundle:^2.5 failled

Expected Behavior

What is the behavior you expect? Error command because the bundle require doctrine/collections ^1.0 and sulu is doctrine/collections ^2.2

Problem 1
    - sulu/form-bundle[2.5.0, ..., 2.5.3] require doctrine/collections ^1.0 -> found doctrine/collections[v1.0, ..., 1.8.0] but the package is fixed to 2.2.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires sulu/form-bundle ^2.5 -> satisfiable by sulu/form-bundle[2.5.0, 2.5.1, 2.5.2, 2.5.3].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Steps to Reproduce

What are the steps to reproduce this bug? Please add code examples, screenshots or links to GitHub repositories that reproduce the problem.

composer require sulu/form-bundle:^2.5

Possible Solutions

If you have already ideas how to solve the issue, add them here. (remove this section if not needed)

alexander-schranz commented 4 months ago

@lesmyrmidons Composer already gives you a solution for this problem

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

composer require sulu/form-bundle:^2.5 --with-all-dependencies

Another way is todo:

composer require sulu/form-bundle:^2.5 --no-update
composer update

As sulu still supports doctrine collections ^1.0 and ^2.0: https://github.com/sulu/sulu/blob/647f02faad088672ac0c261d4984ae067a8eda5f/composer.json#L37

The dependency update of doctrine/collections should be targeted with the Symfony 7 support for the FormBundle. But if you want you can create a merge request for the doctrine/collections part feel free.

alexander-schranz commented 4 months ago

The doctrine/collections 2 is now also supported with Symfony 7.