-
Notifications
You must be signed in to change notification settings - Fork 34
Deprecated
Mauro Gadaleta edited this page Mar 10, 2017
·
1 revision
Once you have decided to deprecate the use of a service (because it is outdated or you decided not to maintain it anymore), you can deprecate its definition:
let definition = container.register('mailer', Mailer)
definition.deprecated = 'The mailer service is deprecated since 3.4 and will be removed in 4.0'
mailer:
class: ./Mailer
deprecated: 'The mailer service is deprecated since 3.4 and will be removed in 4.0'
Now, every time this service is used, a deprecation warning is triggered, advising you to stop or to change the usage of that service.
It is strongly recommended that you define a custom message because there is no generic message provided. A good message informs when this service was deprecated, until when it will be maintained and the alternative services to use (if any).
Copyright © 2023-2024 Mauro Gadaleta