Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
OS: MacOS Catalina 10.15.3
Webserver: Localhost (nginx/1.17.9 from Valet Plus
PHP Version: 7.3.11 (from Valet Plus)
Drupal Version: 9.0.0-beta3
Just tried installing D9 beta3 with Composer using the command composer create-project drupal/recommended-project:9.0.0-beta3
and got the following error:
- Installing drupal/core-composer-scaffold (9.0.0-beta3):
[ErrorException]
stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value
The composer installation cannot continue after this.
The installation works as intended if I switch to using beta2.
Comments
Comment #6
xjmThanks for reporting this. I got the same error when I tested the beta after the release.
There are a couple workarounds we tried:
--no-install
, then try again.composer.lock
andvendor
, thencomposer install
,Several Composer initiative contributors and DA staff looked into the problem and have a potential fix to deploy.
Adding some credits for folks who discussed the issue.
Comment #7
xjmComment #8
alexpottHere's the debug backtrace
This occurs on both Composer 1.9.2 and 1.10.6
It does not occur with beta2
The difference in the composer -vvv output at the point of failure...
The beta3 release is on https://github.com/drupal/core-composer-scaffold/releases
Comment #9
alexpottPlaces on the internet where such a composer error has come up before with respect to composer:
Comment #10
alexpottAnd here's the change from beta2 to beta3 for the scaffold plugin.
Note at the failure point no drupal code has run. So it looks like this is being caused by a change to one of the composer.json files or something in packaging for the beta release. And given that
composer create-project drupal/recommended-project:9.0.x-dev
uses pretty much the same composer.json files and works this looks either to be something to do with packaging or to do with howDrupal\Composer\Composer::generateMetapackages()
updates the composer.jsons for releases.Comment #11
drummMixologic spotted that sections like
were recently appearing in lockfile generation.
I added a cleanup for this to the lockfile generator: https://bitbucket.org/drupalorg-infrastructure/subtree-splitter/commits/... that is being deployed now.
Comment #12
drummThat is now deployed, and the lockfile generator has run for 9.0.x, regenerating things like https://github.com/drupal/recommended-project/blob/9.0.x/composer.lock
The best way to test right now is double checking that no other issues exist in installing 9.0.x via Composer.
We have the ability to regenerate these for 9.0.0-beta3 and move the tags in the project templates, or we can wait for 9.0.0-beta4. Moving the tags might not be effective for everyone due to caching.
Comment #13
drummThis is done and this started working for me. I did run
composer clearcache
Comment #14
xjmRC1 worked today with no further DA interventions, so I think we can call this fixed. Thanks!