Skip to content

Commit

Permalink
rollback serializer to support v3 and v4
Browse files Browse the repository at this point in the history
  • Loading branch information
saimaz committed Feb 20, 2020
1 parent 10b6193 commit bc7ee2f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
}
],
"require": {
"php": "^7.0",
"symfony/serializer": "^3.0|^4.0|^5.0",
"php": "^7.1",
"symfony/serializer": "^3.0|^4.0",
"paragonie/random_compat": "*"
},
"require-dev": {
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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $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, string $format = null, array $context = [])
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
{
$output = [];
if (count($this->getAll()) > 0) {
Expand Down
4 changes: 2 additions & 2 deletions 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, string $format = null, array $context = [])
public function normalize($object, $format = null, array $context = [])
{
$object->setReferences($this->references);
$data = parent::normalize($object, $format, $context);
Expand All @@ -38,7 +38,7 @@ public function normalize($object, string $format = null, array $context = [])
/**
* {@inheritdoc}
*/
public function supportsNormalization($data, string $format = null)
public function supportsNormalization($data, $format = null)
{
return $data instanceof AbstractNormalizable;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/OrderedSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class OrderedSerializer extends Serializer
/**
* {@inheritdoc}
*/
public function normalize($data, string $format = null, array $context = [])
public function normalize($data, $format = null, array $context = [])
{
return parent::normalize(
is_array($data) ? $this->order($data) : $data,
Expand Down

0 comments on commit bc7ee2f

Please sign in to comment.