From daff2713d0c08579b9f5353bfb25b563f4e1a479 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 24 Feb 2015 17:38:31 +0100 Subject: [PATCH 1/4] Minor improvement in the node types explanation --- components/config/definition.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index b4b0dcd5c19..21d28fdf91a 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -95,13 +95,13 @@ Node Type ~~~~~~~~~ It is possible to validate the type of a provided value by using the appropriate -node definition. Node type are available for: +node definition. Node types are available for: -* scalar +* scalar (generic type that includes booleans, strings, integers, floats and ``null``) * boolean * integer (new in 2.2) * float (new in 2.2) -* enum (new in 2.1) +* enum (new in 2.1) (similar to array, but it only allows a finite set of values) * array * variable (no validation) From c774b8a81772b7bffb7b1025cf154ac6fda5d879 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 24 Feb 2015 17:58:02 +0100 Subject: [PATCH 2/4] Improved a bit the information about dumping config --- components/config/definition.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index 21d28fdf91a..8ad3763142e 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -294,7 +294,8 @@ All options can be documented using the :method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::info` method. -The info will be printed as a comment when dumping the configuration tree. +The info will be printed as a comment when dumping the configuration tree with +the ``config:dump`` command. Optional Sections ----------------- From 96c423a4008662e1323e4ba851d5200aae145164 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 24 Feb 2015 18:34:21 +0100 Subject: [PATCH 3/4] Moved the admonition about the INI loader to the loaders section --- components/config/introduction.rst | 7 ------- components/config/resources.rst | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/config/introduction.rst b/components/config/introduction.rst index 11dae2e1d78..b4d075c3b58 100644 --- a/components/config/introduction.rst +++ b/components/config/introduction.rst @@ -9,13 +9,6 @@ The Config Component combine, autofill and validate configuration values of any kind, whatever their source may be (YAML, XML, INI files, or for instance a database). -.. caution:: - - The ``IniFileLoader`` parses the file contents using the - :phpfunction:`parse_ini_file` function, therefore, you can only set - parameters to string values. To set parameters to other data types - (e.g. boolean, integer, etc), the other loaders are recommended. - Installation ------------ diff --git a/components/config/resources.rst b/components/config/resources.rst index a1d46565803..1a5fba23c2b 100644 --- a/components/config/resources.rst +++ b/components/config/resources.rst @@ -4,6 +4,13 @@ Loading Resources ================= +.. caution:: + + The ``IniFileLoader`` parses the file contents using the + :phpfunction:`parse_ini_file` function. Therefore, you can only set + parameters to string values. To set parameters to other data types + (e.g. boolean, integer, etc), the other loaders are recommended. + Locating Resources ------------------ From 987f5a58b1852ef87e8084d15cd0a977e27c8690 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 2 Mar 2015 09:00:16 +0100 Subject: [PATCH 4/4] "enum" is similar to "scalar", not "array" --- components/config/definition.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index 8ad3763142e..396328ef687 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -101,7 +101,7 @@ node definition. Node types are available for: * boolean * integer (new in 2.2) * float (new in 2.2) -* enum (new in 2.1) (similar to array, but it only allows a finite set of values) +* enum (new in 2.1) (similar to scalar, but it only allows a finite set of values) * array * variable (no validation)