Hi,
I’m trying to add a new new composer package to my project (twilio/sdk) but I get this error no matter what I try:
In this example I use composer update
:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 50 installs, 0 updates, 0 removals
- Installing cakephp/plugin-installer (1.2.0): Loading from cache
PHP Fatal error: Uncaught Error: Class ‘Cake\Composer\Installer\PluginInstaller’ not found in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php:202
Stack trace:
#0 phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php(62): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#1 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(173): Composer\Installer\PluginInstaller->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Package\CompletePackage))
#2 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(160): Composer\Installer\InstallationManager->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\DependencyResolver\Operation\InstallOperation))
#3 phar:///usr/local/bin/composer/src/Composer/Installer.php(611): Composer\Installer\InstallationManager->execute(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Depe in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php on line 202
Fatal error: Uncaught Error: Class ‘Cake\Composer\Installer\PluginInstaller’ not found in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php:202
Stack trace:
#0 phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php(62): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#1 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(173): Composer\Installer\PluginInstaller->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Package\CompletePackage))
#2 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(160): Composer\Installer\InstallationManager->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\DependencyResolver\Operation\InstallOperation))
#3 phar:///usr/local/bin/composer/src/Composer/Installer.php(611): Composer\Installer\InstallationManager->execute(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Depe in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php on line 202
Here are the require and require-dev lists I have in my composer.json file:
"require": { "php": ">=5.6.0", "cakephp/cakephp": "^3.7", "mobiledetect/mobiledetectlib": "2.*", "cakephp/migrations": "~1.0", "cakephp/plugin-installer": "^1.2", "xety/cake3-cookieauth": "1.*", "drewm/mailchimp-api": "^2.2", "josegonzalez/cakephp-upload": "^3.6", "imagine/imagine": "^0.6.3", "stripe/stripe-php": "^5.7", "crabstudio/recaptcha": "^2.1", "twilio/sdk": "^5.42" }, "require-dev": { "psy/psysh": "@stable", "cakephp/debug_kit": "~3.3", "cakephp/bake": "~1.1" },