Skip to content

Commit 338edce

Browse files
committed
docs: add docs
1 parent 389974e commit 338edce

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

user_guide_src/source/changelogs/v4.5.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ Enhancements
172172
Commands
173173
========
174174

175+
- Added ``spark config:check`` command to check Config values. See
176+
:ref:`confirming-config-values` for the details.
175177
- Added ``spark lang:find`` command to update translations keys. See :ref:`generating-translation-files-via-command` for the details.
176178

177179
Testing

user_guide_src/source/general/configuration.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ Some environments, e.g., Docker, CloudFormation, do not permit variable name wit
174174
app_forceGlobalSecureRequests = true
175175
app_CSPEnabled = true
176176

177+
.. _configuration-classes-and-environment-variables:
178+
177179
Configuration Classes and Environment Variables
178180
***********************************************
179181

@@ -351,3 +353,49 @@ the three properties declared, but the value of the ``$target`` property will be
351353
by treating ``RegionalSales`` as a "registrar". The resulting configuration properties:
352354

353355
.. literalinclude:: configuration/011.php
356+
357+
.. _confirming-config-values:
358+
359+
Confirming Config Values
360+
************************
361+
362+
The actual Config object property values are changed at runtime by the :ref:`registrars`
363+
and :ref:`Environment Variables <configuration-classes-and-environment-variables>`.
364+
365+
CodeIgniter has the following :doc:`command <../cli/spark_commands>` to check
366+
Config values.
367+
368+
.. _spark-config-check:
369+
370+
config:check
371+
============
372+
373+
.. versionadded:: 4.5.0
374+
375+
For example, if you want to check the ``Config\App`` instance:
376+
377+
.. code-block:: console
378+
379+
php spark config:check App
380+
381+
The output is like the following:
382+
383+
.. code-block:: none
384+
385+
Config\App#6 (12) (
386+
public 'baseURL' -> string (22) "http://localhost:8080/"
387+
public 'allowedHostnames' -> array (0) []
388+
public 'indexPage' -> string (9) "index.php"
389+
public 'uriProtocol' -> string (11) "REQUEST_URI"
390+
public 'defaultLocale' -> string (2) "en"
391+
public 'negotiateLocale' -> boolean false
392+
public 'supportedLocales' -> array (1) [
393+
0 => string (2) "en"
394+
]
395+
public 'appTimezone' -> string (3) "UTC"
396+
public 'charset' -> string (5) "UTF-8"
397+
public 'forceGlobalSecureRequests' -> boolean false
398+
public 'proxyIPs' -> array (0) []
399+
public 'CSPEnabled' -> boolean false
400+
)
401+

0 commit comments

Comments
 (0)