symfony / webpack-encore-bundle

Symfony integration with Webpack Encore!
https://symfony.com/webpack-encore
MIT License
933 stars 83 forks source link

2.0 not usable with symfony 5.4 (twig-bundle conflict) #214

Closed codegain closed 1 year ago

codegain commented 1 year ago

Hi,

I wanted to upgrade to version 2 on my PHP 8.1 and symfony 5.4 project, but it's not possible because of this conflict:

[]$ composer upgrade -W
Loading composer repositories with package information                                                          Restricting packages listed in "symfony/symfony" to "5.4.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires symfony/twig-bundle 5.4.* -> satisfiable by symfony/twig-bundle[v5.4.0, ..., v5.4.21].
    - symfony/webpack-encore-bundle v2.0.0 requires symfony/service-contracts ^3.0 -> satisfiable by symfony/service-contracts[v3.0.0, ..., v3.2.1].
    - symfony/twig-bundle[v5.4.0, ..., v5.4.21] conflict with symfony/service-contracts v3.2.1.
    - symfony/twig-bundle[v5.4.0, ..., v5.4.21] conflict with symfony/service-contracts v3.0.2.
    - Root composer.json requires symfony/webpack-encore-bundle ^2.0 -> satisfiable by symfony/webpack-encore-bundle[v2.0.0].

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

In fact, twig-bundle 5.4.* does conflict with symfony/service-contracts v3 which is required by webpack-encore-bundle:

https://github.com/symfony/twig-bundle/blob/v5.4.21/composer.json#L46 https://github.com/symfony/webpack-encore-bundle/blob/2.x/composer.json#L18

Is there any way to upgrade to v2.0 with twig in a symfony 5.4 project?

weaverryan commented 1 year ago

I'll check into this - we can definitely relax that requirement - I didn't realize 5.4 was conflicting with it.