Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 159459b

Browse filesBrowse files
committed
minor #8434 Added a bundle deprecation notice in other articles (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #8434). Discussion ---------- Added a bundle deprecation notice in other articles Similar to #8389 but for another article. Commits ------- 10f36dd Added a bundle deprecation notice in other articles
2 parents 3da301a + 10f36dd commit 159459b
Copy full SHA for 159459b

File tree

Expand file treeCollapse file tree

1 file changed

+6
-17
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-17
lines changed

‎bundles/override.rst

Copy file name to clipboardExpand all lines: bundles/override.rst
+6-17Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ How to Override any Part of a Bundle
55
====================================
66

77
This document is a quick reference for how to override different parts of
8-
third-party bundles.
8+
third-party bundles without using :doc:`/bundles/inheritance`, which is
9+
deprecated since Symfony 3.4.
910

1011
.. tip::
1112

@@ -18,10 +19,7 @@ third-party bundles.
1819
Templates
1920
---------
2021

21-
For information on overriding templates, see
22-
23-
* :doc:`/templating/overriding`.
24-
* :doc:`/bundles/inheritance`
22+
See :doc:`/templating/overriding`.
2523

2624
Routing
2725
-------
@@ -37,10 +35,10 @@ that routing file into your application, modify it, and import it instead.
3735
Controllers
3836
-----------
3937

40-
Assuming the third-party bundle involved uses non-service controllers (which
41-
is almost always the case), you can easily override controllers via bundle
42-
inheritance. For more information, see :doc:`/bundles/inheritance`.
4338
If the controller is a service, see the next section on how to override it.
39+
Otherwise, define a new route + controller with the same path associated to the
40+
controller you want to override (and make sure that the new route is loaded
41+
before the bundle one).
4442

4543
Services & Configuration
4644
------------------------
@@ -152,13 +150,4 @@ Translations are not related to bundles, but to domains. That means that you
152150
can override the translations from any translation file, as long as it is in
153151
:ref:`the correct domain <using-message-domains>`.
154152

155-
.. caution::
156-
157-
Translation files are not aware of :doc:`bundle inheritance </bundles/inheritance>`.
158-
If you want to override translations from the parent bundle or another bundle,
159-
make sure that the bundle containing *your* translations is loaded after any
160-
bundle whose translations you're overriding. This is done in ``AppKernel``.
161-
162-
Finally, translations located in ``app/Resources/translations`` will override
163-
all the other translations since those files are always loaded last.
164153
.. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.