Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macpaw/symfony-deprecated-routes
Symfony Deprecated Routes Bundle
https://github.com/macpaw/symfony-deprecated-routes
backend macpaw symfony
Last synced: 3 days ago
JSON representation
Symfony Deprecated Routes Bundle
- Host: GitHub
- URL: https://github.com/macpaw/symfony-deprecated-routes
- Owner: MacPaw
- Created: 2024-02-16T10:12:53.000Z (9 months ago)
- Default Branch: develop
- Last Pushed: 2024-05-30T09:42:03.000Z (6 months ago)
- Last Synced: 2024-11-08T17:05:30.758Z (10 days ago)
- Topics: backend, macpaw, symfony
- Language: PHP
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Symfony Deprecated Routes Bundle
Symfony Deprecated Routes Bundle offers to mark some api routes as deprecated.
## Installation
Use Composer to install the bundle:
```shell
composer require macpaw/symfony-messenger-bundle
```## Setup bundle
Enable the bundle by adding it to the list of registered bundles in config/bundles.php
```php
// config/bundles.phpreturn [
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](src/Routing/Attribute/DeprecatedRoute.php) | 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`
```shell
deprecated-routes:
isSinceRequired: false
isDisabled: falseheaders:
deprecatedMessageName: 'X-DEPRECATED'
deprecatedFromName: 'X-DEPRECATED-FROM'
deprecatedSinceName: 'X-DEPRECATED-SINCE'
```