Skip to content

Commit 454c106

Browse files
committed
chore(hydra): remove 3.4 deprecation
1 parent c3297c0 commit 454c106

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

src/Hydra/Serializer/CollectionNormalizer.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use ApiPlatform\JsonLd\Serializer\HydraPrefixTrait;
1818
use ApiPlatform\JsonLd\Serializer\JsonLdContextTrait;
1919
use ApiPlatform\Metadata\IriConverterInterface;
20-
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2120
use ApiPlatform\Metadata\ResourceClassResolverInterface;
2221
use ApiPlatform\Metadata\UrlGeneratorInterface;
2322
use ApiPlatform\Serializer\AbstractCollectionNormalizer;
@@ -41,14 +40,10 @@ final class CollectionNormalizer extends AbstractCollectionNormalizer
4140
self::IRI_ONLY => false,
4241
];
4342

44-
public function __construct(private readonly ContextBuilderInterface $contextBuilder, ResourceClassResolverInterface $resourceClassResolver, private readonly IriConverterInterface $iriConverter, readonly ?ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory = null, array $defaultContext = [])
43+
public function __construct(private readonly ContextBuilderInterface $contextBuilder, ResourceClassResolverInterface $resourceClassResolver, private readonly IriConverterInterface $iriConverter, array $defaultContext = [])
4544
{
4645
$this->defaultContext = array_merge($this->defaultContext, $defaultContext);
4746

48-
if ($resourceMetadataCollectionFactory) {
49-
trigger_deprecation('api-platform/core', '3.0', \sprintf('Injecting "%s" within "%s" is not needed anymore and this dependency will be removed in 4.0.', ResourceMetadataCollectionFactoryInterface::class, self::class));
50-
}
51-
5247
parent::__construct($resourceClassResolver, '');
5348
}
5449

src/Laravel/ApiPlatformProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,6 @@ public function register(): void
756756
$app->make(ContextBuilderInterface::class),
757757
$app->make(ResourceClassResolverInterface::class),
758758
$app->make(IriConverterInterface::class),
759-
$app->make(ResourceMetadataCollectionFactoryInterface::class),
760759
$defaultContext
761760
),
762761
$app->make(ResourceMetadataCollectionFactoryInterface::class),

src/Symfony/Bundle/Resources/config/hydra.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
<argument type="service" id="api_platform.jsonld.context_builder" />
4444
<argument type="service" id="api_platform.resource_class_resolver" />
4545
<argument type="service" id="api_platform.iri_converter" />
46-
<argument>null</argument>
4746
<argument>%api_platform.serializer.default_context%</argument>
4847

4948
<!-- Run after api_platform.jsonld.normalizer.object but before serializer.normalizer.object and serializer.denormalizer.array -->

0 commit comments

Comments
 (0)