@@ -15,8 +15,14 @@ but the recommended structure is as follows:
15
15
16
16
``app/ ``
17
17
The application configuration, templates and translations.
18
+ ``bin/ ``
19
+ Executable files (e.g. ``bin/console ``).
18
20
``src/ ``
19
21
The project's PHP code.
22
+ ``tests/ ``
23
+ Automatic tests (e.g. Unit tests).
24
+ ``var/ ``
25
+ Generated files (cache, logs, etc.).
20
26
``vendor/ ``
21
27
The third-party dependencies.
22
28
``web/ ``
@@ -30,7 +36,7 @@ stylesheets and JavaScript files. It is also where each :term:`front controller`
30
36
lives, such as the production controller shown here::
31
37
32
38
// web/app.php
33
- require_once __DIR__.'/../app /bootstrap.php.cache';
39
+ require_once __DIR__.'/../var /bootstrap.php.cache';
34
40
require_once __DIR__.'/../app/AppKernel.php';
35
41
36
42
use Symfony\Component\HttpFoundation\Request;
@@ -260,7 +266,7 @@ Symfony applications can contain several configuration files defined in
260
266
several formats (YAML, XML, PHP, etc.) Instead of parsing and combining
261
267
all those files for each request, Symfony uses its own cache system. In
262
268
fact, the application configuration is only parsed for the very first request
263
- and then compiled down to plain PHP code stored in the ``app /cache/ ``
269
+ and then compiled down to plain PHP code stored in the ``var /cache/ ``
264
270
directory.
265
271
266
272
In the development environment, Symfony is smart enough to update the cache
@@ -271,10 +277,10 @@ the ``prod`` environment:
271
277
272
278
.. code-block :: bash
273
279
274
- $ php app /console cache:clear --env=prod
280
+ $ php bin /console cache:clear --env=prod
275
281
276
282
When developing a web application, things can go wrong in many ways. The
277
- log files in the ``app /logs/ `` directory tell you everything about the requests
283
+ log files in the ``var /logs/ `` directory tell you everything about the requests
278
284
and help you fix the problem quickly.
279
285
280
286
Using the Command Line Interface
@@ -288,13 +294,13 @@ Run it without any arguments to learn more about its capabilities:
288
294
289
295
.. code-block :: bash
290
296
291
- $ php app /console
297
+ $ php bin /console
292
298
293
299
The ``--help `` option helps you discover the usage of a command:
294
300
295
301
.. code-block :: bash
296
302
297
- $ php app /console debug:router --help
303
+ $ php bin /console debug:router --help
298
304
299
305
Final Thoughts
300
306
--------------
0 commit comments