wiki/content/20201112124159-deprecating_service_aliases.md

35 lines
524 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-29 18:27:12 +00:00
date: 2020-11-12
2024-05-06 20:40:05 +00:00
id: 340acfc8-c621-4578-a588-c306ebaa4d75
title: Deprecating Service Aliases
---
# Description
It's possible to deprecate [service](20201112124304-symfony_services)
aliases
# Syntax
``` yaml
# config/services.yaml
services:
# ...
app.mailer:
alias: App\Mail\PhpMailer
deprecated: ~
```
## Custom error message
``` yaml
# config/services.yaml
services:
# ...
app.mailer:
alias: App\Mail\PhpMailer
deprecated: 'The "%alias_id%" service alias is deprecated.'
```