handcraftedinthealps / rest-routing-bundle
此包为Controllers提供自动路由注册功能
1.1.1
2024-04-15 11:20 UTC
Requires
- php: ^7.2 || ^8.0
- doctrine/annotations: ^1.0|^2.0
- doctrine/inflector: ^1.4.1|^2.0
- symfony/config: ^4.4|^5.0|^6.0|^7.0
- symfony/dependency-injection: ^4.4|^5.0|^6.0|^7.0
- symfony/finder: ^4.4|^5.0|^6.0|^7.0
- symfony/framework-bundle: ^4.4.1|^5.0|^6.0|^7.0
- symfony/http-kernel: ^4.4|^5.0|^6.0|^7.0
- symfony/routing: ^4.4|^5.0|^6.0|^7.0
Requires (Dev)
- friendsofsymfony/rest-bundle: ^2.8 || ^3.0
- php-cs-fixer/shim: ^3.6
- psr/http-message: ^1.0
- symfony/http-foundation: ^4.4|^5.0|^6.0|^7.0
- symfony/phpunit-bridge: ^5.4.33|^6.3.10|^7.0.1
- symfony/security-core: ^3.4|^4.3|^5.0|^6.0|^7.0
- symfony/serializer: ^4.4|^5.0|^6.0|^7.0
- symfony/validator: ^4.4|^5.0|^6.0|^7.0
- symfony/yaml: ^4.4|^5.0|^6.0|^7.0
Conflicts
README
此包为FOSRestBundle 3.0提供自动路由生成功能。
文档
安装
所有安装说明位于文档中。
从FOSRestBundle迁移
如果您之前使用过FOSRestBundle(该包已移除自动路由生成),迁移过程简单。安装包成功后,更改配置为新包
之前
fos_rest: routing_loader: default_format: 'json' prefix_methods: true include_format: true
之后
handcraftedinthealps_rest_routing: routing_loader: default_format: 'json' prefix_methods: true include_format: true # optional set supported formats else the configured one from fos_rest are used if installed: # formats: # json: true # xml: true
更新类(非必需但推荐)
// Replace ClassResourceInterface -use FOS\RestBundle\Routing\ClassResourceInterface; +use HandcraftedInTheAlps\RestRoutingBundle\Routing\ClassResourceInterface; // Replace RouteResource -use FOS\RestBundle\Controller\Annotations\RouteResource; +use HandcraftedInTheAlps\RestRoutingBundle\Controller\Annotations\RouteResource; // Replace NamePrefix -use FOS\RestBundle\Controller\Annotations\NamePrefix; +use HandcraftedInTheAlps\RestRoutingBundle\Controller\Annotations\NamePrefix; // Replace Prefix -use FOS\RestBundle\Controller\Annotations\Prefix; +use HandcraftedInTheAlps\RestRoutingBundle\Controller\Annotations\Prefix; // Replace NoRoute -use FOS\RestBundle\Controller\Annotations\NoRoute; +use HandcraftedInTheAlps\RestRoutingBundle\Controller\Annotations\NoRoute; // Replace Version -use FOS\RestBundle\Controller\Annotations\Version; +use HandcraftedInTheAlps\RestRoutingBundle\Controller\Annotations\Version;
许可证
此包受MIT许可证保护。查看完整的许可证(在包中)。