- Issue created by @jurgenhaas
- π¬π§United Kingdom alexpott πͺπΊπ
Can you add your actual steps to reproduce this issue. I cannot reproduce this. Here's the output of
composer --version
for me...Composer version 2.7.7 2024-06-10 22:11:12 PHP version 8.3.21 (/opt/homebrew/Cellar/php@8.3/8.3.21/bin/php)
Here's what I'm doing:
composer create-project drupal/recommended-project:^11 recipe-test composer require drupal/events:1.0.x-dev composer require drupal/inline_translation:1.x-dev composer require drupal/eca:3.0.x-dev drupal/modeler_api:1.0.x-dev
The events recipe is successfully unpacked and the modules are installed. No messages from the recipe plugin.
I've also updated to composer 2.7.7 and it does not happen for that version either.
- π©πͺGermany rkoller NΓΌrnberg, Germany
alexpott β credited rkoller β .
- π¬π§United Kingdom alexpott πͺπΊπ
Steps to reproduce from @rkoller
composer create-project drupal/recommended-project:^11 recipe-test composer require drupal/eca drupal/bpmn_io composer require drupal/eca:3.0.x-dev drupal/bpmn_io:3.0.x-dev drupal/modeler_api:1.0.x-dev
On the second require you will see
drupal/eca does not resolve to a package.
in the output. - π¬π§United Kingdom alexpott πͺπΊπ
I've tried to write a test for this but it is hard - I can;t get composer to use an alias for our path repositories used in testing.
I've now got even less steps to cause the problem
composer create-project drupal/recommended-project:^11 recipe-test cd recipe-test composer require "drupal/inline_translation:1.x-dev as 1.0.0"
But doing
$this->runComposer('require "fixtures/module-b:2.0.1 as 3.0.0"')
in a \Drupal\Tests\Composer\Plugin\Unpack\Functional\UnpackRecipeTest does not cause the problem :( - π©πͺGermany jurgenhaas Gottmadingen
I've tested this successfully. With the commands from #7 I wasn't able to reproduce the issue, but the following showed the error:
composer create-project drupal/recommended-project:^11 recipe-test cd recipe-test composer require drupal/eca # <= This installs version 2.0 composer require drupal/eca:3.0.x-dev drupal/modeler_api:1.0.x-dev # <= This shows the expected error
Then I tried again and patched with this MR first. Then the error was gone.
- π¬π§United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 11.2.x, thanks!