BitBagCommerce / SyliusShippingExportPlugin

Shipping export management architecture for Sylius based apps.
MIT License
29 stars 29 forks source link

Issue with configuration #42

Closed LuigiG34 closed 1 year ago

LuigiG34 commented 1 year ago

Hello i would like to use this plugin and i am facing errors, i was facing this error :

Compile Error: Type of BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController::$repository must be Sylius\Component\Resource\Repository\RepositoryInterface (as in class Sylius\Bundle\ResourceBundle\Controller\ResourceController)

So i followed the solution in this issue : https://github.com/BitBagCommerce/SyliusShippingExportPlugin/issues/36

So i decided to override the Controller and add protected RepositoryInterface $repository; instead of protected $repository;.

Now i added this controller to my services.yaml :

    bitbag.shipping_export_plugin.controller.shipping_export:
        class: 'BitBag\OpenMarketplace\SyliusShippingExportPlugin\Controller\ShippingExportController'
        tags:
            - { name: 'controller.service_arguments' }

And i am facing this new error now :

Class "BitBag\OpenMarketplace\SyliusShippingExportPlugin\Controller\ShippingExportController" used for service "bitbag.shipping_export_plugin.controller.shipping_export" cannot be found.

The file is in src/Controller, the namespace is correct i don't really understand why it's not working and i was wondering if anyone delt with this same error or if it's maybe the fact that i'm overiding the Controller.

I am using Sylius v1.11.15, Plugin v1.7.0 and PHP 8.0.26, if i can provide any extra information i will.

I am following this article : https://bitbag.io/blog/bitbag-shipping-export-plugin-simple-way-to-control-shipments-in-your-online-store

And starting facing the errors here :

Import routing in you app/config/routing.yml:

bitbag_shipping_export_plugin:
    resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing.yml"
    prefix: /admin
LuigiG34 commented 1 year ago

My bad i was not overiding this properly sorry