Skip to content

Commit 741ad05

Browse files
committed
Merge branch '2.4' into 2.5
2 parents 84332ff + d305d91 commit 741ad05

28 files changed

+542
-23
lines changed

_exts

components/console/helpers/dialoghelper.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ from the command line, you need to overwrite the HelperSet used by the command::
257257
$commandTester = new CommandTester($command);
258258

259259
$dialog = $command->getHelper('dialog');
260-
$dialog->setInputStream($this->getInputStream('Test\n'));
260+
$dialog->setInputStream($this->getInputStream("Test\n"));
261261
// Equals to a user inputing "Test" and hitting ENTER
262262
// If you need to enter a confirmation, "yes\n" will work
263263

cookbook/bundles/prepend_extension.rst

+16-16
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ How to simplify configuration of multiple Bundles
66
=================================================
77

88
When building reusable and extensible applications, developers are often
9-
faced with a choice: either create a single large Bundle or multiple smaller
10-
Bundles. Creating a single Bundle has the draw back that it's impossible for
9+
faced with a choice: either create a single large bundle or multiple smaller
10+
bundles. Creating a single bundle has the drawback that it's impossible for
1111
users to choose to remove functionality they are not using. Creating multiple
12-
Bundles has the draw back that configuration becomes more tedious and settings
13-
often need to be repeated for various Bundles.
12+
bundles has the drawback that configuration becomes more tedious and settings
13+
often need to be repeated for various bundles.
1414

1515
Using the below approach, it is possible to remove the disadvantage of the
16-
multiple Bundle approach by enabling a single Extension to prepend the settings
17-
for any Bundle. It can use the settings defined in the ``app/config/config.yml``
18-
to prepend settings just as if they would have been written explicitly by the
19-
user in the application configuration.
16+
multiple bundle approach by enabling a single Extension to prepend the settings
17+
for any bundle. It can use the settings defined in the ``app/config/config.yml``
18+
to prepend settings just as if they would have been written explicitly by
19+
the user in the application configuration.
2020

2121
For example, this could be used to configure the entity manager name to use in
22-
multiple Bundles. Or it can be used to enable an optional feature that depends
23-
on another Bundle being loaded as well.
22+
multiple bundles. Or it can be used to enable an optional feature that depends
23+
on another bundle being loaded as well.
2424

2525
To give an Extension the power to do this, it needs to implement
2626
:class:`Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface`::
@@ -45,24 +45,24 @@ To give an Extension the power to do this, it needs to implement
4545
Inside the :method:`Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface::prepend`
4646
method, developers have full access to the :class:`Symfony\\Component\\DependencyInjection\\ContainerBuilder`
4747
instance just before the :method:`Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface::load`
48-
method is called on each of the registered Bundle Extensions. In order to
49-
prepend settings to a Bundle extension developers can use the
48+
method is called on each of the registered bundle Extensions. In order to
49+
prepend settings to a bundle extension developers can use the
5050
:method:`Symfony\\Component\\DependencyInjection\\ContainerBuilder::prependExtensionConfig`
5151
method on the :class:`Symfony\\Component\\DependencyInjection\\ContainerBuilder`
5252
instance. As this method only prepends settings, any other settings done explicitly
5353
inside the ``app/config/config.yml`` would override these prepended settings.
5454

5555
The following example illustrates how to prepend
56-
a configuration setting in multiple Bundles as well as disable a flag in multiple Bundles
57-
in case a specific other Bundle is not registered::
56+
a configuration setting in multiple bundles as well as disable a flag in multiple bundles
57+
in case a specific other bundle is not registered::
5858

5959
public function prepend(ContainerBuilder $container)
6060
{
61-
// get all Bundles
61+
// get all bundles
6262
$bundles = $container->getParameter('kernel.bundles');
6363
// determine if AcmeGoodbyeBundle is registered
6464
if (!isset($bundles['AcmeGoodbyeBundle'])) {
65-
// disable AcmeGoodbyeBundle in Bundles
65+
// disable AcmeGoodbyeBundle in bundles
6666
$config = array('use_acme_goodbye' => false);
6767
foreach ($container->getExtensions() as $name => $extension) {
6868
switch ($name) {

0 commit comments

Comments
 (0)