cancel
Showing results for 
Search instead for 
Did you mean: 

Composer problem

SOLVED
Highlighted

Composer problem

When I run any composer command I get this error:

 

PHP Fatal error: Uncaught Error: Undefined class constant 'PRE_COMMAND_RUN' in /var/www/drug-mart.ca/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php:63
Stack trace:
#0 /usr/share/php/Composer/EventDispatcher/EventDispatcher.php(378): Laminas\DependencyPlugin\DependencyRewriterPlugin::getSubscribedEvents()
#1 /usr/share/php/Composer/Plugin/PluginManager.php(239): Composer\EventDispatcher\EventDispatcher->addSubscriber(Object(Laminas\DependencyPlugin\DependencyRewriterPlugin))
#2 /usr/share/php/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Laminas\DependencyPlugin\DependencyRewriterPlugin))
#3 /usr/share/php/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
#4 /usr/share/php/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loadRepository(Object(Composer\Repository\InstalledFilesystemRepository))
#5 /usr/share/php/Composer/Factory.php(384): Composer\Plugin\PluginM in /var/www/drug-mart.ca/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php on line 63

Fatal error: Uncaught Error: Undefined class constant 'PRE_COMMAND_RUN' in /var/www/drug-mart.ca/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php:63
Stack trace:
#0 /usr/share/php/Composer/EventDispatcher/EventDispatcher.php(378): Laminas\DependencyPlugin\DependencyRewriterPlugin::getSubscribedEvents()
#1 /usr/share/php/Composer/Plugin/PluginManager.php(239): Composer\EventDispatcher\EventDispatcher->addSubscriber(Object(Laminas\DependencyPlugin\DependencyRewriterPlugin))
#2 /usr/share/php/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Laminas\DependencyPlugin\DependencyRewriterPlugin))
#3 /usr/share/php/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
#4 /usr/share/php/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loadRepository(Object(Composer\Repository\InstalledFilesystemRepository))
#5 /usr/share/php/Composer/Factory.php(384): Composer\Plugin\PluginM in /var/www/drug-mart.ca/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPlugin.php on line 63

 

Please HELP!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Composer problem

Needed to reinstall composer from version 1.6 to 1.10

View solution in original post

1 REPLY 1
Highlighted

Re: Composer problem

Needed to reinstall composer from version 1.6 to 1.10

View solution in original post