Skip to content

Commit

Permalink
[symfony#5095] Fixing a typo and updating to a more realistic example
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan authored and javiereguiluz committed Sep 2, 2015
1 parent 406a586 commit ed5c633
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cookbook/bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ following standardized instructions in your ``README.md`` file.
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,
instructions refer to some past bundle version or to some unstable 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
Expand Down
12 changes: 6 additions & 6 deletions cookbook/bundles/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ 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 some environment, register it within an ``if`` statement,
like the following example, where the FOSUserBundle is only enabled for the
``dev`` and ``test`` environments::
In a few rare cases, you may want a bundle to be *only* enabled in the development
:doc:`environment </cookbook/configuration/environments>`. For example,
the DoctrineFixturesBundle helps load dummy data - something you probably
only want to do while developing. To only load this bundle in the ``dev``
and ``test`` environments, register the bundle in this way::

// app/AppKernel.php

Expand All @@ -91,7 +91,7 @@ like the following example, where the FOSUserBundle is only enabled for the
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new FOS\UserBundle\FOSUserBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}

// ...
Expand Down

0 comments on commit ed5c633

Please sign in to comment.