symfony / webapp-pack

A recommended pack to install on top of the default Symfony skeleton
19 stars 8 forks source link

Adding AssertMapper broke webapp for SF 5.4 #14

Open H4wKs opened 8 months ago

H4wKs commented 8 months ago

Hey guys,

Adding AssertMapper in merge #13 broke webapp for SF 5.4

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires symfony/asset-mapper 5.4.*, found symfony/asset-mapper[v6.3.0-BETA1, ..., 6.4.x-dev, v7.0.0-BETA1, ..., 7.1.x-dev] but it does not match the constraint.

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

To reproduce the problem, install SF 5.4:

composer create-project symfony/skeleton:"^5.4" .
composer require webapp
weaverryan commented 8 months ago

Hmm. It's a bit of a composer issue, tbh. I wish Composer would know to use the previous tag of symfony/webapp-pack that is compatible with 5.4.

But also, now that 6.4 LTS is out, I'm not sure we should care about starting new projects with 5.4.

So, legitimate situation, but I don't think we can / should change anything.

Cheers!

H4wKs commented 8 months ago

So, legitimate situation, but I don't think we can / should change anything.

I agree. Someone who want to start a new projects with 5.4 instead of 6.4 should just stick to the previous version (1.2.0). If anyone get this issue, just enforce version 1.2.0 : composer require webapp:1.2.0

Maybe it would be a good idea to update the documentation in this case, as following the steps here: https://symfony.com/doc/5.x/setup.html

(Since this specific part of the documentation)

composer create-project symfony/skeleton:"^5.4" my_project_directory
cd my_project_directory
composer require webapp

Is not accurate anymore.

Cheers!

HypeMC commented 7 months ago

@weaverryan I think the conflict option could solve this:

https://github.com/symfony/webapp-pack/blob/b6b24f5ae197a01c72e5a2b651e688f3e2e96651/composer.json#L40-L42

However, this might mean you'd need to either update the current tag or add two new ones, one removing the asset mapper and the other adding it back with a conflict.