avkluchko/api-platform-extensions

Useful extensions for ApiPlatform

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

README

Build Status Total Downloads Latest Stable Version License

Useful extensions for Api Platform.

Requirements

The minumum requirement by Api Platform Extensions Bundle is that your web-server supports PHP 7.1 or above.

Installation

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