File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use ONGR \ElasticsearchBundle \DependencyInjection \Configuration ;
15
15
use ONGR \ElasticsearchBundle \Service \IndexService ;
16
- use Symfony \Bundle \FrameworkBundle \Command \ContainerAwareCommand ;
17
16
use Symfony \Component \Console \Command \Command ;
18
17
use Symfony \Component \Console \Input \InputOption ;
19
18
use Symfony \Component \DependencyInjection \Container ;
19
+ use Symfony \Component \DependencyInjection \ContainerInterface ;
20
20
21
21
abstract class AbstractIndexServiceAwareCommand extends Command
22
22
{
23
23
private $ container ;
24
24
25
25
const INDEX_OPTION = 'index ' ;
26
26
27
- public function __construct (Container $ container )
27
+ public function __construct (ContainerInterface $ container )
28
28
{
29
29
$ this ->container = $ container ;
30
30
parent ::__construct ();
@@ -58,7 +58,7 @@ protected function getIndex($name): IndexService
58
58
);
59
59
}
60
60
61
- public function getContainer (): Container
61
+ public function getContainer (): ContainerInterface
62
62
{
63
63
return $ this ->container ;
64
64
}
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ parameters:
3
3
4
4
services :
5
5
6
- _defaults : { public: true }
6
+ _defaults :
7
+ public : true
8
+ autowire : true
7
9
8
10
ONGR\ElasticsearchBundle\Command\ :
9
11
resource : ' ../../Command'
@@ -45,4 +47,4 @@ services:
45
47
ONGR\ElasticsearchBundle\EventListener\TerminateListener :
46
48
arguments : ["@service_container", "%ongr.esb.indexes%"]
47
49
tags :
48
- - { name: kernel.event_listener, event: kernel.terminate }
50
+ - { name: kernel.event_listener, event: kernel.terminate }
You can’t perform that action at this time.
0 commit comments