cakephp / upgrade

Upgrade tools for CakePHP meant to facilitate migrating from one version of the framework to another
MIT License
110 stars 60 forks source link

Call to undefined method Cake\Upgrade\Application::pluginEvents() #299

Closed alexvanniel closed 1 month ago

alexvanniel commented 1 month ago

I have followed the upgrade guide to the letter as far as I am aware of. However, when I run the upgrade tool on my CakePHP 4.5.7 src/ I get the following error:

PHP Fatal error:  Uncaught Error: Call to undefined method Cake\Upgrade\Application::pluginEvents() in /mnt/projects/cakephp-upgrade/upgrade/vendor/cakephp/console/CommandRunner.php:323
Stack trace:
#0 /mnt/projects/cakephp-upgrade/upgrade/vendor/cakephp/console/CommandRunner.php(167): Cake\Console\CommandRunner->runCommand()
#1 /mnt/projects/cakephp-upgrade/upgrade/bin/cake.php(12): Cake\Console\CommandRunner->run()
#2 {main}
  thrown in /mnt/projects/cakephp-upgrade/upgrade/vendor/cakephp/console/CommandRunner.php on line 323

I have done: git checkout 5.x composer install --no-dev But I keep getting this error.

Am I doing something wrong? Is this a bug? Can someone please advise?

To clarify, I did NOT install the upgrade tool inside my CakePHP 4.5 project, I installed it OUTSIDE of the project in a separate folder away from the project that needs to be upgraded.

ADmad commented 1 month ago

Duplicate of https://github.com/cakephp/cakephp/issues/17923