Hello everyone.
My project is currently using:
CakePHP 4.0.7
XAMPP 3.2.4
MSSQL Server 16
PHP 7.4
But we need to migrate to a new server, this server is set with a more updated environment.
XAMPP 3.3.0
MSSQL Server 22
PHP 8.2
I am getting the following error:
“Type of Cake\View\Exception\MissingTemplateException::$file must be string”
I saw that this error has been solved with the version CakePHP 4.3.
Please could you help me with this migration?
How could I migrate my code to a new version without needing to make big changes to my code?
I found this page, but frankly speaking, it is a little bit confusing to me.
Will I need to run the below command 2 times?
php composer.phar require --update-with-dependencies "cakephp/cakephp:^4.2"
php composer.phar require --update-with-dependencies "cakephp/cakephp:^4.3"
And then, the below line?
bin/cake upgrade rector --rules cakephp43 C:\xampp\htdocs\ormsystem\src
Or this?
bin/cake upgrade rector --rules cakephp43 C:\xampp\htdocs\ormsystem\vendor\cakephp\cakephp\src
If I want to update to the newest version, will I need to make big changes to my code? What could be the highest version that I could use without needing to make big changes to my code? If I want to migrate to version 4.6, does that mean I need to run it version by version? (4.2, 4.3, 4.4…) Should I include version 4.1?
And then, will I need to apply more changes?