From 2cb6220d5d145bb084b32a07177cc24252608701 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 13 Jun 2024 18:36:37 +0900 Subject: [PATCH 1/2] chore: add Config namespace to appstarter composer.json To suppress warning like this: Class Config\Email located in ./app/Config/Email.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping. --- admin/starter/composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/starter/composer.json b/admin/starter/composer.json index 0b3a889757bc..b84684d82a4f 100644 --- a/admin/starter/composer.json +++ b/admin/starter/composer.json @@ -20,7 +20,8 @@ }, "autoload": { "psr-4": { - "App\\": "app/" + "App\\": "app/", + "Config\\": "app/Config" }, "exclude-from-classmap": [ "**/Database/Migrations/**" From eee496c02c2430ed39634b07d9d42e617697b63a Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 13 Jun 2024 18:38:29 +0900 Subject: [PATCH 2/2] docs: add note --- user_guide_src/source/concepts/autoloader.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user_guide_src/source/concepts/autoloader.rst b/user_guide_src/source/concepts/autoloader.rst index 2829e1240929..6391148323c8 100644 --- a/user_guide_src/source/concepts/autoloader.rst +++ b/user_guide_src/source/concepts/autoloader.rst @@ -93,6 +93,9 @@ Config files are namespaced in the ``Config`` namespace, not in ``App\Config`` a expect. This allows the core system files to always be able to locate them, even when the application namespace has changed. +.. note:: Since v4.5.3 appstarter, the ``Config\\`` namespace has been added to + **composer.json**'s ``autoload.psr-4``. + Changing App Namespace ----------------------