Skip to content

Commit 02acc78

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 05774fb + b19f2c6 commit 02acc78

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

Tests/Compiler/AutowirePassTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Symfony\Component\DependencyInjection\Reference;
2727
use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
2828
use Symfony\Component\DependencyInjection\Tests\Fixtures\includes\FooVariadic;
29+
use Symfony\Component\DependencyInjection\Tests\Fixtures\includes\MultipleArgumentsOptionalScalarNotReallyOptional;
2930
use Symfony\Component\DependencyInjection\TypedReference;
3031

3132
require_once __DIR__.'/../Fixtures/includes/autowiring_classes.php';
@@ -452,6 +453,9 @@ public function testNoTypeArgsCannotBeAutowired()
452453
}
453454
}
454455

456+
/**
457+
* @requires PHP < 8
458+
*/
455459
public function testOptionalScalarNotReallyOptionalUsesDefaultValue()
456460
{
457461
$container = new ContainerBuilder();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\includes;
4+
5+
use Symfony\Component\DependencyInjection\Tests\Compiler\A;
6+
use Symfony\Component\DependencyInjection\Tests\Compiler\Lille;
7+
8+
class MultipleArgumentsOptionalScalarNotReallyOptional
9+
{
10+
public function __construct(A $a, $foo = 'default_val', Lille $lille)
11+
{
12+
}
13+
}
14+

Tests/Fixtures/includes/autowiring_classes.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ public function __construct(A $a, Lille $lille, $foo = 'some_val')
186186
{
187187
}
188188
}
189-
class MultipleArgumentsOptionalScalarNotReallyOptional
190-
{
191-
public function __construct(A $a, $foo = 'default_val', Lille $lille)
192-
{
193-
}
194-
}
195189

196190
/*
197191
* Classes used for testing createResourceForClass

0 commit comments

Comments
 (0)