diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php index abd9df9dfd72..e9ee6613d22b 100644 --- a/app/Config/Autoload.php +++ b/app/Config/Autoload.php @@ -13,7 +13,10 @@ * can find the files as needed. * * NOTE: If you use an identical key in $psr4 or $classmap, then - * the values in this file will overwrite the framework's values. + * the values in this file will overwrite the framework's values. + * + * NOTE: This class is required prior to Autoloader instantiation, + * and does not extend BaseConfig. */ class Autoload extends AutoloadConfig { diff --git a/app/Config/Cache.php b/app/Config/Cache.php index c19358ce8449..5ba93328110f 100644 --- a/app/Config/Cache.php +++ b/app/Config/Cache.php @@ -95,7 +95,8 @@ class Cache extends BaseConfig * A string of reserved characters that will not be allowed in keys or tags. * Strings that violate this restriction will cause handlers to throw. * Default: {}()/\@: - * Note: The default set is required for PSR-6 compliance. + * + * NOTE: The default set is required for PSR-6 compliance. */ public string $reservedCharacters = '{}()/\@:'; diff --git a/app/Config/ContentSecurityPolicy.php b/app/Config/ContentSecurityPolicy.php index 18612e15cc37..7799c476f078 100644 --- a/app/Config/ContentSecurityPolicy.php +++ b/app/Config/ContentSecurityPolicy.php @@ -39,7 +39,7 @@ class ContentSecurityPolicy extends BaseConfig // ------------------------------------------------------------------------- // Sources allowed - // Note: once you set a policy to 'none', it cannot be further restricted + // NOTE: once you set a policy to 'none', it cannot be further restricted // ------------------------------------------------------------------------- /** diff --git a/app/Config/Logger.php b/app/Config/Logger.php index 7c7414d47228..3fb341c6c04f 100644 --- a/app/Config/Logger.php +++ b/app/Config/Logger.php @@ -99,7 +99,7 @@ class Logger extends BaseConfig * An extension of 'php' allows for protecting the log files via basic * scripting, when they are to be stored under a publicly accessible directory. * - * Note: Leaving it blank will default to 'log'. + * NOTE: Leaving it blank will default to 'log'. */ 'fileExtension' => '', diff --git a/app/Config/Migrations.php b/app/Config/Migrations.php index af28e8ef508a..3c825667cf69 100644 --- a/app/Config/Migrations.php +++ b/app/Config/Migrations.php @@ -40,7 +40,7 @@ class Migrations extends BaseConfig * using the CLI command: * > php spark make:migration * - * Note: if you set an unsupported format, migration runner will not find + * NOTE: if you set an unsupported format, migration runner will not find * your migration files. * * Supported formats: diff --git a/app/Config/Modules.php b/app/Config/Modules.php index 5b6a639b3957..54079e771f29 100644 --- a/app/Config/Modules.php +++ b/app/Config/Modules.php @@ -4,6 +4,12 @@ use CodeIgniter\Modules\Modules as BaseModules; +/** + * Modules Configuration. + * + * NOTE: This class is required prior to Autoloader instantiation, + * and does not extend BaseConfig. + */ class Modules extends BaseModules { /** diff --git a/app/Config/Paths.php b/app/Config/Paths.php index e419477a51ec..262c745ffa95 100644 --- a/app/Config/Paths.php +++ b/app/Config/Paths.php @@ -12,6 +12,11 @@ * share a system folder between multiple applications, and more. * * All paths are relative to the project's root folder. + * + * NOTE: This class is required prior to Autoloader instantiation, + * and does not extend BaseConfig. + * + * @immutable */ class Paths { diff --git a/system/Config/Services.php b/system/Config/Services.php index a47faf9c53ed..66d0532e5e47 100644 --- a/system/Config/Services.php +++ b/system/Config/Services.php @@ -461,7 +461,7 @@ public static function parser(?string $viewPath = null, ?ViewConfig $config = nu return static::getSharedInstance('parser', $viewPath, $config); } - $viewPath = $viewPath ?: config(Paths::class)->viewDirectory; + $viewPath = $viewPath ?: (new Paths())->viewDirectory; $config ??= config(ViewConfig::class); return new Parser($config, $viewPath, AppServices::locator(), CI_DEBUG, AppServices::logger()); @@ -480,7 +480,7 @@ public static function renderer(?string $viewPath = null, ?ViewConfig $config = return static::getSharedInstance('renderer', $viewPath, $config); } - $viewPath = $viewPath ?: config(Paths::class)->viewDirectory; + $viewPath = $viewPath ?: (new Paths())->viewDirectory; $config ??= config(ViewConfig::class); return new View($config, $viewPath, AppServices::locator(), CI_DEBUG, AppServices::logger());