Skip to content

Commit

Permalink
minor #5498 [WIP] Added caution notes about the deprecation of contai…
Browse files Browse the repository at this point in the history
…ner scopes (javiereguiluz)

This PR was merged into the 2.8 branch.

Discussion
----------

[WIP] Added caution notes about the deprecation of container scopes

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.8+
| Fixed tickets | #5436

This is a first proposal related to scopes deprecation. Questions:

  * Should we expand the "caution notes" to explain why we did that and the alternatives provided?
  * Should we rewrite the `cookbook/service_container/scopes.rst` article to explain the new scopes + shared flag and add a note about the old scopes which were available in the past Symfony versions?

Commits
-------

99a996c Added caution notes about the deprecation of container scopes
  • Loading branch information
xabbuh committed Jul 28, 2015
2 parents 4ab47cc + 99a996c commit 43565d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cookbook/console/console_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ for details.
Getting Services from the Service Container
-------------------------------------------

.. caution::

The "container scopes" concept explained in this section has been deprecated
in Symfony 2.8 and it will be removed in Symfony 3.0.

By using :class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand`
as the base class for the command (instead of the more basic
:class:`Symfony\\Component\\Console\\Command\\Command`), you have access to the
Expand Down
5 changes: 5 additions & 0 deletions cookbook/service_container/scopes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
How to Work with Scopes
=======================

.. caution::

The "container scopes" concept explained in this article has been deprecated
in Symfony 2.8 and it will be removed in Symfony 3.0.

This article is all about scopes, a somewhat advanced topic related to the
:doc:`/book/service_container`. If you've ever gotten an error mentioning
"scopes" when creating services, then this article is for you.
Expand Down

0 comments on commit 43565d9

Please sign in to comment.