BitBagCommerce / SyliusDHL24PlShippingExportPlugin

DHL Shipping export plugin for Sylius platform applications.
9 stars 7 forks source link

Weird Type error #5

Closed axotion closed 6 years ago

axotion commented 6 years ago

I tried to install dhl plugin with shipping export plugin. Then I followed instructions from

https://bitbag.shop/blog/bitbag-shipping-export-plugin-simple-way-to-control-shipments-in-your-online-store

And it works until i click "export all shipments". When i click on the button this happen

Symfony version: 3.4.9
Sylius version: 1.1.5
PHP: 7.2

Full stack trace:

Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to BitBag\Dhl24PlShippingExportPlugin\EventListener\ShippingExportEventListener::exportShipment() must be an instance of BitBag\ShippingExportPlugin\Event\ExportShipmentEvent, instance of BitBag\SyliusShippingExportPlugin\Event\ExportShipmentEvent given

  at vendor/bitbag/dhl24-pl-shipping-export-plugin/src/EventListener/ShippingExportEventListener.php:45
  at BitBag\Dhl24PlShippingExportPlugin\EventListener\ShippingExportEventListener->exportShipment(object(ExportShipmentEvent), 'bitbag.export_shipment', object(TraceableEventDispatcher))
  at call_user_func(array(object(ShippingExportEventListener), 'exportShipment'), object(ExportShipmentEvent), 'bitbag.export_shipment', object(TraceableEventDispatcher))
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:104)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExportShipmentEvent), 'bitbag.export_shipment', object(ContainerAwareEventDispatcher))
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:212)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener)), 'bitbag.export_shipment', object(ExportShipmentEvent))
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('bitbag.export_shipment', object(ExportShipmentEvent))
     (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:139)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('bitbag.export_shipment', object(ExportShipmentEvent))
     (vendor/bitbag/shipping-export-plugin/src/Controller/ShippingExportController.php:123)
  at BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController->dispatchExportShipmentEvent(object(ShippingExport))
     (vendor/bitbag/shipping-export-plugin/src/Controller/ShippingExportController.php:43)
  at BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController->exportAllNewShipmentsAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app_dev.php:42)
damonsson commented 6 years ago

Thanks @axotion that is the same bug as #4 I will fix it today.

axotion commented 6 years ago

When we can expect bugfix?

damonsson commented 6 years ago

Try branch namespaces temporary. I have to fix the tests there, but I think that should work now.

damonsson commented 6 years ago

Fixed by #7