Skip to content

Commit

Permalink
Merge pull request #1675 from Zayon/master
Browse files Browse the repository at this point in the history
Fix service declaration deprecation for api_platform.router
  • Loading branch information
dunglas committed Feb 6, 2018
2 parents d524064 + 6b50b89 commit 1260139
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Bundle/Resources/config/api.xml
Expand Up @@ -41,6 +41,8 @@
<tag name="routing.loader" />
</service>

<service id="ApiPlatform\Core\Api\UrlGeneratorInterface" alias="api_platform.router" />

<service id="api_platform.router" class="ApiPlatform\Core\Bridge\Symfony\Routing\Router" public="false">
<argument type="service" id="router" />
</service>
Expand Down
Expand Up @@ -15,6 +15,7 @@

use ApiPlatform\Core\Api\FilterInterface;
use ApiPlatform\Core\Api\IriConverterInterface;
use ApiPlatform\Core\Api\UrlGeneratorInterface;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\EagerLoadingExtension;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\FilterEagerLoadingExtension;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\FilterExtension;
Expand Down Expand Up @@ -489,6 +490,7 @@ private function getPartialContainerBuilderProphecy($test = false)
'api_platform.property_info' => 'property_info',
'api_platform.serializer' => 'serializer',
IriConverterInterface::class => 'api_platform.iri_converter',
UrlGeneratorInterface::class => 'api_platform.router',
SerializerContextBuilderInterface::class => 'api_platform.serializer.context_builder',
CollectionDataProviderInterface::class => 'api_platform.collection_data_provider',
ItemDataProviderInterface::class => 'api_platform.item_data_provider',
Expand Down

0 comments on commit 1260139

Please sign in to comment.