Since I bought a new PC, I am trying to upgrade the version as Cakephp I was using moves.
I can't do it well.

Old macOS 10.9.5 environment
cakephp 2.5.5

New macOS 10.15.7
composer 2.0.7

From the oldest myProject (cakephp)
Copy to any location
/ var/www/html/myProject

I installed composer referring to here.

I ran it referring to the above site.

[vagrant @ localhost] $git clone git: //github.com/cakephp/upgrade
[vagrant @ localhost upgrade] $composer install
Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
>Cake \ Composer \ Installer \ PluginInstaller :: postAutoloadDump
3 packages i am using are looking for funding.
Use the `composer fund` command to find out more!
>App \ Console \ Installer :: postInstall
Created `config/app.php` file
Created `/ home/vagrant/upgrade/vendor/cakephp/app/tmp/cache/views` directory
Set Folder Permissions? (Default to Y) [Y, n]? Y
↑ I got this message on the way, but it was completed.
[vagrant @ localhost upgrade] $bin/cake upgrade all/var/www/html/myProject/app

If i check in myProject/app
bin, src, tests
Folder was created
There is no vendor and the Config is empty.

The contents of myProject/app
Move directly under myProject
When the browser is displayed, it is displayed as follows.

Warning: include (Cake/bootstrap.php): failed to open stream: No such file or directory in /vagrant/myProject/webroot/index.php on line 90
Warning: include (): Failed opening'Cake/bootstrap.php' for inclusion (include_path ='/ vagrant/lib:.:/usr/share/pear:/usr/share/php') in/vagrant/myProject/webroot /index.php on line 90
Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your/cake core directory and your/vendors root directory. In/vagrant/myProject/webroot /index.php on line 99

I searched a lot
What's wrong
What is the missing process
I don't know at all.
Thanks for your professor.

  • Answer # 1

    First of all, it is presumed that webroot/index.php is still CakePHP 2 as the cause of the error.

    Not all upgrade tools will upgrade, only update method names and filenames. (See: upgrade/docs at master · dereuromark/upgrade
    It does not update the configuration file or application bootstrap, so you need to update it yourself.

    If you are migrating from 2.x to 3.x, please read the following migration guide first.
    3.0 Migration Guide-3.9

    Next, you need to read the migration guide for each minor version up to the latest 3.x series, 3.9.

    (This is the reason why it seems impossible for beginners to have a lot of necessary knowledge.

    The way to migrate is to create a new CakePHP 3.x project, move the current settings, then copy the current source upgraded with dereuromark/upgrade to the new project, and the part that does not work I think it is better to proceed by adjusting.
    If it is a small one, it may be faster to recreate it from scratch.

    Please note that the upgrade tool is currently targeted for upgrades to 4.x. If you want to stop at 3.x, you can use the cake3 branch.

  • Answer # 2

    Cakes 2 to 3 are difficult even for veterans, so you should give up.
    It may be impossible for beginners.
    If you made it yourself, 4 is already out, so it's faster to remake everything.