Merge pull request #2489 from pierredup/remove_event_dispatcher

Remove un-used EventDispatcher
This commit is contained in:
Paweł Jędrzejewski 2015-02-18 18:42:22 +01:00
commit eb94a52636
4 changed files with 2 additions and 22 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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>

View file

@ -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);
}