macpaw / symfony-deprecated-routes
Symfony Deprecated Routes Annotations
Installs: 8 484
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 14
Forks: 0
Open Issues: 0
pkg:composer/macpaw/symfony-deprecated-routes
Requires
- php: ^8.1
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/routing: ^6.4 || ^7.0
Requires (Dev)
- phpstan/phpstan-symfony: ^1.3 || ^2.0
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.8
- symfony/browser-kit: ^6.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/yaml: ^6.4 || ^7.0
This package is auto-updated.
Last update: 2025-10-07 11:49:33 UTC
README
Symfony Deprecated Routes Bundle offers to mark some api routes as deprecated.
Installation
Use Composer to install the bundle:
composer require macpaw/symfony-messenger-bundle
Setup bundle
Enable the bundle by adding it to the list of registered bundles in config/bundles.php
// config/bundles.php return [ Macpaw\SymfonyDeprecatedRoutes\DeprecatedRoutesBundle::class => ['all' => true], // ... ];
Extend bundle options
This bundle provide configuration for marking routes
| Option | Type | Description | Default value |
|---|---|---|---|
| headers | array | Deprecation headers names | |
| isDisabled | bool | Disable add marks for routes | false |
| headers | array | Deprecation headers names | |
| isSinceRequired | bool | If true enable validation for set route attribute | false |
Headers names options
| Name | Description |
|---|---|
| deprecatedMessageName | Deprecated message info header name |
| deprecatedFromName | Start deprecation date |
| deprecatedSinceName | The date of the removal route |
Full config example with default values
config/packages/deprecated-routes.yaml
deprecated-routes:
isSinceRequired: false
isDisabled: false
headers:
deprecatedMessageName: 'X-DEPRECATED'
deprecatedFromName: 'X-DEPRECATED-FROM'
deprecatedSinceName: 'X-DEPRECATED-SINCE'