The ORM for v3 is definitely a huge improvement over what v2 offers. It wouldn’t directly fix this issue, but I expect it would make it easier to solve.
If you’re going to upgrade, you should upgrade to the latest, v3.9 if not 4.0. However, while there are some automated tools for converting from v2 to v3 (and from v3 to v4), they are mainly about rearranging file structure, adding namespace declarations, that sort of thing. They can’t really do anything with your custom coding, business logic, etc. So, partly automatic, but not easy.
To make it work, cakephp 4.0 needs php 7.x or is it possible to make it work in php 5.x?
And what tool do you recommend me to use to migrate to v3.9 and then to v4.0?
Here are the tools for converting v2 to v3, guides for migrating through the various minor versions (tools not required for those, just things to be aware of, as they will affect your code), and the v3 to v4 upgrade guide, which includes details on that tool.
Not to be rude, but if you don’t know how to run git clone or command line tools, I feel like converting Cake 2.x to 3.x or 4.x is likely going to be well beyond.
Yes, I did that, but when I executed git clone https://github.com/cakephp/upgrade.git from the v2-v3 tutorial it cloned me the v3-v4 upgrader because when I executed bin/cake upgrade --help it showed me only the subcommands for migrating to v4, it didn’t show me all the subcommands that correspond to v2-v3, and now I cloned the github repository and it gives me this error:
When I run the command bin/cake upgrade rector --rules phpunit80 D:/wamp64/www/estadoatulado/app/tests it gives me this error:
No autoload file could be found. Use the --autoload flag to provide a path.
How can I solve this issue?
In the upgrader are those folders and files, when I run the bin/cake upgrade rector --rules phpunit80 D:/wamp64/www/estadoatulado/app/tests I have to add --autoload vendor/autoload.php?
Cake and its utilities rely heavily on the autoload functionality provided by composer. Whatever folder you’re running bin/cake from is going to need to have all of that, and it should find it automatically. If it’s not in the right place, that will break it. You said those folders weren’t there, now you say they are? Again, sorry, but nothing about this line of questioning is inspiring confidence that you’re going to be able to complete the project; these should be the easy parts.
I run the composer install, I thought that the autoload.php should be in path/to/app and not in the upgrade, but in the upgrade folder is the folder vendor with the file autoload.php in it, for some reason the upgrader doesn’t detect the autoload automatically