Skip to content

Commit 3bdfec4

Browse files
committed
Merge branch '2.7' into 2.8
2 parents 3e60dda + 743f73b commit 3bdfec4

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

book/security.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ example, if you use annotations, create something like this::
198198
*/
199199
public function adminAction()
200200
{
201-
return new Response('Admin page!');
201+
return new Response('<html><body>Admin page!</body></html>');
202202
}
203203
}
204204

components/console/introduction.rst

+21
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,27 @@ This prints::
112112

113113
HELLO FABIEN
114114

115+
Command Lifecycle
116+
~~~~~~~~~~~~~~~~~
117+
118+
Commands have three lifecycle methods:
119+
120+
:method:`Symfony\\Component\\Console\\Command\\Command::initialize` *(optional)*
121+
This method is executed before the ``interact()`` and the ``execute()``
122+
methods. Its main purpose is to initialize variables used in the rest of
123+
the command methods.
124+
125+
:method:`Symfony\\Component\\Console\\Command\\Command::interact` *(optional)*
126+
This method is executed after ``initialize()`` and before ``execute()``.
127+
Its purpose is to check if some of the options/arguments are missing
128+
and interactively ask the user for those values. This is the last place
129+
where you can ask for missing options/arguments. After this command,
130+
missing options/arguments will result in an error.
131+
132+
:method:`Symfony\\Component\\Console\\Command\\Command::execute` *(required)*
133+
This method is executed after ``interact()`` and ``initialize()``.
134+
It contains the logic you want the command to execute.
135+
115136
.. _components-console-coloring:
116137

117138
Coloring the Output

cookbook/bundles/best_practices.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ The basic directory structure of an AcmeBlogBundle must read as follows:
8383
├─ AcmeBlogBundle.php
8484
├─ Controller/
8585
├─ README.md
86+
├─ LICENSE
8687
├─ Resources/
87-
│ ├─ meta/
88-
│ │ └─ LICENSE
8988
│ ├─ config/
9089
│ ├─ doc/
9190
│ │ └─ index.rst
@@ -102,9 +101,8 @@ that automated tools can rely on:
102101
* ``README.md``: This file contains the basic description of the bundle and it
103102
usually shows some basic examples and links to its full documentation (it
104103
can use any of the markup formats supported by GitHub, such as ``README.rst``);
105-
* ``Resources/meta/LICENSE``: The full license for the code. The license file
106-
can also be stored in the bundle's root directory to follow the generic
107-
conventions about packages;
104+
* ``LICENSE``: The full contents of the license used by the code. Most third-party
105+
bundles are published under the MIT license, but you can `choose any license`_;
108106
* ``Resources/doc/index.rst``: The root file for the Bundle documentation.
109107

110108
The depth of sub-directories should be kept to the minimum for most used
@@ -473,3 +471,4 @@ Learn more from the Cookbook
473471
.. _`PSR-4`: http://www.php-fig.org/psr/psr-4/
474472
.. _`Semantic Versioning Standard`: http://semver.org/
475473
.. _`Packagist`: https://packagist.org/
474+
.. _`choose any license`: http://choosealicense.com/

0 commit comments

Comments
 (0)