Skip to content

Commit

Permalink
minor #5044 Minor improvement in the node types explanation (javiereg…
Browse files Browse the repository at this point in the history
…uiluz)

This PR was merged into the 2.3 branch.

Discussion
----------

Minor improvement in the node types explanation

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | 2.3+
| Fixed tickets | -

Commits
-------

987f5a5 "enum" is similar to "scalar", not "array"
96c423a Moved the admonition about the INI loader to the loaders section
c774b8a Improved a bit the information about dumping config
daff271 Minor improvement in the node types explanation
  • Loading branch information
weaverryan committed Mar 14, 2015
2 parents 9b1f5f1 + 987f5a5 commit 2fe8f76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 scalar, but it only allows a finite set of values)
* array
* variable (no validation)

Expand Down Expand Up @@ -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
-----------------
Expand Down
7 changes: 0 additions & 7 deletions components/config/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------

Expand Down
7 changes: 7 additions & 0 deletions components/config/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------

Expand Down

0 comments on commit 2fe8f76

Please sign in to comment.