avkluchko / api-platform-extensions
ApiPlatform的有用扩展
v1.2.0
2022-02-07 16:19 UTC
Requires
- php: ^7.1.3 || ^8.0
- api-platform/core: ^2.5
- doctrine/orm: ^2.5
- symfony/config: ^4.0 || ^5.1.5
- symfony/dependency-injection: ^4.1.12 || ^5.1.5
- symfony/http-kernel: ^4.0 || ^5.1.5
- symfony/phpunit-bridge: ^4.1.12 || ^5.1.5
- symfony/security-core: ^4.1.12 || ^5.1.5
This package is auto-updated.
Last update: 2024-09-29 02:49:49 UTC
README
Api Platform的有用扩展。
需求
Api Platform Extensions Bundle的最小要求是您的Web服务器支持PHP 7.1或更高版本。
安装
使用以下命令安装包
composer require avkluchko/api-platform-extensions
如果您没有使用Symfony Flex,您还需要在AppKernel.php
文件中启用AVKluchko\ApiPlatformExtensions\ApiPlatformExtensionsBundle
。
AdminGroupsContextBuilder需要自动将“admin:read”和“admin:write”组添加到序列化过程中。要启用AdminGroupsContextBuilder,请将其添加到config/service.yaml中
AVKluchko\ApiPlatformExtensionBundle\Serializer\AdminGroupsContextBuilder: decorates: 'api_platform.serializer.context_builder' arguments: [ '@AVKluchko\ApiPlatformExtensionBundle\Serializer\AdminGroupsContextBuilder.inner']