Skip to content

Commit b7653ed

Browse files
committed
support serializer v5 and upgrade php minimum requirement to the 7.2
1 parent 1bfcd23 commit b7653ed

10 files changed

+10
-12
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
sudo: false
22
language: php
33
php:
4-
- 7.1
54
- 7.2
65
- 7.3
76
- 7.4

composer.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.1",
15-
"symfony/serializer": "^3.0|^4.0",
14+
"php": "^7.2",
15+
"symfony/serializer": "^5.0",
1616
"paragonie/random_compat": "*",
1717
"elasticsearch/elasticsearch": "^7.0"
1818
},
1919
"require-dev": {
20-
"elasticsearch/elasticsearch": "^7.0",
2120
"phpunit/phpunit": "^7.0",
2221
"squizlabs/php_codesniffer": "^3.0"
2322
},

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) {

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();

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) {

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;

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 */

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

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) {

src/Serializer/Normalizer/CustomReferencedNormalizer.php

+1-1
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);

0 commit comments

Comments
 (0)