@@ -14,6 +14,9 @@ executes the ``registerContainerConfiguration()`` method of the ``AppKernel``
1414class::
1515
1616 // app/AppKernel.php
17+ use Symfony\Component\HttpKernel\Kernel;
18+ use Symfony\Component\Config\Loader\LoaderInterface;
19+
1720 class AppKernel extends Kernel
1821 {
1922 // ...
@@ -89,6 +92,9 @@ To make this work, change the code of the
8992method::
9093
9194 // app/AppKernel.php
95+ use Symfony\Component\HttpKernel\Kernel;
96+ use Symfony\Component\Config\Loader\LoaderInterface;
97+
9298 class AppKernel extends Kernel
9399 {
94100 // ...
@@ -110,7 +116,7 @@ files, including the common files:
110116 imports :
111117 - { resource: '../common/config.yml' }
112118 - { resource: 'parameters.yml' }
113- - { resource: 'security.yml' }
119+ - { resource: 'security.yml' }
114120
115121 # ...
116122
@@ -147,9 +153,9 @@ files, including the common files:
147153
148154 # app/config/prod/config.yml
149155 imports :
150- - { resource: '../common/config.yml' }
156+ - { resource: '../common/config.yml' }
151157 - { resource: 'parameters.yml' }
152- - { resource: 'security.yml' }
158+ - { resource: 'security.yml' }
153159
154160 # ...
155161
@@ -189,7 +195,7 @@ files, including the common files:
189195 # app/config/config.yml
190196 imports :
191197 - { resource: 'parameters.yml' }
192- - { resource: 'security.yml' }
198+ - { resource: 'security.yml' }
193199
194200 # ...
195201
@@ -256,6 +262,9 @@ Again, change the code of the ``registerContainerConfiguration()`` method to
256262make Symfony aware of the new file organization::
257263
258264 // app/AppKernel.php
265+ use Symfony\Component\HttpKernel\Kernel;
266+ use Symfony\Component\Config\Loader\LoaderInterface;
267+
259268 class AppKernel extends Kernel
260269 {
261270 // ...
@@ -290,9 +299,9 @@ format (``.yml``, ``.xml``, ``.php``, ``.ini``):
290299 # app/config/config.yml
291300 imports :
292301 - { resource: 'parameters.yml' }
293- - { resource: 'services.xml' }
294- - { resource: 'security.yml' }
295- - { resource: 'legacy.php' }
302+ - { resource: 'services.xml' }
303+ - { resource: 'security.yml' }
304+ - { resource: 'legacy.php' }
296305
297306 # ...
298307
@@ -328,24 +337,24 @@ format (``.yml``, ``.xml``, ``.php``, ``.ini``):
328337 .. caution ::
329338
330339 The ``IniFileLoader `` parses the file contents using the
331- :phpfunction: `parse_ini_file ` function, therefore , you can only set
340+ :phpfunction: `parse_ini_file ` function. Therefore , you can only set
332341 parameters to string values. Use one of the other loaders if you want
333342 to use other data types (e.g. boolean, integer, etc.).
334343
335344If you use any other configuration format, you have to define your own loader
336345class extending it from :class: `Symfony\\ Component\\ DependencyInjection\\ Loader\\ FileLoader `.
337346When the configuration values are dynamic, you can use the PHP configuration
338347file to execute your own logic. In addition, you can define your own services
339- to load configuration from databases and web services.
348+ to load configurations from databases or web services.
340349
341350Global Configuration Files
342351~~~~~~~~~~~~~~~~~~~~~~~~~~
343352
344353Some system administrators may prefer to store sensitive parameters in files
345354outside the project directory. Imagine that the database credentials for your
346- website are stored in the ``/etc/sites/mysite.com/parameters.yml ``. Loading this
347- file is as simple as indicating the full file path when importing it from any
348- other configuration file:
355+ website are stored in the ``/etc/sites/mysite.com/parameters.yml `` file . Loading
356+ this file is as simple as indicating the full file path when importing it from
357+ any other configuration file:
349358
350359.. configuration-block ::
351360
0 commit comments