Skip to content

Commit 2327f29

Browse files
committed
fix(serializer): remove serializer context builder interface
1 parent 87f3a3a commit 2327f29

4 files changed

+4
-30
lines changed

SerializerContextBuilder.php

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use ApiPlatform\Metadata\Exception\RuntimeException;
2020
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2121
use ApiPlatform\Metadata\Util\AttributesExtractor;
22+
use ApiPlatform\State\SerializerContextBuilderInterface;
2223
use Symfony\Component\HttpFoundation\Request;
2324
use Symfony\Component\Serializer\Encoder\CsvEncoder;
2425
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;

SerializerContextBuilderInterface.php

-27
This file was deleted.

SerializerFilterContextBuilder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
1818
use ApiPlatform\Metadata\Util\AttributesExtractor;
1919
use ApiPlatform\Serializer\Filter\FilterInterface;
20-
use ApiPlatform\State\SerializerContextBuilderInterface as StateSerializerContextBuilderInterface;
20+
use ApiPlatform\State\SerializerContextBuilderInterface;
2121
use Psr\Container\ContainerInterface;
2222
use Symfony\Component\HttpFoundation\Request;
2323

@@ -28,7 +28,7 @@
2828
*/
2929
final class SerializerFilterContextBuilder implements SerializerContextBuilderInterface
3030
{
31-
public function __construct(private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, private readonly ContainerInterface $filterLocator, private readonly SerializerContextBuilderInterface|StateSerializerContextBuilderInterface $decorated)
31+
public function __construct(private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, private readonly ContainerInterface $filterLocator, private readonly SerializerContextBuilderInterface $decorated)
3232
{
3333
}
3434

Tests/SerializerFilterContextBuilderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2121
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;
2222
use ApiPlatform\Serializer\Filter\FilterInterface as SerializerFilterInterface;
23-
use ApiPlatform\Serializer\SerializerContextBuilderInterface;
2423
use ApiPlatform\Serializer\SerializerFilterContextBuilder;
2524
use ApiPlatform\Serializer\Tests\Fixtures\ApiResource\DummyGroup;
25+
use ApiPlatform\State\SerializerContextBuilderInterface;
2626
use PHPUnit\Framework\TestCase;
2727
use Prophecy\PhpUnit\ProphecyTrait;
2828
use Psr\Container\ContainerInterface;

0 commit comments

Comments
 (0)