Open schmunk42 opened 7 years ago
Stacktrace:
Fatal error: Uncaught Error: Call to undefined method Wikimedia\Composer\Merge\PluginState::shouldMergeDev() in phar:///opt/bin/composer.phar/src/Composer/Plugin/PluginManager.php(194) : eval()'d code:300
Stack trace:
#0 [internal function]: Wikimedia\Composer\MergePlugin_composer_tmp2->onDependencySolve(Object(Composer\Installer\InstallerEvent))
#1 phar:///opt/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(170): call_user_func(Array, Object(Composer\Installer\InstallerEvent))
#2 phar:///opt/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(134): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Installer\InstallerEvent))
#3 phar:///opt/bin/composer.phar/src/Composer/Installer.php(458): Composer\EventDispatcher\EventDispatcher->dispatchInstallerEvent('pre-dependencie...', true, Object(Composer\DependencyResolver\DefaultPolicy), Object(Composer\DependencyResolver\Pool), Object(Composer\Repository\CompositeRepository), Object(Composer\DependencyResolver\Request))
#4 ph in phar:///opt/bin/composer.phar/src/Composer/Plugin/PluginManager.php(194) : eval()'d code on line 300
Global installation is not a considered or expected use case. Composer-merge-plugin is intended to be used cooperatively with the root composer.json for any particular deployment. What is your expected behavior with the plugin installed globally?
Because we're using it in most of our projects we added it to our development environment (Docker images). We're usually working with build tools from this image, including composer. Some other plugins only work in global mode, I just did not saw anything stating that you should not do this :) I also thought it would save one run of dependency resolution, if it is already there.
So, maybe something worth adding to the docs... or disallow global installation or throw a warning.
I have 1.3.1 installed globally and no require in my project.
While
update
runs fine, I noticed that in mycomposer.lock
I get "forcibly" injected version 1.4.0 of this plugin. When runningcomposer show
it shows the the plugin, butcomposer why ...
claims the package is unknown.When running
install
I get this error:My current workaround is to limit installations to 1.3 in my root
composer.json
Does the plugin needs to inject itself at all? If so, I think it would be better to inject its current version.