How can I upgrade the CakePHP 4.3 to 4.4 without Upgrade Tool?

How can I upgrade the CakePHP 4.3 to 4.4 without Upgrade Tool?

I installed the Upgrade Tool, but when i run:

[root@se upgrade]# runuser -u *** -- /opt/plesk/php/8.2/bin/php bin/cake.php upgrade rector --rules cakephp44 /var/www/vhosts/****/****/src
PHP Warning:  Unsupported declare 'strict_types' in /var/www/vhosts/****/****/upgrade/vendor/rector/rector/bin/rector.php on line 3
PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in /var/www/vhosts/****/****/upgrade/vendor/rector/rector/bin/rector.php on line 33

I spent half a day debugging.
Maybe it would be easier to update manually. Is it possible or is it too complicated.

You can definitely upgrade manually. The main part is to change your composer.json to allow CakePHP 4.4 to be installed via e.g. using "cakephp/cakephp": "4.4.*" as a version string

Also enabling debug mode and setting

'Error' => [
    'errorLevel' => E_ALL,
]

in your config/app.php helps you show verbose error messages.

The rest is basically following the errors or deprecation warnings displayed on your page and fix them accordingly.

4.4 Migration Guide - 4.x has a list of most if not all deprecations and changes which have happend.

In the case of CakePHP 4.4 the main part is most likely inside your config/bootstrap.php to use the new ErrorTrap and ExceptionTrap classes.

Very surprising that there would be a syntax error in a rector source file.

That line in rector is just a method decleration.

That error happens if you execute the rector tool with PHP 5.6 or lower as you can see here:

Yes, but as you can see above, I’m running 8.2.

Anyway, I’ll try the manual upgrade. I tried it once, everything seemed to work except for DebugKit.

your command indicates that you are running 8.2 but something along the way seems to have changed that. Can’t say why because this heavily depends on your server config.

your other warning PHP Warning: Unsupported declare 'strict_types' also indicates a PHP Version < 7.0 because declare(strict_types=1) was added in PHP 7.0

But if you got it running then it doesn’t matter