avkluchko/api-platform-extensions

ApiPlatform的有用扩展

安装: 68

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 4

类型:symfony-bundle

v1.2.0 2022-02-07 16:19 UTC

README

Build Status Total Downloads Latest Stable Version License

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']