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

**URL:** <https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923>\
**Category:** Need Help\
**Tags:** release, help\
**Created:** [January 31, 2023, 12:39pm UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923 "2023-01-31T12:39:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![EronarDiaras](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/eronardiaras/32/2669_2.png) [@EronarDiaras](https://discourse.cakephp.org/u/EronarDiaras)\
**Post date:** [January 31, 2023, 12:39pm UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923/1 "2023-01-31T12:39:15Z")

</div>

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

I installed the Upgrade Tool, but when i run:

```auto
[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.

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [January 31, 2023, 1:58pm UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923/2 "2023-01-31T13:58:41Z")

</div>

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

```auto
'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](https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html) 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](https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html#errorhandler-consoleerrorhandler).

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [January 31, 2023, 2:37pm UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923/3 "2023-01-31T14:37:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [January 31, 2023, 7:30pm UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923/4 "2023-01-31T19:30:12Z")

</div>

That line in rector is just a method decleration.

> <https://github.com/rectorphp/rector/blob/main/bin/rector.php#L33>

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

> **[PHP Sandbox - Execute PHP code online through your browser](https://onlinephp.io/c/f1a7b)**
>
> Run PHP code in your browser online with this tool in 400+ PHP versions

---

<div class="post-metadata">

**Author:** ![EronarDiaras](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/eronardiaras/32/2669_2.png) [@EronarDiaras](https://discourse.cakephp.org/u/EronarDiaras)\
**Post date:** [February 1, 2023, 8:06am UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923/5 "2023-02-01T08:06:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [February 1, 2023, 8:48am UTC](https://discourse.cakephp.org/t/how-can-i-upgrade-the-cakephp-4-3-to-4-4-without-upgrade-tool/10923/6 "2023-02-01T08:48:25Z")

</div>

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
