From 02f24f902beaac981c28a777a7f5e5636fd74d68 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 2 Mar 2020 12:24:12 +0000 Subject: [PATCH 1/2] Add documentation for config escape hatch --- other-docs/getting-started/configuration.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/other-docs/getting-started/configuration.md b/other-docs/getting-started/configuration.md index cc58ad5d..d7b59b82 100644 --- a/other-docs/getting-started/configuration.md +++ b/other-docs/getting-started/configuration.md @@ -135,6 +135,13 @@ if ( Altis\get_environment_type() === 'local' ) { } ``` +### Early Loading Escape Hatch + +Altis will also load a file located at `.config/load-early.php` as soon as possible in the loading process. This file is loaded before the plugin API (`add_action`/`apply_filters`), and before Composer autoloads. + +This should only be used as an escape hatch where necessary, as configuration should be set in the above files where possible. + +If you need to use `load-early.php`, consider filing a feature request for an Altis configuration option. ## Next Steps From 94ed1f195edddbc59646829b3742f1097a86fb26 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 2 Mar 2020 15:03:04 +0000 Subject: [PATCH 2/2] Be stronger about discouraging escape hatch Co-Authored-By: K Adam White --- other-docs/getting-started/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other-docs/getting-started/configuration.md b/other-docs/getting-started/configuration.md index d7b59b82..3ed6d29d 100644 --- a/other-docs/getting-started/configuration.md +++ b/other-docs/getting-started/configuration.md @@ -139,7 +139,7 @@ if ( Altis\get_environment_type() === 'local' ) { Altis will also load a file located at `.config/load-early.php` as soon as possible in the loading process. This file is loaded before the plugin API (`add_action`/`apply_filters`), and before Composer autoloads. -This should only be used as an escape hatch where necessary, as configuration should be set in the above files where possible. +This should **only** be used as an escape hatch where absolutely necessary, as configuration should be set in the above files wherever possible. If you need to use `load-early.php`, consider filing a feature request for an Altis configuration option.