Skip to content

Commit ce1f211

Browse files
committed
added support for serializer v5
1 parent 7566d89 commit ce1f211

9 files changed

+11
-11
lines changed

Diff for: composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.0",
15-
"symfony/serializer": "^3.0|^4.0",
14+
"php": "^7.2",
15+
"symfony/serializer": "^5.0",
1616
"paragonie/random_compat": "*",
1717
"elasticsearch/elasticsearch": "^6.0"
1818
},

Diff for: src/SearchEndpoint/AggregationsEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AggregationsEndpoint extends AbstractSearchEndpoint
2727
/**
2828
* {@inheritdoc}
2929
*/
30-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
30+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
3131
{
3232
$output = [];
3333
if (count($this->getAll()) > 0) {

Diff for: src/SearchEndpoint/HighlightEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class HighlightEndpoint extends AbstractSearchEndpoint
3737
/**
3838
* {@inheritdoc}
3939
*/
40-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
40+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
4141
{
4242
if ($this->highlight) {
4343
return $this->highlight->toArray();

Diff for: src/SearchEndpoint/InnerHitsEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class InnerHitsEndpoint extends AbstractSearchEndpoint
2727
/**
2828
* {@inheritdoc}
2929
*/
30-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
30+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
3131
{
3232
$output = [];
3333
if (count($this->getAll()) > 0) {

Diff for: src/SearchEndpoint/PostFilterEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class PostFilterEndpoint extends QueryEndpoint
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
29+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
3030
{
3131
if (!$this->getBool()) {
3232
return null;

Diff for: src/SearchEndpoint/QueryEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class QueryEndpoint extends AbstractSearchEndpoint implements OrderedNormalizerI
3939
/**
4040
* {@inheritdoc}
4141
*/
42-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
42+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
4343
{
4444
if (!$this->filtersSet && $this->hasReference('filter_query')) {
4545
/** @var BuilderInterface $filter */

Diff for: src/SearchEndpoint/SortEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SortEndpoint extends AbstractSearchEndpoint
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
29+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
3030
{
3131
$output = [];
3232

Diff for: src/SearchEndpoint/SuggestEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SuggestEndpoint extends AbstractSearchEndpoint
2727
/**
2828
* {@inheritdoc}
2929
*/
30-
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
30+
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
3131
{
3232
$output = [];
3333
if (count($this->getAll()) > 0) {

Diff for: src/Serializer/Normalizer/CustomReferencedNormalizer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CustomReferencedNormalizer extends CustomNormalizer
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function normalize($object, $format = null, array $context = [])
29+
public function normalize($object, string $format = null, array $context = [])
3030
{
3131
$object->setReferences($this->references);
3232
$data = parent::normalize($object, $format, $context);
@@ -38,7 +38,7 @@ public function normalize($object, $format = null, array $context = [])
3838
/**
3939
* {@inheritdoc}
4040
*/
41-
public function supportsNormalization($data, $format = null)
41+
public function supportsNormalization($data, string $format = null)
4242
{
4343
return $data instanceof AbstractNormalizable;
4444
}

0 commit comments

Comments
 (0)