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 616Any help with this issue would be most appreciated. Thanks!
Comments
Comment #2
joachim namysloQuick 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
Comment #3
das-peter commentedI 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.
Comment #4
rajab natshahComment #5
rajab natshahThank you Peter
Merged your pull request
Fix composer array issue with plain array as returned by composer getConfig getRepositories #35
https://github.com/Vardot/varbase-updater/pull/35
Committed and released
vardot/varbase-updater 1.2.10 - Composer ~1.0
https://github.com/Vardot/varbase-updater/releases/tag/1.2.10
--
vardot/varbase-updater 2.0.10 - Composer ~2.0
https://github.com/Vardot/varbase-updater/releases/tag/2.0.10
Comment #6
rajab natshahComment #7
rajab natshahComment #8
rajab natshah