Useful extensions for Api Platform.
The minumum requirement by Api Platform Extensions Bundle is that your web-server supports PHP 7.1 or above.
Install the package with:
composer require avkluchko/api-platform-extensions
If you're not using Symfony Flex, you'll also
need to enable the AVKluchko\ApiPlatformExtensions\ApiPlatformExtensionsBundle
in your AppKernel.php
file.
AdminGroupsContextBuilder needs to auto adding groups "admin:read" and "admin:write" to serialization process. To enable AdminGroupsContextBuilder add to config/service.yaml:
AVKluchko\ApiPlatformExtensionBundle\Serializer\AdminGroupsContextBuilder:
decorates: 'api_platform.serializer.context_builder'
arguments: [ '@AVKluchko\ApiPlatformExtensionBundle\Serializer\AdminGroupsContextBuilder.inner']