Skip to content

Commit

Permalink
Merge pull request #15 from IDCI-Consulting/fix/deprecations
Browse files Browse the repository at this point in the history
Fix: deprecations related to symfony 4
  • Loading branch information
BeBlood authored May 27, 2020
2 parents cc1e41f + 732fa5c commit ae15044
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Command/CleanTransactionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions Command/CreatePaymentGatewayConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions Command/DeletePaymentGatewayConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Command/ListPaymentGatewayConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Command/UpdatePaymentGatewayConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Event/TransactionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit ae15044

Please sign in to comment.