Skip to content

Commit a2b64b7

Browse files
bors[bot]Holger Lösken
andauthored
Merge #93
93: Remove jms serializer r=curquiza a=codedge This PR remove the `jms/serializer` package. The serializer used by `melisearch-symfony` is [Symfonys Serializer Component](https://symfony.com/doc/current/components/serializer.html). I think the usage of jms/serilaizer was a left-over from somewhen, as the normalizer cannot be different to the `NormalizerInterface` coming from Symfonys component. Further the `jms/serializer` component was added in the `require-dev` section which indicates that the package was used for testing/developing purposes. I wasn't able to spot any usage. Co-authored-by: Holger Lösken <[email protected]>
2 parents 82d8ba1 + cf29489 commit a2b64b7

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"require-dev": {
3030
"doctrine/doctrine-bundle": "^2.3",
3131
"friendsofphp/php-cs-fixer": "^3.0",
32-
"jms/serializer-bundle": "^3.0",
3332
"nyholm/psr7": "^1.3",
3433
"phpunit/phpunit": "^9.5",
3534
"symfony/doctrine-bridge": "^4.0 || ^5.0",

src/SearchableEntity.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace MeiliSearch\Bundle;
66

77
use Doctrine\Persistence\Mapping\ClassMetadata;
8-
use JMS\Serializer\ArrayTransformerInterface;
98
use Symfony\Component\Config\Definition\Exception\Exception;
109
use Symfony\Component\Serializer\Exception\ExceptionInterface;
1110
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
@@ -70,8 +69,6 @@ public function getSearchableArray(): array
7069

7170
if ($this->normalizer instanceof NormalizerInterface) {
7271
return $this->normalizer->normalize($this->entity, Searchable::NORMALIZATION_FORMAT, $context);
73-
} elseif ($this->normalizer instanceof ArrayTransformerInterface) {
74-
return $this->normalizer->toArray($this->entity);
7572
}
7673

7774
return [];

0 commit comments

Comments
 (0)