Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Aug 18, 2015
2 parents 3e60dda + 743f73b commit 3bdfec4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ example, if you use annotations, create something like this::
*/
public function adminAction()
{
return new Response('Admin page!');
return new Response('<html><body>Admin page!</body></html>');
}
}

Expand Down
21 changes: 21 additions & 0 deletions components/console/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,27 @@ This prints::

HELLO FABIEN

Command Lifecycle
~~~~~~~~~~~~~~~~~

Commands have three lifecycle methods:

:method:`Symfony\\Component\\Console\\Command\\Command::initialize` *(optional)*
This method is executed before the ``interact()`` and the ``execute()``
methods. Its main purpose is to initialize variables used in the rest of
the command methods.

:method:`Symfony\\Component\\Console\\Command\\Command::interact` *(optional)*
This method is executed after ``initialize()`` and before ``execute()``.
Its purpose is to check if some of the options/arguments are missing
and interactively ask the user for those values. This is the last place
where you can ask for missing options/arguments. After this command,
missing options/arguments will result in an error.

:method:`Symfony\\Component\\Console\\Command\\Command::execute` *(required)*
This method is executed after ``interact()`` and ``initialize()``.
It contains the logic you want the command to execute.

.. _components-console-coloring:

Coloring the Output
Expand Down
9 changes: 4 additions & 5 deletions cookbook/bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ The basic directory structure of an AcmeBlogBundle must read as follows:
├─ AcmeBlogBundle.php
├─ Controller/
├─ README.md
├─ LICENSE
├─ Resources/
│ ├─ meta/
│ │ └─ LICENSE
│ ├─ config/
│ ├─ doc/
│ │ └─ index.rst
Expand All @@ -102,9 +101,8 @@ that automated tools can rely on:
* ``README.md``: This file contains the basic description of the bundle and it
usually shows some basic examples and links to its full documentation (it
can use any of the markup formats supported by GitHub, such as ``README.rst``);
* ``Resources/meta/LICENSE``: The full license for the code. The license file
can also be stored in the bundle's root directory to follow the generic
conventions about packages;
* ``LICENSE``: The full contents of the license used by the code. Most third-party
bundles are published under the MIT license, but you can `choose any license`_;
* ``Resources/doc/index.rst``: The root file for the Bundle documentation.

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

0 comments on commit 3bdfec4

Please sign in to comment.