diff --git a/Command/CleanTransactionCommand.php b/Command/CleanTransactionCommand.php index 0a792bb..3f143be 100644 --- a/Command/CleanTransactionCommand.php +++ b/Command/CleanTransactionCommand.php @@ -4,13 +4,13 @@ use IDCI\Bundle\PaymentBundle\Entity\Transaction; use IDCI\Bundle\PaymentBundle\Payment\PaymentStatus; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ConfirmationQuestion; -class CleanTransactionCommand extends ContainerAwareCommand +class CleanTransactionCommand extends Command { private const DEFAULT_DELAY = 'P1D'; @@ -40,7 +40,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { - $om = $this->getContainer()->get('doctrine')->getManager(); + $om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager(); $helper = $this->getHelper('question'); $delay = $input->getArgument('delay'); diff --git a/Command/CreatePaymentGatewayConfigurationCommand.php b/Command/CreatePaymentGatewayConfigurationCommand.php index 4ffdf0b..70849be 100644 --- a/Command/CreatePaymentGatewayConfigurationCommand.php +++ b/Command/CreatePaymentGatewayConfigurationCommand.php @@ -4,14 +4,14 @@ use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration; use IDCI\Bundle\PaymentBundle\Gateway\PaymentGatewayRegistry; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; -class CreatePaymentGatewayConfigurationCommand extends ContainerAwareCommand +class CreatePaymentGatewayConfigurationCommand extends Command { private $paymentGatewayRegistry; @@ -33,7 +33,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { - $om = $this->getContainer()->get('doctrine')->getManager(); + $om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager(); $helper = $this->getHelper('question'); $paymentGatewayList = $this->paymentGatewayRegistry->getAll(); diff --git a/Command/DeletePaymentGatewayConfigurationCommand.php b/Command/DeletePaymentGatewayConfigurationCommand.php index ff225a6..8b9d97a 100644 --- a/Command/DeletePaymentGatewayConfigurationCommand.php +++ b/Command/DeletePaymentGatewayConfigurationCommand.php @@ -4,13 +4,13 @@ use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration; use IDCI\Bundle\PaymentBundle\Exception\NoPaymentGatewayConfigurationFoundException; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; -class DeletePaymentGatewayConfigurationCommand extends ContainerAwareCommand +class DeletePaymentGatewayConfigurationCommand extends Command { public function __construct() { @@ -28,7 +28,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { - $om = $this->getContainer()->get('doctrine')->getManager(); + $om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager(); $helper = $this->getHelper('question'); $paymentGatewayRepository = $om->getRepository(PaymentGatewayConfiguration::class); diff --git a/Command/ListPaymentGatewayConfigurationCommand.php b/Command/ListPaymentGatewayConfigurationCommand.php index 7953246..e6ee022 100644 --- a/Command/ListPaymentGatewayConfigurationCommand.php +++ b/Command/ListPaymentGatewayConfigurationCommand.php @@ -4,12 +4,12 @@ use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration; use IDCI\Bundle\PaymentBundle\Exception\NoPaymentGatewayConfigurationFoundException; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; -class ListPaymentGatewayConfigurationCommand extends ContainerAwareCommand +class ListPaymentGatewayConfigurationCommand extends Command { public function __construct() { @@ -27,7 +27,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { - $om = $this->getContainer()->get('doctrine')->getManager(); + $om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager(); $helper = $this->getHelper('question'); $paymentGatewayRepository = $om->getRepository(PaymentGatewayConfiguration::class); diff --git a/Command/UpdatePaymentGatewayConfigurationCommand.php b/Command/UpdatePaymentGatewayConfigurationCommand.php index a74c803..27cda1d 100644 --- a/Command/UpdatePaymentGatewayConfigurationCommand.php +++ b/Command/UpdatePaymentGatewayConfigurationCommand.php @@ -4,14 +4,14 @@ use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration; use IDCI\Bundle\PaymentBundle\Exception\NoPaymentGatewayConfigurationFoundException; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; -class UpdatePaymentGatewayConfigurationCommand extends ContainerAwareCommand +class UpdatePaymentGatewayConfigurationCommand extends Command { public function __construct() { @@ -29,7 +29,7 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { - $om = $this->getContainer()->get('doctrine')->getManager(); + $om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager(); $helper = $this->getHelper('question'); $paymentGatewayRepository = $om->getRepository(PaymentGatewayConfiguration::class); diff --git a/Event/TransactionEvent.php b/Event/TransactionEvent.php index 089c7bd..7585403 100644 --- a/Event/TransactionEvent.php +++ b/Event/TransactionEvent.php @@ -3,7 +3,7 @@ namespace IDCI\Bundle\PaymentBundle\Event; use IDCI\Bundle\PaymentBundle\Model\Transaction; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; class TransactionEvent extends Event {