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 1111
1212namespace Symfony \Component \Config \DependencyInjection ;
1313
14+ use Symfony \Component \DependencyInjection \Argument \IteratorArgument ;
1415use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
1516use Symfony \Component \DependencyInjection \Compiler \PriorityTaggedServiceTrait ;
1617use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -42,6 +43,6 @@ public function process(ContainerBuilder $container)
4243 return ;
4344 }
4445
45- $ container ->getDefinition ($ this ->factoryServiceId )->replaceArgument (0 , $ resourceCheckers );
46+ $ container ->getDefinition ($ this ->factoryServiceId )->replaceArgument (0 , new IteratorArgument ( $ resourceCheckers) );
4647 }
4748}
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ class ResourceCheckerConfigCache implements ConfigCacheInterface
2929 private $ file ;
3030
3131 /**
32- * @var ResourceCheckerInterface[]
32+ * @var iterable| ResourceCheckerInterface[]
3333 */
3434 private $ resourceCheckers ;
3535
3636 /**
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
3939 */
40- public function __construct ($ file , array $ resourceCheckers = array ())
40+ public function __construct ($ file , $ resourceCheckers = array ())
4141 {
4242 $ this ->file = $ file ;
4343 $ this ->resourceCheckers = $ resourceCheckers ;
Original file line number Diff line number Diff line change 2020class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface
2121{
2222 /**
23- * @var ResourceCheckerInterface[]
23+ * @var iterable| ResourceCheckerInterface[]
2424 */
2525 private $ resourceCheckers = array ();
2626
2727 /**
28- * @param ResourceCheckerInterface[] $resourceCheckers
28+ * @param iterable| ResourceCheckerInterface[] $resourceCheckers
2929 */
30- public function __construct (array $ resourceCheckers = array ())
30+ public function __construct ($ resourceCheckers = array ())
3131 {
3232 $ this ->resourceCheckers = $ resourceCheckers ;
3333 }
Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Config \Tests \DependencyInjection ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Component \DependencyInjection \Argument \IteratorArgument ;
1516use Symfony \Component \DependencyInjection \Reference ;
1617use Symfony \Component \Config \DependencyInjection \ConfigCachePass ;
1718
@@ -38,11 +39,11 @@ public function testThatCheckersAreProcessedInPriorityOrder()
3839
3940 $ definition ->expects ($ this ->once ())
4041 ->method ('replaceArgument ' )
41- ->with (0 , array (
42+ ->with (0 , new IteratorArgument ( array (
4243 new Reference ('checker_1 ' ),
4344 new Reference ('checker_2 ' ),
4445 new Reference ('checker_3 ' ),
45- ));
46+ ))) ;
4647
4748 $ pass = new ConfigCachePass ();
4849 $ pass ->process ($ container );
Original file line number Diff line number Diff line change 2121 },
2222 "require-dev" : {
2323 "symfony/yaml" : " ~3.0" ,
24- "symfony/dependency-injection" : " ~3.2 "
24+ "symfony/dependency-injection" : " ~3.3 "
2525 },
2626 "conflict" : {
27- "symfony/dependency-injection" : " <3.2 "
27+ "symfony/dependency-injection" : " <3.3 "
2828 },
2929 "suggest" : {
3030 "symfony/yaml" : " To use the yaml reference dumper"
You can’t perform that action at this time.
0 commit comments