File tree Expand file tree Collapse file tree 5 files changed +14
-12
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 5 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Config \DependencyInjection ;
13
13
14
+ use Symfony \Component \DependencyInjection \Argument \IteratorArgument ;
14
15
use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
15
16
use Symfony \Component \DependencyInjection \Compiler \PriorityTaggedServiceTrait ;
16
17
use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -42,6 +43,6 @@ public function process(ContainerBuilder $container)
42
43
return ;
43
44
}
44
45
45
- $ container ->getDefinition ($ this ->factoryServiceId )->replaceArgument (0 , $ resourceCheckers );
46
+ $ container ->getDefinition ($ this ->factoryServiceId )->replaceArgument (0 , new IteratorArgument ( $ resourceCheckers) );
46
47
}
47
48
}
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface
29
29
private $ file ;
30
30
31
31
/**
32
- * @var ResourceCheckerInterface[]
32
+ * @var iterable| ResourceCheckerInterface[]
33
33
*/
34
34
private $ resourceCheckers ;
35
35
36
36
/**
37
- * @param string $file The absolute cache path
38
- * @param ResourceCheckerInterface[] $resourceCheckers The ResourceCheckers to use for the freshness check
37
+ * @param string $file The absolute cache path
38
+ * @param iterable| ResourceCheckerInterface[] $resourceCheckers The ResourceCheckers to use for the freshness check
39
39
*/
40
- public function __construct ($ file , array $ resourceCheckers = array ())
40
+ public function __construct ($ file , $ resourceCheckers = array ())
41
41
{
42
42
$ this ->file = $ file ;
43
43
$ this ->resourceCheckers = $ resourceCheckers ;
Original file line number Diff line number Diff line change 20
20
class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface
21
21
{
22
22
/**
23
- * @var ResourceCheckerInterface[]
23
+ * @var iterable| ResourceCheckerInterface[]
24
24
*/
25
25
private $ resourceCheckers = array ();
26
26
27
27
/**
28
- * @param ResourceCheckerInterface[] $resourceCheckers
28
+ * @param iterable| ResourceCheckerInterface[] $resourceCheckers
29
29
*/
30
- public function __construct (array $ resourceCheckers = array ())
30
+ public function __construct ($ resourceCheckers = array ())
31
31
{
32
32
$ this ->resourceCheckers = $ resourceCheckers ;
33
33
}
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Config \Tests \DependencyInjection ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Component \DependencyInjection \Argument \IteratorArgument ;
15
16
use Symfony \Component \DependencyInjection \Reference ;
16
17
use Symfony \Component \Config \DependencyInjection \ConfigCachePass ;
17
18
@@ -38,11 +39,11 @@ public function testThatCheckersAreProcessedInPriorityOrder()
38
39
39
40
$ definition ->expects ($ this ->once ())
40
41
->method ('replaceArgument ' )
41
- ->with (0 , array (
42
+ ->with (0 , new IteratorArgument ( array (
42
43
new Reference ('checker_1 ' ),
43
44
new Reference ('checker_2 ' ),
44
45
new Reference ('checker_3 ' ),
45
- ));
46
+ ))) ;
46
47
47
48
$ pass = new ConfigCachePass ();
48
49
$ pass ->process ($ container );
Original file line number Diff line number Diff line change 21
21
},
22
22
"require-dev" : {
23
23
"symfony/yaml" : " ~3.0" ,
24
- "symfony/dependency-injection" : " ~3.2 "
24
+ "symfony/dependency-injection" : " ~3.3 "
25
25
},
26
26
"conflict" : {
27
- "symfony/dependency-injection" : " <3.2 "
27
+ "symfony/dependency-injection" : " <3.3 "
28
28
},
29
29
"suggest" : {
30
30
"symfony/yaml" : " To use the yaml reference dumper"
You can’t perform that action at this time.
0 commit comments