Skip to content

Commit ae15044

Browse files
authored
Merge pull request #15 from IDCI-Consulting/fix/deprecations
Fix: deprecations related to symfony 4
2 parents cc1e41f + 732fa5c commit ae15044

6 files changed

+16
-16
lines changed

Command/CleanTransactionCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
use IDCI\Bundle\PaymentBundle\Entity\Transaction;
66
use IDCI\Bundle\PaymentBundle\Payment\PaymentStatus;
7-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7+
use Symfony\Component\Console\Command\Command;
88
use Symfony\Component\Console\Input\InputArgument;
99
use Symfony\Component\Console\Input\InputInterface;
1010
use Symfony\Component\Console\Output\OutputInterface;
1111
use Symfony\Component\Console\Question\ConfirmationQuestion;
1212

13-
class CleanTransactionCommand extends ContainerAwareCommand
13+
class CleanTransactionCommand extends Command
1414
{
1515
private const DEFAULT_DELAY = 'P1D';
1616

@@ -40,7 +40,7 @@ protected function configure()
4040

4141
protected function execute(InputInterface $input, OutputInterface $output)
4242
{
43-
$om = $this->getContainer()->get('doctrine')->getManager();
43+
$om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager();
4444
$helper = $this->getHelper('question');
4545

4646
$delay = $input->getArgument('delay');

Command/CreatePaymentGatewayConfigurationCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration;
66
use IDCI\Bundle\PaymentBundle\Gateway\PaymentGatewayRegistry;
7-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7+
use Symfony\Component\Console\Command\Command;
88
use Symfony\Component\Console\Input\InputInterface;
99
use Symfony\Component\Console\Output\OutputInterface;
1010
use Symfony\Component\Console\Question\ChoiceQuestion;
1111
use Symfony\Component\Console\Question\ConfirmationQuestion;
1212
use Symfony\Component\Console\Question\Question;
1313

14-
class CreatePaymentGatewayConfigurationCommand extends ContainerAwareCommand
14+
class CreatePaymentGatewayConfigurationCommand extends Command
1515
{
1616
private $paymentGatewayRegistry;
1717

@@ -33,7 +33,7 @@ protected function configure()
3333

3434
protected function execute(InputInterface $input, OutputInterface $output)
3535
{
36-
$om = $this->getContainer()->get('doctrine')->getManager();
36+
$om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager();
3737
$helper = $this->getHelper('question');
3838

3939
$paymentGatewayList = $this->paymentGatewayRegistry->getAll();

Command/DeletePaymentGatewayConfigurationCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration;
66
use IDCI\Bundle\PaymentBundle\Exception\NoPaymentGatewayConfigurationFoundException;
7-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7+
use Symfony\Component\Console\Command\Command;
88
use Symfony\Component\Console\Input\InputInterface;
99
use Symfony\Component\Console\Output\OutputInterface;
1010
use Symfony\Component\Console\Question\ChoiceQuestion;
1111
use Symfony\Component\Console\Question\ConfirmationQuestion;
1212

13-
class DeletePaymentGatewayConfigurationCommand extends ContainerAwareCommand
13+
class DeletePaymentGatewayConfigurationCommand extends Command
1414
{
1515
public function __construct()
1616
{
@@ -28,7 +28,7 @@ protected function configure()
2828

2929
protected function execute(InputInterface $input, OutputInterface $output)
3030
{
31-
$om = $this->getContainer()->get('doctrine')->getManager();
31+
$om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager();
3232
$helper = $this->getHelper('question');
3333

3434
$paymentGatewayRepository = $om->getRepository(PaymentGatewayConfiguration::class);

Command/ListPaymentGatewayConfigurationCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration;
66
use IDCI\Bundle\PaymentBundle\Exception\NoPaymentGatewayConfigurationFoundException;
7-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7+
use Symfony\Component\Console\Command\Command;
88
use Symfony\Component\Console\Input\InputInterface;
99
use Symfony\Component\Console\Output\OutputInterface;
1010
use Symfony\Component\Console\Question\ChoiceQuestion;
1111

12-
class ListPaymentGatewayConfigurationCommand extends ContainerAwareCommand
12+
class ListPaymentGatewayConfigurationCommand extends Command
1313
{
1414
public function __construct()
1515
{
@@ -27,7 +27,7 @@ protected function configure()
2727

2828
protected function execute(InputInterface $input, OutputInterface $output)
2929
{
30-
$om = $this->getContainer()->get('doctrine')->getManager();
30+
$om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager();
3131
$helper = $this->getHelper('question');
3232

3333
$paymentGatewayRepository = $om->getRepository(PaymentGatewayConfiguration::class);

Command/UpdatePaymentGatewayConfigurationCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
use IDCI\Bundle\PaymentBundle\Entity\PaymentGatewayConfiguration;
66
use IDCI\Bundle\PaymentBundle\Exception\NoPaymentGatewayConfigurationFoundException;
7-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7+
use Symfony\Component\Console\Command\Command;
88
use Symfony\Component\Console\Input\InputInterface;
99
use Symfony\Component\Console\Output\OutputInterface;
1010
use Symfony\Component\Console\Question\ChoiceQuestion;
1111
use Symfony\Component\Console\Question\ConfirmationQuestion;
1212
use Symfony\Component\Console\Question\Question;
1313

14-
class UpdatePaymentGatewayConfigurationCommand extends ContainerAwareCommand
14+
class UpdatePaymentGatewayConfigurationCommand extends Command
1515
{
1616
public function __construct()
1717
{
@@ -29,7 +29,7 @@ protected function configure()
2929

3030
protected function execute(InputInterface $input, OutputInterface $output)
3131
{
32-
$om = $this->getContainer()->get('doctrine')->getManager();
32+
$om = $this->getApplication()->getKernel()->getContainer()->get('doctrine')->getManager();
3333
$helper = $this->getHelper('question');
3434

3535
$paymentGatewayRepository = $om->getRepository(PaymentGatewayConfiguration::class);

Event/TransactionEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace IDCI\Bundle\PaymentBundle\Event;
44

55
use IDCI\Bundle\PaymentBundle\Model\Transaction;
6-
use Symfony\Component\EventDispatcher\Event;
6+
use Symfony\Contracts\EventDispatcher\Event;
77

88
class TransactionEvent extends Event
99
{

0 commit comments

Comments
 (0)