Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
1a587c5
Added February changelog
wouterj Mar 1, 2015
653ac94
fix changelog syntax
xabbuh Mar 2, 2015
515e87c
Merge branch '2.7'
weaverryan Mar 2, 2015
a2395ef
minor #5054 [Changelog] fix changelog syntax (xabbuh)
weaverryan Mar 2, 2015
feb621b
Merge branch '2.7'
weaverryan Mar 13, 2015
f24c84f
Merge branch '2.7'
weaverryan Mar 14, 2015
3fb0d42
Merge branch '2.7'
weaverryan Mar 15, 2015
7681e39
Merge branch '2.7'
weaverryan Mar 24, 2015
5dd50f5
Merge branch '2.7'
wouterj Apr 2, 2015
392398b
Merge branch '2.7'
wouterj Apr 4, 2015
56fe069
Merge branch '2.7'
wouterj Apr 5, 2015
e84182d
Added March changelog
wouterj Apr 5, 2015
c4e07cc
Merge branch '2.7'
wouterj Apr 7, 2015
2e86186
Merge branch '2.8'
weaverryan Apr 15, 2015
b74593c
Merge branch '2.8'
weaverryan Apr 17, 2015
701f2cf
Merge branch '2.8'
wouterj Apr 26, 2015
f0429d7
Merge branch '2.8'
weaverryan Apr 27, 2015
83636f0
Merge branch '2.8'
wouterj May 2, 2015
041b2af
Merge branch '2.8'
wouterj May 2, 2015
643f4c4
Merge branch '2.8'
wouterj May 2, 2015
c1cbb9a
Merge branch '2.8'
weaverryan May 3, 2015
de9b3d5
Merge branch '2.8'
wouterj May 10, 2015
25c9705
Merge branch '2.8'
wouterj May 17, 2015
12d8531
Merge branch '2.8'
weaverryan May 22, 2015
c2b92e1
Merge branch '2.8'
wouterj May 23, 2015
2d64dd5
Merge branch '2.8'
weaverryan May 23, 2015
7cadcdc
Merge branch '2.8'
wouterj May 24, 2015
c3fd4f5
Merge branch '2.8'
wouterj May 24, 2015
68f51df
Merge branch '2.8'
weaverryan May 25, 2015
0c089ec
Update create_form_type_extension.rst
May 28, 2015
78bab15
Merge branch '2.8'
weaverryan May 29, 2015
ed88e1c
bug #5328 Update create_form_type_extension.rst (jackdelin)
wouterj May 31, 2015
d6c5d5b
Merge branch '2.8'
wouterj May 31, 2015
6a9a26a
Merge branch '2.8'
wouterj May 31, 2015
f78cab7
Merge branch '2.8'
wouterj May 31, 2015
078bb2d
Merge branch '2.8'
wouterj Jun 7, 2015
d01d7ab
Remove deprecated parameters
norkunas Jun 10, 2015
a68ff44
Merge branch '2.8'
weaverryan Jun 19, 2015
41d1733
Merge branch '2.8'
weaverryan Jun 19, 2015
2d430dc
Merge branch '2.8'
wouterj Jun 20, 2015
cc87822
Merge branch '2.8'
weaverryan Jun 28, 2015
0ef7e1a
Merge branch '2.8'
weaverryan Jun 28, 2015
e08724e
Merge branch '2.8'
weaverryan Jun 30, 2015
7d6737b
Merge branch '2.8'
wouterj Jul 1, 2015
3cdbc7c
Merge branch '2.8'
weaverryan Jul 2, 2015
b3a32af
Merge branch '2.8'
xabbuh Jul 2, 2015
11237e7
Merge branch '2.8'
xabbuh Jul 6, 2015
6cc3445
Merge branch '2.7'
weaverryan Jul 7, 2015
3244eed
Merge branch '2.8'
weaverryan Jul 8, 2015
2bb0d16
Merge branch '2.8'
weaverryan Jul 12, 2015
55a841d
Merge branch '2.8'
weaverryan Jul 15, 2015
2c6aa2f
Merge branch '2.8'
weaverryan Jul 15, 2015
b77b148
Merge branch '2.8'
weaverryan Jul 16, 2015
e166d69
Merge branch '2.8'
weaverryan Jul 16, 2015
6603c33
Merge branch '2.8'
xabbuh Jul 17, 2015
2a30c19
Merge branch '2.8'
wouterj Jul 23, 2015
7711e97
Merge branch '2.8'
xabbuh Jul 23, 2015
14b39c3
Merge branch '2.8'
wouterj Jul 28, 2015
489adc2
Merge branch '2.8'
wouterj Jul 28, 2015
dc93af2
Merge branch '2.8'
wouterj Jul 28, 2015
fceaa9f
feature #5374 Remove deprecated parameters (norkunas)
wouterj Jul 28, 2015
ee7f14f
Merge branch '2.8'
weaverryan Aug 8, 2015
8a2205c
Merge branch '2.8'
wouterj Aug 9, 2015
135d4b8
Added July changelog
wouterj Aug 9, 2015
e0a8dfe
Merge branch '2.8'
wouterj Aug 12, 2015
6fc096e
Merge branch '2.8'
xabbuh Aug 18, 2015
b25b9e5
Merge branch '2.8'
xabbuh Aug 19, 2015
feb2ab1
Remove mentions of Symfony1
wouterj Jul 29, 2015
a991ea1
Merge branch '2.8'
weaverryan Aug 21, 2015
26ca438
minor #5579 [3.0] Remove mentions of Symfony1 (WouterJ)
wouterj Aug 22, 2015
7eaf928
Merge branch '2.8'
wouterj Aug 23, 2015
a30b0fa
Merge branch '2.8'
weaverryan Aug 28, 2015
1941e85
[#5480] Adding missing map entry (added 2 so it's easier to find)
weaverryan Aug 28, 2015
3a4e8ca
Merge branch '2.8'
weaverryan Aug 28, 2015
7c926c6
Merge branch '2.8'
wouterj Sep 1, 2015
bb2f991
Added August changelog
wouterj Sep 1, 2015
9f8d766
Merge branch '2.8'
weaverryan Sep 2, 2015
b1ba29d
Merge branch '2.8'
wouterj Sep 5, 2015
fbc7a8a
Merge branch '2.8'
xabbuh Sep 23, 2015
a46560c
Merge branch '2.8'
xabbuh Sep 23, 2015
194f5cc
Merge branch '2.8'
xabbuh Sep 24, 2015
1b91720
Merge branch '2.8'
xabbuh Oct 3, 2015
0e3f25b
Merge branch '2.8'
xabbuh Oct 8, 2015
46096d3
Merge branch '2.8'
wouterj Oct 11, 2015
b13593e
Merge branch '2.8'
xabbuh Oct 12, 2015
a0b06ae
Merge remote-tracking branch 'origin/master'
weaverryan Oct 14, 2015
9569e2d
Merge branch '2.8'
weaverryan Oct 15, 2015
b785d35
Merge branch '2.8'
weaverryan Oct 15, 2015
71d51f8
Merge branch '2.8'
xabbuh Oct 17, 2015
d7ae2a0
Merge branch '2.8'
xabbuh Oct 19, 2015
d8db51a
Merge branch '2.8'
xabbuh Nov 1, 2015
8465e85
Merge branch '2.8'
xabbuh Nov 5, 2015
267e898
Merge branch '2.8'
xabbuh Nov 8, 2015
af97ce1
Merge branch '2.8'
xabbuh Nov 26, 2015
215c36d
[BestPractices] Use new directory structure
wouterj Nov 28, 2015
c6d436b
[QuickTour] Use new directory structure
wouterj Nov 28, 2015
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[BestPractices] Use new directory structure
  • Loading branch information
wouterj committed Nov 28, 2015
commit 215c36dc1db1fd1fb3ab3d0d3780796ed2fa10c0
6 changes: 5 additions & 1 deletion best_practices/business-logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Inside here, you can create whatever directories you want to organize things:
│ └─ AppBundle/
│ └─ Utils/
│ └─ MyClass.php
├─ tests/
├─ var/
├─ vendor/
└─ web/

Expand All @@ -40,6 +42,8 @@ and put things there:
│ │ └─ Utils/
│ │ └─ MyClass.php
│ └─ AppBundle/
├─ tests/
├─ var/
├─ vendor/
└─ web/

Expand Down Expand Up @@ -318,7 +322,7 @@ command:

.. code-block:: bash

$ php app/console doctrine:fixtures:load
$ php bin/console doctrine:fixtures:load

Careful, database will be purged. Do you want to continue Y/N ? Y
> purging database
Expand Down
57 changes: 22 additions & 35 deletions best_practices/creating-the-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ to create files and execute the following commands:

.. code-block:: bash

# Linux, Mac OS X
$ cd projects/
$ symfony new blog

# Windows
c:\> cd projects/
c:\projects\> php symfony.phar new blog

This command creates a new directory called ``blog`` that contains a fresh new
project based on the most recent stable Symfony version available. In addition,
the installer checks if your system meets the technical requirements to execute
Expand All @@ -58,27 +53,35 @@ number of files and directories generated automatically:

blog/
├─ app/
│ ├─ console
│ ├─ cache/
│ ├─ config/
│ ├─ logs/
│ └─ Resources/
├─ bin
│ └─ console
├─ src/
│ └─ AppBundle/
├─ var/
│ ├─ cache/
│ ├─ logs/
│ └─ sessions/
├─ tests/
│ └─ AppBundle/
├─ vendor/
└─ web/

This file and directory hierarchy is the convention proposed by Symfony to
structure your applications. The recommended purpose of each directory is the
following:

* ``app/cache/``, stores all the cache files generated by the application;
* ``app/config/``, stores all the configuration defined for any environment;
* ``app/logs/``, stores all the log files generated by the application;
* ``app/Resources/``, stores all the templates and the translation files for the
application;
* ``src/AppBundle/``, stores the Symfony specific code (controllers and routes),
your domain code (e.g. Doctrine classes) and all your business logic;
* ``var/cache/``, stores all the cache files generated by the application;
* ``var/logs/``, stores all the log files generated by the application;
* ``var/sessions/``, stores all the session files generated by the application;
* ``tests/AppBundle/``, stores the automatic tests (e.g. Unit tests) of the
application.
* ``vendor/``, this is the directory where Composer installs the application's
dependencies and you should never modify any of its contents;
* ``web/``, stores all the front controller files and all the web assets, such
Expand Down Expand Up @@ -123,13 +126,18 @@ that follows these best practices:

blog/
├─ app/
│ ├─ console
│ ├─ cache/
│ ├─ config/
│ ├─ logs/
│ └─ Resources/
├─ bin/
│ └─ console
├─ src/
│ └─ AppBundle/
├─ tests/
│ └─ AppBundle/
├─ var/
│ ├─ cache/
│ ├─ logs/
└─ sessions/
├─ vendor/
└─ web/
├─ app.php
Expand All @@ -142,7 +150,7 @@ that follows these best practices:

.. code-block:: bash

$ php app/console generate:bundle --namespace=AppBundle --dir=src --format=annotation --no-interaction
$ php bin/console generate:bundle --namespace=AppBundle --dir=src --format=annotation --no-interaction

Extending the Directory Structure
---------------------------------
Expand All @@ -152,27 +160,6 @@ structure of Symfony, you can
:doc:`override the location of the main directories </cookbook/configuration/override_dir_structure>`:
``cache/``, ``logs/`` and ``web/``.

In addition, Symfony3 will use a slightly different directory structure when
it's released:

.. code-block:: text

blog-symfony3/
├─ app/
│ ├─ config/
│ └─ Resources/
├─ bin/
│ └─ console
├─ src/
├─ var/
│ ├─ cache/
│ └─ logs/
├─ vendor/
└─ web/

The changes are pretty superficial, but for now, we recommend that you use
the Symfony directory structure.

.. _`Composer`: https://getcomposer.org/
.. _`Get Started`: https://getcomposer.org/doc/00-intro.md
.. _`Composer download page`: https://getcomposer.org/download/
Expand Down
4 changes: 0 additions & 4 deletions best_practices/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,8 @@ installer and then execute this command to download the demo application:

.. code-block:: bash

# Linux and Mac OS X
$ symfony demo

# Windows
c:\> php symfony demo

**The demo application is a simple blog engine**, because that will allow us to
focus on the Symfony concepts and features without getting buried in difficult
implementation details. Instead of developing the application step by step in
Expand Down
4 changes: 2 additions & 2 deletions best_practices/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ A functional test can be as easy as this:

.. code-block:: php

// src/AppBundle/Tests/ApplicationAvailabilityFunctionalTest.php
namespace AppBundle\Tests;
// tests/AppBundle/ApplicationAvailabilityFunctionalTest.php
namespace Tests\AppBundle;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Expand Down