Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method Wikimedia\Composer\Merge\V2\PluginState::shouldMergeReplace() breaking deployments after upgrade to 2.1 #266

Open
mlncn opened this issue Apr 24, 2023 · 2 comments

Comments

@mlncn
Copy link

mlncn commented Apr 24, 2023

Our local composer update works fine but the composer install in our deployment process is breaking with that shouldMergeReplace() is undefined error.

Upgrading wikimedia/composer-merge-plugin (v2.0.1 => v2.1.0)

is in the list of changes.

Locking it to 2.0.1 fixes the error. Other changes such as upgrading composer/installers from v1.12.0 to v2.2.0 did not help, though i know when dealing with composer meta things (installers, merge plugin, etc) it can take two cycles of composer, which maybe is why our build process doesn't work, but for now reporting the error because seems no one else has, and our workaround of holding it at 2.0.1.

@mlncn
Copy link
Author

mlncn commented Apr 24, 2023

Stacktrace output from failed pipeline:

Generating optimized autoload files
In ExtraPackage.php line 175:
                                                                               
  [Error]                                                                      
  Call to undefined method Wikimedia\Composer\Merge\V2\PluginState::shouldMer  
  geReplace()                                                                  
                                                                               
Exception trace:
  at /builds/agaric/sites/mass-design/mass/vendor/wikimedia/composer-merge-plugin/src/ExtraPackage.php:175
 Wikimedia\Composer\Merge\V2\ExtraPackage->mergeInto() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php(274) : eval()'d code:280
 Wikimedia\Composer\Merge\V2\MergePlugin_composer_tmp1->mergeFile() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php(274) : eval()'d code:250
 Wikimedia\Composer\Merge\V2\MergePlugin_composer_tmp1->mergeFiles() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php(274) : eval()'d code:211
 Wikimedia\Composer\Merge\V2\MergePlugin_composer_tmp1->onInstallUpdateOrDump() at phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:206
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:129
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:189
 Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/bin/composer/src/Composer/Installer.php:349
 Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/InstallCommand.php:146
 Composer\Command\InstallCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:377
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:141
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:88
 require() at /usr/bin/composer:29

@RishiKulshreshtha
Copy link

Facing the exact same issue, subscribing! +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants