From 4b330f95aa494df55950c60026f1d63374cd7215 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 23 May 2020 18:55:06 +0200 Subject: [PATCH] Make PHP 8 green on Travis --- Normalizer/AbstractObjectNormalizer.php | 2 +- Tests/Normalizer/GetSetMethodNormalizerTest.php | 2 +- Tests/Normalizer/ObjectNormalizerTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Normalizer/AbstractObjectNormalizer.php b/Normalizer/AbstractObjectNormalizer.php index c1fc4ad82..78a297b34 100644 --- a/Normalizer/AbstractObjectNormalizer.php +++ b/Normalizer/AbstractObjectNormalizer.php @@ -108,7 +108,7 @@ public function normalize($object, $format = null, array $context = []) * * @return string[] */ - protected function getAttributes($object, $format = null, array $context) + protected function getAttributes($object, $format, array $context) { $class = \get_class($object); $key = $class.'-'.$context['cache_key']; diff --git a/Tests/Normalizer/GetSetMethodNormalizerTest.php b/Tests/Normalizer/GetSetMethodNormalizerTest.php index 43536e814..e18bc6d1d 100644 --- a/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -728,7 +728,7 @@ class GetConstructorArgsWithDefaultValueDummy protected $foo; protected $bar; - public function __construct($foo = [], $bar) + public function __construct($foo = [], $bar = null) { $this->foo = $foo; $this->bar = $bar; diff --git a/Tests/Normalizer/ObjectNormalizerTest.php b/Tests/Normalizer/ObjectNormalizerTest.php index 62082e0cd..e27f1ac12 100644 --- a/Tests/Normalizer/ObjectNormalizerTest.php +++ b/Tests/Normalizer/ObjectNormalizerTest.php @@ -925,7 +925,7 @@ class ObjectConstructorArgsWithDefaultValueDummy protected $foo; protected $bar; - public function __construct($foo = [], $bar) + public function __construct($foo = [], $bar = null) { $this->foo = $foo; $this->bar = $bar; @@ -1075,7 +1075,7 @@ class DummyWithConstructorObjectAndDefaultValue private $foo; private $inner; - public function __construct($foo = 'a', ObjectInner $inner) + public function __construct($foo = 'a', ObjectInner $inner = null) { $this->foo = $foo; $this->inner = $inner;