Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6d436b

Browse files
committed
[QuickTour] Use new directory structure
1 parent 215c36d commit c6d436b

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

quick_tour/the_architecture.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ but the recommended structure is as follows:
1515

1616
``app/``
1717
The application configuration, templates and translations.
18+
``bin/``
19+
Executable files (e.g. ``bin/console``).
1820
``src/``
1921
The project's PHP code.
22+
``tests/``
23+
Automatic tests (e.g. Unit tests).
24+
``var/``
25+
Generated files (cache, logs, etc.).
2026
``vendor/``
2127
The third-party dependencies.
2228
``web/``
@@ -30,7 +36,7 @@ stylesheets and JavaScript files. It is also where each :term:`front controller`
3036
lives, such as the production controller shown here::
3137

3238
// web/app.php
33-
require_once __DIR__.'/../app/bootstrap.php.cache';
39+
require_once __DIR__.'/../var/bootstrap.php.cache';
3440
require_once __DIR__.'/../app/AppKernel.php';
3541

3642
use Symfony\Component\HttpFoundation\Request;
@@ -260,7 +266,7 @@ Symfony applications can contain several configuration files defined in
260266
several formats (YAML, XML, PHP, etc.) Instead of parsing and combining
261267
all those files for each request, Symfony uses its own cache system. In
262268
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/``
264270
directory.
265271

266272
In the development environment, Symfony is smart enough to update the cache
@@ -271,10 +277,10 @@ the ``prod`` environment:
271277

272278
.. code-block:: bash
273279
274-
$ php app/console cache:clear --env=prod
280+
$ php bin/console cache:clear --env=prod
275281
276282
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
278284
and help you fix the problem quickly.
279285

280286
Using the Command Line Interface
@@ -288,13 +294,13 @@ Run it without any arguments to learn more about its capabilities:
288294

289295
.. code-block:: bash
290296
291-
$ php app/console
297+
$ php bin/console
292298
293299
The ``--help`` option helps you discover the usage of a command:
294300

295301
.. code-block:: bash
296302
297-
$ php app/console debug:router --help
303+
$ php bin/console debug:router --help
298304
299305
Final Thoughts
300306
--------------

0 commit comments

Comments
 (0)