- Issue created by @bburg
Yes, it converts the repositories key to an object. Can you work up a minimal reproduction composer.json file and post that here please?
- πΊπΈUnited States bburg Washington D.C.
This one has more boilerplate than it probably needs, but I do get the error. Just run site install, enable webform. and run the drush webform-composer-update command.
{ "name": "forumone/drupal-project", "description": "Project template for Drupal projects with composer.", "type": "project", "license": "GPL-2.0-or-later", "repositories": [ { "type": "composer", "url": "https://packages.drupal.org/8" }, { "type": "composer", "url": "https://asset-packagist.org" } ], "require": { "composer/installers": "^1.10", "cweagans/composer-patches": "^1.7", "drupal/core-composer-scaffold": "^10", "drupal/core-recommended": "^10", "drupal/core-vendor-hardening": "^10", "drupal/libraries": "^4.0", "drupal/webform": "^6.2", "drush/drush": "^13.2", "joachim-n/composer-manifest": "^1", "npm-asset/select2": "^4.0", "oomphinc/composer-installers-extender": "^2.0", "rvtraveller/qs-composer-installer": ">=1.1", "vlucas/phpdotenv": "^4.0", "webmozart/path-util": ">=2.3" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "drupal/coder": "^8.3", "mglaman/phpstan-drupal": "^1.1", "phpspec/prophecy-phpunit": "^2", "phpstan/extension-installer": "^1.2", "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", "squizlabs/php_codesniffer": "^3.7" }, "conflict": { "drupal/drupal": "*" }, "minimum-stability": "dev", "prefer-stable": true, "config": { "sort-packages": true, "platform": { "ext-gd": "1.0.0", "ext-opcache": "1.0.0", "ext-pdo": "1.0.0" }, "allow-plugins": { "cweagans/composer-patches": true, "composer/installers": true, "drupal/core-composer-scaffold": true, "drupal/core-vendor-hardening": true, "drupal/console-extend-plugin": true, "dealerdirect/phpcodesniffer-composer-installer": true, "joachim-n/composer-manifest": true, "phpstan/extension-installer": true, "rvtraveller/qs-composer-installer": true, "oomphinc/composer-installers-extender": true } }, "autoload": { "classmap": [ "scripts/composer/ScriptHandler.php" ], "files": [ "load.environment.php" ] }, "scripts": { "install-codestandards": [ "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run" ], "php-stan": [ "./vendor/bin/phpstan --memory-limit=1024M" ], "phpcs": [ "./vendor/bin/phpcs" ], "phpcbf": [ "./vendor/bin/phpcbf" ], "build-assets": [ "composer install --optimize-autoloader --no-dev" ], "lint": "find web/modules/custom web/themes/custom -name '*.php' -exec php -l {} \\;", "code-sniff": [ "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor ./web/modules/custom", "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor ./web/themes/custom", "./vendor/bin/phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor ./web/modules/custom", "./vendor/bin/phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor ./web/themes/custom" ], "unit-test": "echo 'No unit test step defined.'", "pre-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "pre-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "post-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles", "@install-codestandards" ], "post-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ], "post-create-project-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ] }, "extra": { "composer-exit-on-patch-failure": true, "patches-file": "composer.patches.json", "patchLevel": { "drupal/core": "-p2" }, "drupal-scaffold": { "file-mapping": { "[web-root]/CHANGELOG.txt": false, "[web-root]/COPYRIGHT.txt": false, "[web-root]/INSTALL.mysql.txt": false, "[web-root]/INSTALL.pgsql.txt": false, "[web-root]/INSTALL.sqlite.txt": false, "[web-root]/INSTALL.txt": false, "[web-root]/LICENSE.txt": false, "[web-root]/MAINTAINERS.txt": false, "[web-root]/README.md": false, "[web-root]/UPDATE.txt": false, "[web-root]/USAGE.txt": false }, "locations": { "web-root": "web/" } }, "installer-paths": { "web/core": [ "type:drupal-core" ], "web/libraries/{$name}": [ "type:drupal-library", "type:bower-asset", "type:npm-asset" ], "web/modules/contrib/{$name}": [ "type:drupal-module" ], "web/profiles/contrib/{$name}": [ "type:drupal-profile" ], "web/themes/contrib/{$name}": [ "type:drupal-theme" ], "drush/Commands/contrib/{$name}": [ "type:drupal-drush" ] }, "installer-types": [ "bower-asset", "npm-asset" ] } }
- πΊπΈUnited States bburg Washington D.C.
I updated the example in my previous comment to use a version starting from composer create-project per the documentation in
https://www.drupal.org/docs/develop/using-composer/manage-dependencies β instead of my own starter version.I still get the error as before.
Yes, of course. It is reproducible. If you are looking for a workaround, change the
repositories
key to object-style, which is as follows:"repositories": { "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" } }
- πΊπΈUnited States bburg Washington D.C.
I was just looking into this issue and found that this is a duplicate to π Error: Attempt to assign property on array in WebformLibrariesCommands->setComposerLibraries() Active .