From 870e005a75b16ba36358822ad4313aff7b400452 Mon Sep 17 00:00:00 2001 From: Samuele Lilli Date: Thu, 24 May 2018 11:05:39 +0200 Subject: [PATCH 1/2] Update 3.3-di-changes.rst From symfony 3.4 aliases are not public by default https://symfony.com/blog/new-in-symfony-3-4-services-are-private-by-default so docs are not in synch with this change. Maybe would be better to highlight this also in symfony 3.3 docs as a notice? Moreover this seems to me nearly a BC. --- service_container/3.3-di-changes.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service_container/3.3-di-changes.rst b/service_container/3.3-di-changes.rst index 089bab80866..7057fdf1391 100644 --- a/service_container/3.3-di-changes.rst +++ b/service_container/3.3-di-changes.rst @@ -1,7 +1,7 @@ The Symfony 3.3 DI Container Changes Explained (autowiring, _defaults, etc) =========================================================================== -If you look at the ``services.yml`` file in a new Symfony 3.3 project, you'll +If you look at the ``services.yml`` file in a new Symfony >= 3.3 project, you'll notice some big changes: ``_defaults``, ``autowiring``, ``autoconfigure`` and more. These features are designed to *automate* configuration and make development faster, without sacrificing predictability, which is very important! Another goal is to make @@ -597,6 +597,8 @@ to the new id. Create a new ``legacy_aliases.yml`` file: # app/config/legacy_aliases.yml services: + _defaults: + public: true # aliases so that the old service ids can still be accessed # remove these if/when you are not fetching these directly # from the container via $container->get() From ec76e3436b580380b8363271e42101e0ae0d53fb Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 27 May 2018 12:49:09 +0200 Subject: [PATCH 2/2] Minor tweak --- service_container/3.3-di-changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_container/3.3-di-changes.rst b/service_container/3.3-di-changes.rst index 7057fdf1391..584650359b8 100644 --- a/service_container/3.3-di-changes.rst +++ b/service_container/3.3-di-changes.rst @@ -1,7 +1,7 @@ The Symfony 3.3 DI Container Changes Explained (autowiring, _defaults, etc) =========================================================================== -If you look at the ``services.yml`` file in a new Symfony >= 3.3 project, you'll +If you look at the ``services.yml`` file in a new Symfony 3.3 or newer project, you'll notice some big changes: ``_defaults``, ``autowiring``, ``autoconfigure`` and more. These features are designed to *automate* configuration and make development faster, without sacrificing predictability, which is very important! Another goal is to make