Skip to content

Commit 7566d89

Browse files
committed
rollback support for v3 and v4 serializer
1 parent 057642e commit 7566d89

11 files changed

+14
-14
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ php:
88
- 7.4
99
env:
1010
global:
11-
- ES_VERSION=6.7.1 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
11+
- ES_VERSION=6.8.2 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
1212
install:
1313
- wget ${ES_DOWNLOAD_URL}
1414
- tar -xzf elasticsearch-${ES_VERSION}.tar.gz

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
],
1313
"require": {
1414
"php": "^7.0",
15-
"symfony/serializer": "^3.0|^4.0|^5.0",
16-
"paragonie/random_compat": "*"
15+
"symfony/serializer": "^3.0|^4.0",
16+
"paragonie/random_compat": "*",
17+
"elasticsearch/elasticsearch": "^6.0"
1718
},
1819
"require-dev": {
19-
"elasticsearch/elasticsearch": "^6.0",
2020
"phpunit/phpunit": "^7.0",
2121
"squizlabs/php_codesniffer": "^3.0"
2222
},

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, string $format = null, array $context = [])
30+
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
40+
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
30+
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
29+
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
42+
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
29+
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
30+
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
3131
{
3232
$output = [];
3333
if (count($this->getAll()) > 0) {

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, string $format = null, array $context = [])
29+
public function normalize($object, $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, string $format = null, array $context = [])
3838
/**
3939
* {@inheritdoc}
4040
*/
41-
public function supportsNormalization($data, string $format = null)
41+
public function supportsNormalization($data, $format = null)
4242
{
4343
return $data instanceof AbstractNormalizable;
4444
}

src/Serializer/OrderedSerializer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class OrderedSerializer extends Serializer
2222
/**
2323
* {@inheritdoc}
2424
*/
25-
public function normalize($data, string $format = null, array $context = [])
25+
public function normalize($data, $format = null, array $context = [])
2626
{
2727
return parent::normalize(
2828
is_array($data) ? $this->order($data) : $data,

0 commit comments

Comments
 (0)