mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Merge pull request #2489 from pierredup/remove_event_dispatcher
Remove un-used EventDispatcher
This commit is contained in:
commit
eb94a52636
4 changed files with 2 additions and 22 deletions
|
|
@ -21,7 +21,6 @@ use SM\Factory\FactoryInterface;
|
|||
use Sylius\Bundle\PayumBundle\Payum\Action\AbstractPaymentStateAwareAction;
|
||||
use Sylius\Bundle\PayumBundle\Payum\Request\GetStatus;
|
||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
|
||||
|
|
@ -40,11 +39,6 @@ class NotifyAction extends AbstractPaymentStateAwareAction
|
|||
*/
|
||||
protected $paymentRepository;
|
||||
|
||||
/**
|
||||
* @var EventDispatcherInterface
|
||||
*/
|
||||
protected $eventDispatcher;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
|
|
@ -58,7 +52,6 @@ class NotifyAction extends AbstractPaymentStateAwareAction
|
|||
public function __construct(
|
||||
Api $api,
|
||||
RepositoryInterface $paymentRepository,
|
||||
EventDispatcherInterface $eventDispatcher,
|
||||
ObjectManager $objectManager,
|
||||
FactoryInterface $factory,
|
||||
$identifier
|
||||
|
|
@ -67,7 +60,6 @@ class NotifyAction extends AbstractPaymentStateAwareAction
|
|||
|
||||
$this->api = $api;
|
||||
$this->paymentRepository = $paymentRepository;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->objectManager = $objectManager;
|
||||
$this->identifier = $identifier;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,30 +19,22 @@ use SM\Factory\FactoryInterface;
|
|||
use Sylius\Bundle\PayumBundle\Payum\Action\AbstractPaymentStateAwareAction;
|
||||
use Sylius\Bundle\PayumBundle\Payum\Request\GetStatus;
|
||||
use Sylius\Component\Payment\Model\PaymentInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
class NotifyOrderAction extends AbstractPaymentStateAwareAction
|
||||
{
|
||||
/**
|
||||
* @var EventDispatcherInterface
|
||||
*/
|
||||
protected $eventDispatcher;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
protected $objectManager;
|
||||
|
||||
/**
|
||||
* @param EventDispatcherInterface $eventDispatcher
|
||||
* @param ObjectManager $objectManager
|
||||
* @param FactoryInterface $factory
|
||||
*/
|
||||
public function __construct(EventDispatcherInterface $eventDispatcher, ObjectManager $objectManager, FactoryInterface $factory)
|
||||
public function __construct(ObjectManager $objectManager, FactoryInterface $factory)
|
||||
{
|
||||
parent::__construct($factory);
|
||||
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->objectManager = $objectManager;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
<tag name="payum.action" factory="paypal_express_checkout_nvp" />
|
||||
</service>
|
||||
<service id="sylius.payum.paypal.action.notify_order" class="%sylius.payum.paypal.action.notify_order.class%" public="false">
|
||||
<argument type="service" id="event_dispatcher" />
|
||||
<argument type="service" id="sylius.manager.payment" />
|
||||
<argument type="service" id="sm.factory" />
|
||||
|
||||
|
|
@ -73,7 +72,6 @@
|
|||
<service id="sylius.payum.be2bill.action.notify" class="%sylius.payum.be2bill.action.notify.class%" public="false">
|
||||
<argument type="service" id="payum.context.be2bill.api" />
|
||||
<argument type="service" id="sylius.repository.payment" />
|
||||
<argument type="service" id="event_dispatcher" />
|
||||
<argument type="service" id="sylius.manager.payment" />
|
||||
<argument type="service" id="sm.factory" />
|
||||
<argument>id</argument>
|
||||
|
|
|
|||
|
|
@ -25,17 +25,15 @@ use Sylius\Component\Payment\Model\Payment;
|
|||
use Sylius\Component\Payment\Model\PaymentInterface as PaymentModelInterface;
|
||||
use Sylius\Component\Payment\PaymentTransitions;
|
||||
use Sylius\Component\Resource\StateMachine\StateMachineInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
class NotifyOrderActionSpec extends ObjectBehavior
|
||||
{
|
||||
function let(
|
||||
EventDispatcherInterface $eventDispatcher,
|
||||
ObjectManager $objectManager,
|
||||
FactoryInterface $factory,
|
||||
PaymentInterface $payment
|
||||
) {
|
||||
$this->beConstructedWith($eventDispatcher, $objectManager, $factory);
|
||||
$this->beConstructedWith($objectManager, $factory);
|
||||
$this->setPayment($payment);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue