Skip to content

Commit 1260139

Browse files
authored
Merge pull request #1675 from Zayon/master
Fix service declaration deprecation for api_platform.router
2 parents d524064 + 6b50b89 commit 1260139

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Bridge/Symfony/Bundle/Resources/config/api.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
<tag name="routing.loader" />
4242
</service>
4343

44+
<service id="ApiPlatform\Core\Api\UrlGeneratorInterface" alias="api_platform.router" />
45+
4446
<service id="api_platform.router" class="ApiPlatform\Core\Bridge\Symfony\Routing\Router" public="false">
4547
<argument type="service" id="router" />
4648
</service>

tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use ApiPlatform\Core\Api\FilterInterface;
1717
use ApiPlatform\Core\Api\IriConverterInterface;
18+
use ApiPlatform\Core\Api\UrlGeneratorInterface;
1819
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\EagerLoadingExtension;
1920
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\FilterEagerLoadingExtension;
2021
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\FilterExtension;
@@ -489,6 +490,7 @@ private function getPartialContainerBuilderProphecy($test = false)
489490
'api_platform.property_info' => 'property_info',
490491
'api_platform.serializer' => 'serializer',
491492
IriConverterInterface::class => 'api_platform.iri_converter',
493+
UrlGeneratorInterface::class => 'api_platform.router',
492494
SerializerContextBuilderInterface::class => 'api_platform.serializer.context_builder',
493495
CollectionDataProviderInterface::class => 'api_platform.collection_data_provider',
494496
ItemDataProviderInterface::class => 'api_platform.item_data_provider',

0 commit comments

Comments
 (0)