# Upgrading 4.4 to 4.5 - RESOURCES constant

**URL:** <https://discourse.cakephp.org/t/upgrading-4-4-to-4-5-resources-constant/12018>\
**Category:** Need Help\
**Created:** [May 14, 2024, 6:20pm UTC](https://discourse.cakephp.org/t/upgrading-4-4-to-4-5-resources-constant/12018 "2024-05-14T18:20:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mckrti](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@mckrti](https://discourse.cakephp.org/u/mckrti)\
**Post date:** [May 14, 2024, 6:20pm UTC](https://discourse.cakephp.org/t/upgrading-4-4-to-4-5-resources-constant/12018/1 "2024-05-14T18:20:34Z")

</div>

I’m trying to update our CakePHP 4.4 to 4.5.

I am running `bin/cake upgrade rector --rules cakephp45 src/`

But then I get: `PHP Fatal error: Uncaught Error: Undefined constant "RESOURCES" in /[...]/cakephp/config/app.php:69`

Line 69 is:

`'locales' => [RESOURCES . 'locales' . DS],`

Which matches this: [app/config/app.php at 4.x · cakephp/app · GitHub](https://github.com/cakephp/app/blob/4.x/config/app.php)

Any help is appreciated.

---

<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:** [May 14, 2024, 7:25pm UTC](https://discourse.cakephp.org/t/upgrading-4-4-to-4-5-resources-constant/12018/2 "2024-05-14T19:25:10Z")

</div>

> <https://github.com/cakephp/app/blob/4.x/config/paths.php#L81>

---

<div class="post-metadata">

**Author:** ![mckrti](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@mckrti](https://discourse.cakephp.org/u/mckrti)\
**Post date:** [May 14, 2024, 7:49pm UTC](https://discourse.cakephp.org/t/upgrading-4-4-to-4-5-resources-constant/12018/3 "2024-05-14T19:49:49Z")

</div>

> [@KevinPfeifer](#):
>
> ```auto
> /*
> * Path to the resources directory.
> */
> define('RESOURCES', ROOT . DS . 'resources' . DS);
> 
> ```

Thank you! For some reason I was missing that line.

---

<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:** [May 14, 2024, 8:39pm UTC](https://discourse.cakephp.org/t/upgrading-4-4-to-4-5-resources-constant/12018/4 "2024-05-14T20:39:58Z")

</div>

after each minor (and especially major) update its always a good idea to compare the current recommended cakephp/app template with what your app is currently at.

If there is something in the app template which is not in your app it should be copied over
