From 36dfb14209490febfbb43467978febfda4cbdb47 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 28 Sep 2017 16:01:04 +0200 Subject: [PATCH 1/3] Added a bundle deprecation notice in other articles --- bundles/override.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/override.rst b/bundles/override.rst index 52950a29c3c..780f3f49ef8 100644 --- a/bundles/override.rst +++ b/bundles/override.rst @@ -4,6 +4,11 @@ How to Override any Part of a Bundle ==================================== +.. caution:: + + Bundle inheritance is deprecated since Symfony 3.4 and will be removed in + 4.0. + This document is a quick reference for how to override different parts of third-party bundles. From 9764547390a13879db1842c03854b752a84cb548 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 9 Oct 2017 17:59:32 +0200 Subject: [PATCH 2/3] Removed mentions to bundle inheritance --- bundles/override.rst | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/bundles/override.rst b/bundles/override.rst index 780f3f49ef8..0826b781269 100644 --- a/bundles/override.rst +++ b/bundles/override.rst @@ -4,13 +4,9 @@ How to Override any Part of a Bundle ==================================== -.. caution:: - - Bundle inheritance is deprecated since Symfony 3.4 and will be removed in - 4.0. - This document is a quick reference for how to override different parts of -third-party bundles. +third-party bundleswithout using :doc:`/bundles/inheritance`, which is deprecated +since Symfony 3.4. .. tip:: @@ -23,10 +19,7 @@ third-party bundles. Templates --------- -For information on overriding templates, see - -* :doc:`/templating/overriding`. -* :doc:`/bundles/inheritance` +See :doc:`/templating/overriding`. Routing ------- @@ -42,10 +35,10 @@ that routing file into your application, modify it, and import it instead. Controllers ----------- -Assuming the third-party bundle involved uses non-service controllers (which -is almost always the case), you can easily override controllers via bundle -inheritance. For more information, see :doc:`/bundles/inheritance`. If the controller is a service, see the next section on how to override it. +Otherwise, define a new route + controller with the same path associated to the +controller you want to override (and make sure that the new route is loaded +before the bundle one). Services & Configuration ------------------------ @@ -157,13 +150,4 @@ Translations are not related to bundles, but to domains. That means that you can override the translations from any translation file, as long as it is in :ref:`the correct domain `. -.. caution:: - - Translation files are not aware of :doc:`bundle inheritance `. - If you want to override translations from the parent bundle or another bundle, - make sure that the bundle containing *your* translations is loaded after any - bundle whose translations you're overriding. This is done in ``AppKernel``. - - Finally, translations located in ``app/Resources/translations`` will override - all the other translations since those files are always loaded last. .. _`the Doctrine documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#overrides From 86a432496bd2901d793ec89932e7e6c5a248d7a5 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 10 Oct 2017 10:58:28 +0200 Subject: [PATCH 3/3] Fixed a typo --- bundles/override.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/override.rst b/bundles/override.rst index 0826b781269..3c0fb8c7f2d 100644 --- a/bundles/override.rst +++ b/bundles/override.rst @@ -5,8 +5,8 @@ How to Override any Part of a Bundle ==================================== This document is a quick reference for how to override different parts of -third-party bundleswithout using :doc:`/bundles/inheritance`, which is deprecated -since Symfony 3.4. +third-party bundles without using :doc:`/bundles/inheritance`, which is +deprecated since Symfony 3.4. .. tip:: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy