1313
1414namespace Liip \FunctionalTestBundle \Command ;
1515
16- use Symfony \Bundle \FrameworkBundle \Command \ContainerAwareCommand ;
1716use Symfony \Bundle \FrameworkBundle \Console \Application ;
17+ use Symfony \Component \Console \Command \Command ;
1818use Symfony \Component \Console \Input \ArrayInput ;
1919use Symfony \Component \Console \Input \InputArgument ;
2020use Symfony \Component \Console \Input \InputInterface ;
2121use Symfony \Component \Console \Output \OutputInterface ;
22+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
23+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
2224use Symfony \Component \Process \Process ;
2325
2426/**
2527 * Command used to update the project.
2628 */
27- class RunParatestCommand extends ContainerAwareCommand
29+ class RunParatestCommand extends Command implements ContainerAwareInterface
2830{
31+ use ContainerAwareTrait;
32+
2933 private $ output ;
3034
3135 private $ process ;
@@ -49,17 +53,17 @@ protected function configure(): void
4953
5054 protected function prepare (): void
5155 {
52- $ this ->phpunit = $ this ->getContainer () ->getParameter ('liip_functional_test.paratest.phpunit ' );
53- $ this ->process = $ this ->getContainer () ->getParameter ('liip_functional_test.paratest.process ' );
56+ $ this ->phpunit = $ this ->container ->getParameter ('liip_functional_test.paratest.phpunit ' );
57+ $ this ->process = $ this ->container ->getParameter ('liip_functional_test.paratest.process ' );
5458
55- $ this ->testDbPath = $ this ->getContainer () ->get ('kernel ' )->getCacheDir ();
59+ $ this ->testDbPath = $ this ->container ->get ('kernel ' )->getCacheDir ();
5660 $ this ->output ->writeln ("Cleaning old dbs in $ this ->testDbPath ... " );
5761 $ createDirProcess = new Process ('mkdir -p ' .$ this ->testDbPath );
5862 $ createDirProcess ->run ();
5963 $ cleanProcess = new Process ("rm -fr $ this ->testDbPath /dbTest.db $ this ->testDbPath /dbTest*.db* " );
6064 $ cleanProcess ->run ();
6165 $ this ->output ->writeln ("Creating Schema in $ this ->testDbPath ... " );
62- $ application = new Application ($ this ->getContainer () ->get ('kernel ' ));
66+ $ application = new Application ($ this ->container ->get ('kernel ' ));
6367 $ input = new ArrayInput (['doctrine:schema:create ' , '--env ' => 'test ' ]);
6468 $ application ->run ($ input , $ this ->output );
6569
0 commit comments