Skip to content

Commit

Permalink
Merge pull request #2567 from norkunas/formats-provider-alias
Browse files Browse the repository at this point in the history
Configure formats provider interface autowiring alias
  • Loading branch information
soyuka committed Mar 6, 2019
2 parents d86f956 + 2ea50f1 commit ea153d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Bridge/Symfony/Bundle/Resources/config/api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<argument type="service" id="api_platform.metadata.resource.metadata_factory" />
<argument>%api_platform.formats%</argument>
</service>
<service id="ApiPlatform\Core\Api\OperationAwareFormatsProviderInterface" alias="api_platform.formats_provider" />

<!-- Serializer -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use ApiPlatform\Core\Api\FilterInterface;
use ApiPlatform\Core\Api\IriConverterInterface;
use ApiPlatform\Core\Api\OperationAwareFormatsProviderInterface;
use ApiPlatform\Core\Api\ResourceClassResolverInterface;
use ApiPlatform\Core\Api\UrlGeneratorInterface;
use ApiPlatform\Core\Bridge\Doctrine\MongoDbOdm\Extension\AggregationCollectionExtensionInterface;
Expand Down Expand Up @@ -831,6 +832,7 @@ private function getPartialContainerBuilderProphecy()
ResourceClassResolverInterface::class => 'api_platform.resource_class_resolver',
PropertyFilter::class => 'api_platform.serializer.property_filter',
GroupFilter::class => 'api_platform.serializer.group_filter',
OperationAwareFormatsProviderInterface::class => 'api_platform.formats_provider',
];

foreach ($aliases as $alias => $service) {
Expand Down

0 comments on commit ea153d1

Please sign in to comment.