Skip to content

Commit dd5e047

Browse files
committed
minor symfony#13620 Update service_container.rst (zer0uno)
This PR was submitted for the 5.0 branch but it was merged into the 4.4 branch instead. Discussion ---------- Update service_container.rst if a public service should *not* be fetched by ``$container->get()``, how should it be fetched? The example shows the use of ``$container->get()``, so I think there was a typo and it should be changed from "public" => "private" <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 5317f98 Update service_container.rst
2 parents 1049771 + 5317f98 commit dd5e047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service_container.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ This is mostly useful when you want to fetch services lazily::
860860

861861
As a best practice, you should only create *private* services, which will happen
862862
automatically. And also, you should *not* use the ``$container->get()`` method to
863-
fetch public services.
863+
fetch private services.
864864

865865
But, if you *do* need to make a service public, override the ``public`` setting:
866866

0 commit comments

Comments
 (0)