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 62d9a15

Browse filesBrowse files
committed
minor #5807 Minor rewordings for the "deprecated" service option (javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- Minor rewordings for the "deprecated" service option | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | 2.8+ | Fixed tickets | - Proposed changes are minor. If you don't agree with them, just close this pull request. There is no need to discuss about this. Thanks. Commits ------- 3c37397 Minor rewordings for the "deprecated" service option
2 parents 9068bc0 + 3c37397 commit 62d9a15
Copy full SHA for 62d9a15

File tree

Expand file treeCollapse file tree

1 file changed

+11
-13
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-13
lines changed

‎components/dependency_injection/advanced.rst

Copy file name to clipboardExpand all lines: components/dependency_injection/advanced.rst
+11-13Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ Deprecating Services
226226
The ``deprecated`` setting was introduced in Symfony 2.8.
227227

228228
Once you have decided to deprecate the use of a service (because it is outdated
229-
or you decided not to use and maintain it anymore), you can deprecate its
230-
definition:
229+
or you decided not to maintain it anymore), you can deprecate its definition:
231230

232231
.. configuration-block::
233232

@@ -261,26 +260,25 @@ definition:
261260
)
262261
;
263262
264-
Now, every time a service is created using this deprecated definition, a
265-
deprecation warning will be triggered, advising you to stop or to change your
266-
uses of that service.
263+
Now, every time this service is used, a deprecation warning is triggered,
264+
advising you to stop or to change your uses of that service.
267265

268-
The message is actually a message template, which will replace occurrences
269-
of the ``%service_id%`` by the service's id. You **must** have at least one
266+
The message is actually a message template, which replaces occurrences of the
267+
``%service_id%`` placeholder by the service's id. You **must** have at least one
270268
occurrence of the ``%service_id%`` placeholder in your template.
271269

272270
.. note::
273271

274-
The deprecation message is optional. If not set, Symfony will show a default
275-
message ``The "%service_id%" service is deprecated. You should stop using it,
272+
The deprecation message is optional. If not set, Symfony will show this default
273+
message: ``The "%service_id%" service is deprecated. You should stop using it,
276274
as it will soon be removed.``.
277275

278276
.. tip::
279277

280-
It is strongly recommended that you fill the message template, to avoid a
281-
message that could be too generic such as the default one. A good message
282-
informs when this service was deprecated, and until when it will be
283-
maintained (look at the examples above).
278+
It is strongly recommended that you define a custom message because the
279+
default one is too generic. A good message informs when this service was
280+
deprecated, until when it will be maintained and the alternative services
281+
to use (if any).
284282

285283
For service decorators (see above), if the definition does not modify the
286284
deprecated status, it will inherit the status from the definition that is

0 commit comments

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