Hello, thank you for this amazing drupal distribution.

I'm trying to update from 8.7.4 to the latest release using ./bin/update-varbase.sh. This updates successfully from 8.7.4 to 8.7.11 but I cannot update to 8.8.1 using the same method because of a fatal error:

PHP Fatal error:  Uncaught Error: Cannot use object of type Composer\Repository\PackageRepository as array in /var/www/html/example.com/drupal/vendor/vardot/varbase-updater/src/Commands/RefactorComposerCommand.php:616
Stack trace:
#0 /var/www/html/example.com/drupal/vendor/vardot/varbase-updater/src/Commands/RefactorComposerCommand.php(59): vardot\Composer\Commands\RefactorComposerCommand->generate('/var/www/html/r...', 'docroot')
#1 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): vardot\Composer\Commands\RefactorComposerCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application in /var/www/html/example.com/drupal/vendor/vardot/varbase-updater/src/Commands/RefactorComposerCommand.php on line 616

Any help with this issue would be most appreciated. Thanks!

Comments

sameer created an issue. See original summary.

joachim namyslo’s picture

Quick fix:

Compare your old composer.json with the new one from git.

copy and paste all modules you installed manually by useing composer require ... to the new file

do composer update.

Make sure your code base and the old composer.json file as well as a database export are saved somewhere in copy in case something goes wrong

das-peter’s picture

I suspect this happens if the composer version couldn't be updated. I suspect there's a minimum version of composer that's required in order for vardot\Composer\Commands\RefactorComposerCommand to work properly.

rajab natshah’s picture

rajab natshah’s picture

Title: Update Fatal Error from 8.7.11 to 8.8.1 » Fix Fatal Error from 8.7.11 to 8.8.1 by with plain array as returned by composer getConfig getRepositories
rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-8.8.8, +varbase-9.0.0, +varbase-9.0.0-rc1, +composer--1, +composer--2
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.