Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  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.
  • Loading branch information
nicolas-grekas committed May 24, 2020
2 parents d324206 + 843940a commit 73f5500
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Normalizer/AbstractObjectNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ protected function instantiateObject(array &$data, string $class, array &$contex
*
* @return string[]
*/
protected function getAttributes($object, string $format = null, array $context)
protected function getAttributes($object, ?string $format, array $context)
{
$class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object);
$key = $class.'-'.$context['cache_key'];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Normalizer/GetSetMethodNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ class GetConstructorArgsWithDefaultValueDummy
protected $foo;
protected $bar;

public function __construct($foo = [], $bar)
public function __construct($foo = [], $bar = null)
{
$this->foo = $foo;
$this->bar = $bar;
Expand Down
4 changes: 2 additions & 2 deletions Tests/Normalizer/ObjectNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ class ObjectConstructorArgsWithDefaultValueDummy
protected $foo;
protected $bar;

public function __construct($foo = [], $bar)
public function __construct($foo = [], $bar = null)
{
$this->foo = $foo;
$this->bar = $bar;
Expand Down Expand Up @@ -920,7 +920,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;
Expand Down

0 comments on commit 73f5500

Please sign in to comment.