@@ -20,7 +20,7 @@ Different Environments, different Configuration Files
20
20
-----------------------------------------------------
21
21
22
22
A typical Symfony application begins with three environments: ``dev ``,
23
- ``prod ``, and ``test ``. As discussed , each " environment" simply represents
23
+ ``prod ``, and ``test ``. As mentioned , each environment simply represents
24
24
a way to execute the same codebase with different configuration. It should
25
25
be no surprise then that each environment loads its own individual configuration
26
26
file. If you're using the YAML configuration format, the following files
@@ -55,8 +55,8 @@ multiple environments in an elegant, powerful and transparent way.
55
55
56
56
Of course, in reality, each environment differs only somewhat from others.
57
57
Generally, all environments will share a large base of common configuration.
58
- Opening the "dev" configuration file, you can see how this is accomplished
59
- easily and transparently:
58
+ Opening the `` config_dev.yml `` configuration file, you can see how this is
59
+ accomplished easily and transparently:
60
60
61
61
.. configuration-block ::
62
62
@@ -86,7 +86,8 @@ simply first imports from a central configuration file (``config.yml``).
86
86
The remainder of the file can then deviate from the default configuration
87
87
by overriding individual parameters. For example, by default, the ``web_profiler ``
88
88
toolbar is disabled. However, in the ``dev `` environment, the toolbar is
89
- activated by modifying the default value in the ``dev `` configuration file:
89
+ activated by modifying the value of the ``toolbar `` option in the ``config_dev.yml ``
90
+ configuration file:
90
91
91
92
.. configuration-block ::
92
93
@@ -151,9 +152,9 @@ used by each is explicitly set::
151
152
152
153
// ...
153
154
154
- As you can see, the ``prod `` key specifies that this application will run
155
- in the `` prod `` environment. A Symfony application can be executed in any
156
- environment by using this code and changing the environment string.
155
+ The ``prod `` key specifies that this application will run in the `` prod ``
156
+ environment. A Symfony application can be executed in any environment by using
157
+ this code and changing the environment string.
157
158
158
159
.. note ::
159
160
@@ -325,9 +326,7 @@ The new environment is now accessible via::
325
326
certain environments, for debugging purposes, may give too much information
326
327
about the application or underlying infrastructure. To be sure these environments
327
328
aren't accessible, the front controller is usually protected from external
328
- IP addresses via the following code at the top of the controller:
329
-
330
- .. code-block :: php
329
+ IP addresses via the following code at the top of the controller::
331
330
332
331
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {
333
332
die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
@@ -361,17 +360,20 @@ the directory of the environment you're using (most commonly ``dev`` while
361
360
developing and debugging). While it can vary, the ``app/cache/dev `` directory
362
361
includes the following:
363
362
364
- * ``appDevDebugProjectContainer.php `` - the cached "service container" that
365
- represents the cached application configuration;
363
+ ``appDevDebugProjectContainer.php ``
364
+ The cached "service container" that represents the cached application
365
+ configuration.
366
366
367
- * ``appDevUrlGenerator.php `` - the PHP class generated from the routing
368
- configuration and used when generating URLs;
367
+ ``appDevUrlGenerator.php ``
368
+ The PHP class generated from the routing configuration and used when
369
+ generating URLs.
369
370
370
- * ``appDevUrlMatcher.php `` - the PHP class used for route matching - look
371
- here to see the compiled regular expression logic used to match incoming
372
- URLs to different routes;
371
+ ``appDevUrlMatcher.php ``
372
+ The PHP class used for route matching - look here to see the compiled regular
373
+ expression logic used to match incoming URLs to different routes.
373
374
374
- * ``twig/ `` - this directory contains all the cached Twig templates.
375
+ ``twig/ ``
376
+ This directory contains all the cached Twig templates.
375
377
376
378
.. note ::
377
379
0 commit comments