Skip to content

Commit

Permalink
support serializer v5 and upgrade php minimum requirement to the 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
saimaz committed Feb 20, 2020
1 parent 1bfcd23 commit b7653ed
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: false
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
}
],
"require": {
"php": "^7.1",
"symfony/serializer": "^3.0|^4.0",
"php": "^7.2",
"symfony/serializer": "^5.0",
"paragonie/random_compat": "*",
"elasticsearch/elasticsearch": "^7.0"
},
"require-dev": {
"elasticsearch/elasticsearch": "^7.0",
"phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/AggregationsEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AggregationsEndpoint extends AbstractSearchEndpoint
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
$output = [];
if (count($this->getAll()) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/HighlightEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HighlightEndpoint extends AbstractSearchEndpoint
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
if ($this->highlight) {
return $this->highlight->toArray();
Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/InnerHitsEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class InnerHitsEndpoint extends AbstractSearchEndpoint
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
$output = [];
if (count($this->getAll()) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/PostFilterEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PostFilterEndpoint extends QueryEndpoint
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
if (!$this->getBool()) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/QueryEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class QueryEndpoint extends AbstractSearchEndpoint implements OrderedNormalizerI
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
if (!$this->filtersSet && $this->hasReference('filter_query')) {
/** @var BuilderInterface $filter */
Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/SortEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SortEndpoint extends AbstractSearchEndpoint
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
$output = [];

Expand Down
2 changes: 1 addition & 1 deletion src/SearchEndpoint/SuggestEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SuggestEndpoint extends AbstractSearchEndpoint
/**
* {@inheritdoc}
*/
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, string $format = null, array $context = [])
{
$output = [];
if (count($this->getAll()) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/Normalizer/CustomReferencedNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CustomReferencedNormalizer extends CustomNormalizer
/**
* {@inheritdoc}
*/
public function normalize($object, $format = null, array $context = [])
public function normalize($object, string $format = null, array $context = [])
{
$object->setReferences($this->references);
$data = parent::normalize($object, $format, $context);
Expand Down

0 comments on commit b7653ed

Please sign in to comment.