File tree 3 files changed +34
-4
lines changed
3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 15
15
use PHPCR \Shell \Console \Command \Phpcr as CommandPhpcr ;
16
16
use PHPCR \Shell \Console \Command \Phpcr \BasePhpcrCommand ;
17
17
use PHPCR \Shell \Console \Command \Shell as CommandShell ;
18
+ use PHPCR \Shell \DependencyInjection \ContainerAwareInterface ;
18
19
use PHPCR \Shell \Event ;
19
20
use PHPCR \Shell \Event \ApplicationInitEvent ;
20
21
use PHPCR \Shell \Event \PhpcrShellEvents ;
26
27
use Symfony \Component \Console \Input \ArrayInput ;
27
28
use Symfony \Component \Console \Input \InputInterface ;
28
29
use Symfony \Component \Console \Output \OutputInterface ;
29
- use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
30
+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
30
31
use Symfony \Component \EventDispatcher \EventDispatcher ;
31
32
32
33
/**
@@ -42,7 +43,7 @@ class ShellApplication extends Application
42
43
protected $ showUnsupported = false ;
43
44
44
45
/**
45
- * @var Symfony\Component\DependencyInjection\ ContainerBuilder
46
+ * @var ContainerBuilder
46
47
*/
47
48
protected $ container ;
48
49
Original file line number Diff line number Diff line change 12
12
13
13
namespace PHPCR \Shell \Console \Command ;
14
14
15
+ use PHPCR \Shell \DependencyInjection \ContainerAwareInterface ;
15
16
use Symfony \Component \Console \Command \Command ;
16
- use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
17
17
use Symfony \Component \DependencyInjection \ContainerInterface ;
18
18
19
19
class BaseCommand extends Command implements ContainerAwareInterface
20
20
{
21
+ /**
22
+ * @var ContainerInterface
23
+ */
21
24
private $ container ;
22
25
23
- public function setContainer (ContainerInterface $ container = null )
26
+ public function setContainer (ContainerInterface $ container = null ): void
24
27
{
25
28
$ this ->container = $ container ;
26
29
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace PHPCR \Shell \DependencyInjection ;
13
+
14
+ use Symfony \Component \DependencyInjection \ContainerInterface ;
15
+
16
+ /**
17
+ * This was removed from Symfony in version 7.
18
+ *
19
+ * We keep using the pattern in the shell commands for now to avoid a complicated refactor.
20
+ *
21
+ * @author Fabien Potencier <fabien@symfony.com>
22
+ */
23
+ interface ContainerAwareInterface
24
+ {
25
+ public function setContainer (?ContainerInterface $ container ): void ;
26
+ }
You can’t perform that action at this time.
0 commit comments