8000 Reviewed the Bundles cookbook articles by javiereguiluz · Pull Request #5095 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Reviewed the Bundles cookbook articles #5095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 9, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

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
Implemented the changes suggested by reviewers
  • Loading branch information
10000
javiereguiluz committed May 29, 2015
commit c0637b6bd7937674b8db035448181ccf8ae2e7a6
6 changes: 6 additions & 0 deletions cookbook/bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ following standardized instructions in your ``README.md`` file.

.. _`installation chapter`: https://getcomposer.org/doc/00-intro.md

The example above assumes that you are installing the latest stable version of
the bundle, where you don't have to provide the package version number
(e.g. ``composer require friendsofsymfony/user-bundle``). If the installation
instructions refer to some past bundle version or to some inestable version,
include the version constraint (e.g. ``composer require friendsofsymfony/user-bundle "~2.0@dev"``).

Optionally, you can add more installation steps (*Step 3*, *Step 4*, etc.) to
explain other required installation tasks, such as registering routes or
dumping assets.
Expand Down
9 changes: 5 additions & 4 deletions cookbook/bundles/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The only thing you need to do now is register the bundle in ``AppKernel``::
public function registerBundles()
{
$bundles = array(
// ...,
// ...
new FOS\UserBundle\FOSUserBundle(),
);

Expand All @@ -73,8 +73,9 @@ The only thing you need to do now is register the bundle in ``AppKernel``::

By default, Symfony bundles are registered in all the application
:doc:`execution environments </cookbook/configuration/environments>`. If the bundle
is meant to be used only in the development or test environments, register it in
the section below::
is meant to be used only in some environment, register it within an ``if`` statement,
like the following example, where the FOSUserBundle is only enabled for the
``dev`` and ``test`` environments::

// app/AppKernel.php

Expand All @@ -86,7 +87,7 @@ the section below::
public function registerBundles()
{
$bundles = array(
// ...,
// ...
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
0