File tree 3 files changed +17
-21
lines changed
DependencyInjection/CompilerPass 3 files changed +17
-21
lines changed Original file line number Diff line number Diff line change 9
9
},
10
10
"require" : {
11
11
"php" : " >= 7.1.3" ,
12
- "symfony/framework-bundle" : " ^3.0 | ^4.0" ,
13
- "symfony/http-foundation" : " ^3.0 | ^4.0"
12
+ "symfony/framework-bundle" : " ^3.4 | ^4.0" ,
13
+ "symfony/http-foundation" : " ^3.4 | ^4.0"
14
14
},
15
15
"require-dev" : {
16
16
"phpunit/phpunit" : " ^7.0"
Original file line number Diff line number Diff line change 11
11
12
12
namespace SolidWorx \SimpleResponseBundle \DependencyInjection \CompilerPass ;
13
13
14
+ use SolidWorx \SimpleResponseBundle \ResponseHandler ;
14
15
use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
15
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
16
17
use Symfony \Component \DependencyInjection \Exception \InvalidArgumentException ;
@@ -26,11 +27,11 @@ class ResponseHandlerCompilerPass implements CompilerPassInterface
26
27
*/
27
28
public function process (ContainerBuilder $ container )
28
29
{
29
- if (!$ container ->hasDefinition (' simple_response_handler.handler ' )) {
30
+ if (!$ container ->hasDefinition (ResponseHandler::class )) {
30
31
return ;
31
32
}
32
33
33
- $ definition = $ container ->getDefinition (' simple_response_handler.handler ' );
34
+ $ definition = $ container ->getDefinition (ResponseHandler::class );
34
35
35
36
foreach (array_keys ($ container ->findTaggedServiceIds ('response_handler.handler ' )) as $ serviceId ) {
36
37
$ definition ->addMethodCall ('addHandler ' , [new Reference ($ serviceId )]);
Original file line number Diff line number Diff line change 1
1
services :
2
2
3
- simple_response_handler.handler :
4
- class : SolidWorx\SimpleResponseBundle\ResponseHandler
3
+ _defaults :
4
+ autowire : true
5
+ public : false
6
+ autoconfigure : true
5
7
6
- simple_response_handler.event.listener :
7
- class : SolidWorx\SimpleResponseBundle\ResponseHandlerListener
8
- arguments : ['@simple_response_handler.handler']
9
- tags :
10
- - { name: kernel.event_subscriber }
8
+ SolidWorx\SimpleResponseBundle\ResponseHandler : ~
9
+
10
+ SolidWorx\SimpleResponseBundle\ResponseHandlerListener :
11
+ tags : ['kernel.event_subscriber']
11
12
12
13
# Core handlers
13
- simple_response.handler.template_response :
14
- class : SolidWorx\SimpleResponseBundle\Handler\TemplateResponseHandler
15
- arguments : ['@templating']
16
- tags :
17
- - { name: 'response_handler.handler' }
14
+ SolidWorx\SimpleResponseBundle\Handler\TemplateResponseHandler :
15
+ tags : ['response_handler.handler']
18
16
19
- simple_response.handler.redirect_response :
20
- class : SolidWorx\SimpleResponseBundle\Handler\RouteRedirectHandler
21
- arguments : ['@router']
22
- tags :
23
- - { name: 'response_handler.handler' }
17
+ SolidWorx\SimpleResponseBundle\Handler\RouteRedirectHandler :
18
+ tags : ['response_handler.handler']
You can’t perform that action at this time.
0 commit comments