I am upgrading the existing Cakephp-3.6.16
to Cakephp-4.2
and when firing the below step-4 Rector
command it return the PHP Fatal error.
I followed the below steps for the upgrade
1 Install the upgrade tool
git clone git://github.com/cakephp/upgrade
cd upgrade
git checkout master
composer install --no-dev
- Rename locale files [This command run successfully]
C:\Apache24\htdocs\latest\Techno\upgrade\bin>cake upgrade file_rename locales C:/Apache24/htdocs/latest/Techno
- This command run successfully and upgrade .crt file to .php in “src/templates” folder and the folder is now moved from “Techno/src/templates” to root folder “Techno/templates”.
C:\Apache24\htdocs\latest\Techno\upgrade> cake upgrade file_rename templates C:/Apache24/htdocs/latest/Techno
- This two Rector Refactorings commands are not working and throwing error
C:\Apache24\htdocs\latest\Techno\upgrade\bin> cake upgrade rector --rules phpunit80 C:/Apache24/htdocs/latest/Techno/tests
C:\Apache24\htdocs\latest\Techno\upgrade\bin> cake upgrade rector --rules cakephp40 C:/Apache24/htdocs/latest/Techno/src
PHP Fatal error: Uncaught Error: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found in C:\Apache24\htdocs\Techno\upgrade\vendor\rector\rector\bin\rector.php:38
Stack trace:
#0 C:\Apache24\htdocs\Techno\upgrade\vendor\rector\rector\bin\rector(4): require_once()
#1 {main}
thrown in C:\Apache24\htdocs\Techno\upgrade\vendor\rector\rector\bin\rector.php on line 38
Fatal error: Uncaught Error: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found in C:\Apache24\htdocs\Techno\upgrade\vendor\rector\rector\bin\rector.php:38
Stack trace:
#0 C:\Apache24\htdocs\Techno\upgrade\vendor\rector\rector\bin\rector(4): require_once()
#1 {main}
thrown in C:\Apache24\htdocs\Techno\upgrade\vendor\rector\rector\bin\rector.php on line 38
Is there any steps I missed for upgradaion ?