Skip to content

Commit

Permalink
fix(serializer): remove serializer context builder interface
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Sep 20, 2024
1 parent 87f3a3a commit 2327f29
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 30 deletions.
1 change: 1 addition & 0 deletions SerializerContextBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use ApiPlatform\Metadata\Exception\RuntimeException;
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
use ApiPlatform\Metadata\Util\AttributesExtractor;
use ApiPlatform\State\SerializerContextBuilderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Serializer\Encoder\CsvEncoder;
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
Expand Down
27 changes: 0 additions & 27 deletions SerializerContextBuilderInterface.php

This file was deleted.

4 changes: 2 additions & 2 deletions SerializerFilterContextBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
use ApiPlatform\Metadata\Util\AttributesExtractor;
use ApiPlatform\Serializer\Filter\FilterInterface;
use ApiPlatform\State\SerializerContextBuilderInterface as StateSerializerContextBuilderInterface;
use ApiPlatform\State\SerializerContextBuilderInterface;
use Psr\Container\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;

Expand All @@ -28,7 +28,7 @@
*/
final class SerializerFilterContextBuilder implements SerializerContextBuilderInterface
{
public function __construct(private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, private readonly ContainerInterface $filterLocator, private readonly SerializerContextBuilderInterface|StateSerializerContextBuilderInterface $decorated)
public function __construct(private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, private readonly ContainerInterface $filterLocator, private readonly SerializerContextBuilderInterface $decorated)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/SerializerFilterContextBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;
use ApiPlatform\Serializer\Filter\FilterInterface as SerializerFilterInterface;
use ApiPlatform\Serializer\SerializerContextBuilderInterface;
use ApiPlatform\Serializer\SerializerFilterContextBuilder;
use ApiPlatform\Serializer\Tests\Fixtures\ApiResource\DummyGroup;
use ApiPlatform\State\SerializerContextBuilderInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;
Expand Down

0 comments on commit 2327f29

Please sign in to comment.