wikimedia / composer-merge-plugin

Merge one or more additional composer.json files at Composer runtime
MIT License
926 stars 160 forks source link

Fix namespace check define constant class #193

Closed prhost closed 3 years ago

prhost commented 3 years ago

Solves the undefined constant problem, as you need to enter the full namespace in the string.

Fatal error: Uncaught Error: Undefined class constant 'PRE_DEPENDENCIES_SOLVING' in vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php:159

https://github.com/wikimedia/composer-merge-plugin/issues/184

mcaskill commented 3 years ago

Duplicate of #187. Closed by author; see comment.

prudloff-insite commented 3 years ago

This patch does fix the PRE_DEPENDENCIES_SOLVING error, but I still get this error when running composer install:

PHP Fatal error:  Uncaught Error: Call to undefined method Composer\Installer\InstallerEvent::getRequest() in /mnt/89001ee4-8dbb-4cb0-a7a4-bb066e75a834/workspace/drupal_d9/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php:302
Stack trace:
#0 [internal function]: Wikimedia\Composer\MergePlugin->onDependencySolve()
#1 phar:///mnt/89001ee4-8dbb-4cb0-a7a4-bb066e75a834/workspace/drupal_d9/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(173): call_user_func()
#2 phar:///mnt/89001ee4-8dbb-4cb0-a7a4-bb066e75a834/workspace/drupal_d9/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(134): Composer\EventDispatcher\EventDispatcher->doDispatch()
#3 phar:///mnt/89001ee4-8dbb-4cb0-a7a4-bb066e75a834/workspace/drupal_d9/composer.phar/src/Composer/Installer.php(672): Composer\EventDispatcher\EventDispatcher->dispatchInstallerEvent()
#4 phar:///mnt/89001ee4-8dbb-4cb0-a7a4-bb066e75a834/workspace/drupal_d9/composer.phar/src/Composer/Installer.php(253): Composer\Installer->doInstall()
#5 phar:///mnt/89001ee4-8db in /mnt/89001ee4-8dbb-4cb0-a7a4-bb066e75a834/workspace/drupal_d9/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php on line 302
mcaskill commented 3 years ago

Uncaught Error: Call to undefined method Composer\Installer\InstallerEvent::getRequest() in…

Already known; see comment of #184.

@prudloff-insite Try #189