Skip to content

Commit d256cca

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents d085989 + 22ca5b8 commit d256cca

File tree

77 files changed

+1321
-414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1321
-414
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ Contributing
22
------------
33

44
We love contributors! For more information on how you can contribute to the
5-
Symfony documentation, please read [Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html)
6-
and notice the [Pull Request Format](https://symfony.com/doc/current/contributing/documentation/overview.html#pull-request-format)
7-
that helps us merge your pull requests faster!
5+
Symfony documentation, please read [Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html).

.platform.app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ disk: 512
4646
# Build time dependencies.
4747
dependencies:
4848
python:
49-
sphinx: ">=1"
49+
sphinx: "1.3.6"
5050

5151
# The hooks that will be performed when the package is deployed.
5252
hooks:

_build/redirection_map

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/cookbook/index /index
33
/book/stable_api /contributing/code/bc
44
/book/internals /reference/events
5+
/configuration/apache_router /routing
56
/cookbook/console/sending_emails /cookbook/console/request_context
67
/cookbook/deployment-tools /cookbook/deployment/tools
78
/cookbook/doctrine/migrations /bundles/DoctrineFixturesBundle/index
@@ -95,7 +96,7 @@
9596
/cookbook/cache/form_csrf_caching /http_cache/form_csrf_caching
9697
/cookbook/cache/varnish /http_cache/varnish
9798
/cookbook/composer /setup/composer
98-
/cookbook/configuration/apache_router /configuration/apache_router
99+
/cookbook/configuration/apache_router /routing
99100
/cookbook/configuration/configuration_organization /configuration/configuration_organization
100101
/cookbook/configuration/environments /configuration/environments
101102
/cookbook/configuration/external_parameters /configuration/external_parameters
@@ -330,3 +331,4 @@
330331
/components/yaml/index /components/yaml
331332
/deployment/tools /deployment
332333
/install/bundles /setup/bundles
334+
/form /forms

bundles/extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ their fully qualified class names::
142142
{
143143
// ...
144144

145-
$this->addClassesToCompile(array(
145+
$this->addClassesToCompile(array(
146146
'AppBundle\\Manager\\UserManager',
147147
'AppBundle\\Utils\\Slugger',
148148
// ...

bundles/override.rst

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,10 @@ If the controller is a service, see the next section on how to override it.
3737
Services & Configuration
3838
------------------------
3939

40-
In order to override/extend a service, there are two options. First, you can
41-
set the parameter holding the service's class name to your own class by setting
42-
it in ``app/config/config.yml``. This of course is only possible if the class name is
43-
defined as a parameter in the service config of the bundle containing the
44-
service. For example, to override the class used for Symfony's ``translator``
45-
service, you would override the ``translator.class`` parameter. Knowing exactly
46-
which parameter to override may take some research. For the translator, the
47-
parameter is defined and used in the ``Resources/config/translation.xml`` file
48-
in the core FrameworkBundle:
49-
50-
.. configuration-block::
51-
52-
.. code-block:: yaml
53-
54-
# app/config/config.yml
55-
parameters:
56-
translator.class: Acme\HelloBundle\Translation\Translator
57-
58-
.. code-block:: xml
59-
60-
<!-- app/config/config.xml -->
61-
<parameters>
62-
<parameter key="translator.class">Acme\HelloBundle\Translation\Translator</parameter>
63-
</parameters>
64-
65-
.. code-block:: php
66-
67-
// app/config/config.php
68-
$container->setParameter('translator.class', 'Acme\HelloBundle\Translation\Translator');
69-
70-
Secondly, if the class is not available as a parameter, you want to make sure the
71-
class is always overridden when your bundle is used or if you need to modify
72-
something beyond just the class name, you should use a compiler pass::
40+
If you want to modify service definitions of another bundle, you can use a compiler
41+
pass to change the class of the service or to modify method calls. In the following
42+
example, the implementing class for the ``original-service-id`` is changed to
43+
``Acme\DemoBundle\YourService``::
7344

7445
// src/Acme/DemoBundle/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
7546
namespace Acme\DemoBundle\DependencyInjection\Compiler;
@@ -86,12 +57,7 @@ something beyond just the class name, you should use a compiler pass::
8657
}
8758
}
8859

89-
In this example you fetch the service definition of the original service, and set
90-
its class name to your own class.
91-
92-
See :doc:`/service_container/compiler_passes` for information on how to use
93-
compiler passes. If you want to do something beyond just overriding the class,
94-
like adding a method call, you can only use the compiler pass method.
60+
For more information on compiler passes, see :doc:`/service_container/compiler_passes`.
9561

9662
Entities & Entity Mapping
9763
-------------------------

0 commit comments

Comments
 (0)