@@ -27,14 +27,9 @@ to create files and execute the following commands:
2727
2828.. code-block :: bash
2929
30- # Linux, Mac OS X
3130 $ cd projects/
3231 $ symfony new blog
3332
34- # Windows
35- c:\> cd projects/
36- c:\p rojects\> php symfony.phar new blog
37-
3833 This command creates a new directory called ``blog `` that contains a fresh new
3934project based on the most recent stable Symfony version available. In addition,
4035the installer checks if your system meets the technical requirements to execute
@@ -58,27 +53,35 @@ number of files and directories generated automatically:
5853
5954 blog/
6055 ├─ app/
61- │ ├─ console
62- │ ├─ cache/
6356 │ ├─ config/
64- │ ├─ logs/
6557 │ └─ Resources/
58+ ├─ bin
59+ │ └─ console
6660 ├─ src/
6761 │ └─ AppBundle/
62+ ├─ var/
63+ │ ├─ cache/
64+ │ ├─ logs/
65+ │ └─ sessions/
66+ ├─ tests/
67+ │ └─ AppBundle/
6868 ├─ vendor/
6969 └─ web/
7070
7171 This file and directory hierarchy is the convention proposed by Symfony to
7272structure your applications. The recommended purpose of each directory is the
7373following:
7474
75- * ``app/cache/ ``, stores all the cache files generated by the application;
7675* ``app/config/ ``, stores all the configuration defined for any environment;
77- * ``app/logs/ ``, stores all the log files generated by the application;
7876* ``app/Resources/ ``, stores all the templates and the translation files for the
7977 application;
8078* ``src/AppBundle/ ``, stores the Symfony specific code (controllers and routes),
8179 your domain code (e.g. Doctrine classes) and all your business logic;
80+ * ``var/cache/ ``, stores all the cache files generated by the application;
81+ * ``var/logs/ ``, stores all the log files generated by the application;
82+ * ``var/sessions/ ``, stores all the session files generated by the application;
83+ * ``tests/AppBundle/ ``, stores the automatic tests (e.g. Unit tests) of the
84+ application.
8285* ``vendor/ ``, this is the directory where Composer installs the application's
8386 dependencies and you should never modify any of its contents;
8487* ``web/ ``, stores all the front controller files and all the web assets, such
@@ -123,13 +126,18 @@ that follows these best practices:
123126
124127 blog/
125128 ├─ app/
126- │ ├─ console
127- │ ├─ cache/
128129 │ ├─ config/
129- │ ├─ logs/
130130 │ └─ Resources/
131+ ├─ bin/
132+ │ └─ console
131133 ├─ src/
132134 │ └─ AppBundle/
135+ ├─ tests/
136+ │ └─ AppBundle/
137+ ├─ var/
138+ │ ├─ cache/
139+ │ ├─ logs/
140+ └─ sessions/
133141 ├─ vendor/
134142 └─ web/
135143 ├─ app.php
@@ -142,7 +150,7 @@ that follows these best practices:
142150
143151 .. code-block :: bash
144152
145- $ php app /console generate:bundle --namespace=AppBundle --dir=src --format=annotation --no-interaction
153+ $ php bin /console generate:bundle --namespace=AppBundle --dir=src --format=annotation --no-interaction
146154
147155 Extending the Directory Structure
148156---------------------------------
@@ -152,27 +160,6 @@ structure of Symfony, you can
152160:doc: `override the location of the main directories </cookbook/configuration/override_dir_structure >`:
153161``cache/ ``, ``logs/ `` and ``web/ ``.
154162
155- In addition, Symfony3 will use a slightly different directory structure when
156- it's released:
157-
158- .. code-block :: text
159-
160- blog-symfony3/
161- ├─ app/
162- │ ├─ config/
163- │ └─ Resources/
164- ├─ bin/
165- │ └─ console
166- ├─ src/
167- ├─ var/
168- │ ├─ cache/
169- │ └─ logs/
170- ├─ vendor/
171- └─ web/
172-
173- The changes are pretty superficial, but for now, we recommend that you use
174- the Symfony directory structure.
175-
176163.. _`Composer` : https://getcomposer.org/
177164.. _`Get Started` : https://getcomposer.org/doc/00-intro.md
178165.. _`Composer download page` : https://getcomposer.org/download/
0 commit comments