macpaw/symfony-deprecated-routes
最新稳定版本:v1.1.0
Composer 安装命令:
composer require macpaw/symfony-deprecated-routes
包简介
Symfony Deprecated Routes Annotations
README 文档
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'
统计信息
- 总下载量: 8.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-05