Skip to content

Commit 4fa18aa

Browse files
committed
minor #16952 Fix doc service deprecation (94noni)
This PR was submitted for the 6.0 branch but it was merged into the 5.4 branch instead. Discussion ---------- Fix doc service deprecation Hi, Based on [this PR](symfony/symfony#46814), I've followed [the doc](https://symfony.com/doc/current/service_container/alias_private.html#deprecating-services) But when tests executed, I got [this error](symfony/symfony#46814 (comment)) So I propose to fix the doc accordingly here Thank you Commits ------- ffdb7e6 Fix documentation on declaration of service deprecation in YAML format
2 parents 2b55713 + ffdb7e6 commit 4fa18aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

service_container/alias_private.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,10 @@ or you decided not to maintain it anymore), you can deprecate its definition:
349349
350350
# config/services.yaml
351351
App\Service\OldService:
352-
deprecated: The "%service_id%" service is deprecated since vendor-name/package-name 2.8 and will be removed in 3.0.
352+
deprecated:
353+
package: 'vendor-name/package-name'
354+
version: '2.8'
355+
message: The "%service_id%" service is deprecated since vendor-name/package-name 2.8 and will be removed in 3.0.
353356
354357
.. code-block:: xml
355358

0 commit comments

Comments
 (0)