The installation is broken on SF 5.4, I don't know since when, but it's quite recent.
composer require symfony/webpack-encore-bundle
./composer.json has been updated
Running composer update symfony/webpack-encore-bundle
Loading composer repositories with package information
Updating dependencies
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.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require symfony/webpack-encore-bundle:*" to figure out if any version is installable, or "composer require symfony/webpack-encore-bundle:^2.1" if you know which you need.
It tried to install older versions :
composer require symfony/webpack-encore-bundle:2.0
composer require symfony/webpack-encore-bundle:1.17.0
It just don't work.
Using --with-all-dependencies and -W doesn't help either.
To reproduce the problem, just install a brand new SF 5.4 as following :composer create-project symfony/skeleton:"^5.4" .composer require webapp
And then run:composer require symfony/webpack-encore-bundle
PHP version:php -v
PHP 8.1.14 (cli) (built: Jan 13 2023 10:43:22) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.14, Copyright (c) Zend Technologies
with Zend OPcache v8.1.14, Copyright (c), by Zend Technologies
The installation is broken on SF 5.4, I don't know since when, but it's quite recent.
composer require symfony/webpack-encore-bundle ./composer.json has been updated Running composer update symfony/webpack-encore-bundle Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require symfony/webpack-encore-bundle:*" to figure out if any version is installable, or "composer require symfony/webpack-encore-bundle:^2.1" if you know which you need.
It tried to install older versions : composer require symfony/webpack-encore-bundle:2.0 composer require symfony/webpack-encore-bundle:1.17.0
It just don't work. Using --with-all-dependencies and -W doesn't help either.
To reproduce the problem, just install a brand new SF 5.4 as following :
composer create-project symfony/skeleton:"^5.4" .
composer require webapp
And then run:
composer require symfony/webpack-encore-bundle
PHP version:
php -v
PHP 8.1.14 (cli) (built: Jan 13 2023 10:43:22) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.14, Copyright (c) Zend Technologies with Zend OPcache v8.1.14, Copyright (c), by Zend Technologies