Skip to content

Commit dfbedbb

Browse files
Merge branch '5.0' into 5.1
* 5.0: Parse and render anonymous classes correctly on php 8 Enable APCu for the php 8 build. [Process] Fix failing test on php 8. [HttpKernel] fix test Make PHP 8 green on Travis Revert "[Cache] allow DBAL v3" [PropertyAccessor] Added missing property path on php 8. Don't execute tests with DBAL 2.x on php 8.
2 parents 8edbc4c + 73f5500 commit dfbedbb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ protected function instantiateObject(array &$data, string $class, array &$contex
237237
*
238238
* @return string[]
239239
*/
240-
protected function getAttributes($object, string $format = null, array $context)
240+
protected function getAttributes($object, ?string $format, array $context)
241241
{
242242
$class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object);
243243
$key = $class.'-'.$context['cache_key'];

Tests/Normalizer/GetSetMethodNormalizerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ class GetConstructorArgsWithDefaultValueDummy
603603
protected $foo;
604604
protected $bar;
605605

606-
public function __construct($foo = [], $bar)
606+
public function __construct($foo = [], $bar = null)
607607
{
608608
$this->foo = $foo;
609609
$this->bar = $bar;

Tests/Normalizer/ObjectNormalizerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ class ObjectConstructorArgsWithDefaultValueDummy
784784
protected $foo;
785785
protected $bar;
786786

787-
public function __construct($foo = [], $bar)
787+
public function __construct($foo = [], $bar = null)
788788
{
789789
$this->foo = $foo;
790790
$this->bar = $bar;
@@ -934,7 +934,7 @@ class DummyWithConstructorObjectAndDefaultValue
934934
private $foo;
935935
private $inner;
936936

937-
public function __construct($foo = 'a', ObjectInner $inner)
937+
public function __construct($foo = 'a', ObjectInner $inner = null)
938938
{
939939
$this->foo = $foo;
940940
$this->inner = $inner;

0 commit comments

Comments
 (0)