File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/DependencyInjection/Compiler
tests/Functional/Doctrine/Phpcr Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 14
14
use Symfony \Cmf \Bundle \RoutingBundle \Validator \Constraints \RouteDefaultsTemplatingValidator ;
15
15
use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
16
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
17
+ use Symfony \Component \DependencyInjection \Reference ;
17
18
18
19
/**
19
20
* To avoid a BC-Break: If templating component exists, we will use the validator using general templating
@@ -29,10 +30,9 @@ class TemplatingValidatorPass implements CompilerPassInterface
29
30
public function process (ContainerBuilder $ container )
30
31
{
31
32
if ($ container ->has ('templating ' )) {
32
- $ templatingDefinition = $ container ->findDefinition ('templating ' );
33
33
$ validatorDefinition = $ container ->getDefinition ('cmf_routing.validator.route_defaults ' );
34
34
$ validatorDefinition ->setClass (RouteDefaultsTemplatingValidator::class);
35
- $ validatorDefinition ->replaceArgument (1 , $ templatingDefinition );
35
+ $ validatorDefinition ->replaceArgument (1 , new Reference ( ' templating ' ) );
36
36
}
37
37
}
38
38
}
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ public function testGetRouteCollectionForRequestFormat()
95
95
$ this ->assertEquals ('html ' , $ testroute ->getDefault ('_format ' ));
96
96
list ($ key , $ root ) = each ($ routes );
97
97
$ this ->assertEquals (self ::ROUTE_ROOT , $ key );
98
- $ this ->assertEquals ( null , $ root ->getDefault ('_format ' ));
98
+ $ this ->assertNull ( $ root ->getDefault ('_format ' ));
99
99
}
100
100
101
101
/**
You can’t perform that action at this time.
0 commit comments