File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ within the class' constructor:
105
105
106
106
.. literalinclude :: configuration/008.php
107
107
108
+ .. _database-config-with-env-file :
109
+
108
110
**************************
109
111
Configuring with .env File
110
112
**************************
Original file line number Diff line number Diff line change @@ -183,6 +183,10 @@ are considered for merging into the configuration object's properties.
183
183
.. important :: You cannot add a new property by setting environment variables,
184
184
nor change a scalar value to an array. See :ref: `env-var-replacements-for-data `.
185
185
186
+ .. note :: This feature is implemented in the ``CodeIgniter\Config\BaseConfig``
187
+ class. So it will not work with a few files in the **app/Config ** folder
188
+ that do not extends the class.
189
+
186
190
If the prefix of a namespaced variable exactly matches the namespace of the configuration
187
191
class, then the trailing part of the setting (after the dot) is treated as a configuration
188
192
property. If it matches an existing configuration property, the environment variable's
@@ -233,6 +237,8 @@ expect your ``Config\App`` to magically have that property and value at run time
233
237
When you have the property ``$default = ['encrypt' => false] `` in your
234
238
``Config\Database ``, you cannot change the ``encrypt `` value to an array even if
235
239
you put ``database.default.encrypt.ssl_verify = true `` in your **.env **.
240
+ If you want to do like that, see
241
+ :ref: `Database Configuration <database-config-with-env-file >`.
236
242
237
243
Treating Environment Variables as Arrays
238
244
========================================
You can’t perform that action at this time.
0 commit comments