SyliusBrandPlugin
SyliusBrandPlugin copied to clipboard
Example how to extend/override plugin's entities/fixtures/forms
Fixes #54, fixes #48.
@igormukhingmailcom Thanks a million for that PR, really helpful to start customising that awesome bundle! 👍
However the only thing that did not work was extending the fixutres.
services:
# Fixture
app.fixture.brand:
class: Ono\Fixture\BrandFixture
arguments:
- "@loevgaard_sylius_brand.manager.brand"
- "@app.fixture.example_factory.brand"
tags:
- name: sylius_fixtures.fixture
app.fixture.example_factory.brand:
class: Ono\Fixture\Factory\BrandExampleFactory
parent: loevgaard_sylius_brand.fixture.example_factory.brand
The BrandFixture is identical to your code, but somehow it can't autowire it.
In DefinitionErrorExceptionPass.php line 54:
Cannot autowire service "Ono\Fixture\BrandFixture": argument "$exampleFactory" of method "Sylius\Bundle\CoreBundle\Fixture\AbstractResourceFixture::__construct()" references interface "Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface" but no such
service exists. You should maybe alias this interface to one of these existing services: "app.fixture.example_factory.brand", "Ono\Fixture\Factory\BrandExampleFactory", "sylius.fixture.example_factory.payment_method", "sylius.fixture.example_factory.shipping_ca
tegory", "sylius.fixture.example_factory.shipping_method", "sylius.fixture.example_factory.channel", "sylius.fixture.example_factory.customer_group", "sylius.fixture.example_factory.shop_user", "sylius.fixture.example_factory.admin_user", "sylius.fixture.example
_factory.promotion", "sylius.fixture.example_factory.promotion_action", "sylius.fixture.example_factory.promotion_rule", "sylius.fixture.example_factory.product_association_type", "sylius.fixture.example_factory.product_association", "sylius.fixture.example_fact
ory.product_option", "sylius.fixture.example_factory.product_attribute", "sylius.fixture.example_factory.product_review", "sylius.fixture.example_factory.tax_category", "sylius.fixture.example_factory.tax_rate", "sylius.fixture.example_factory.taxon", "sylius.fi
xture.example_factory.product", "sylius.fixture.example_factory.address", "sylius.fixture.example_factory.order", "loevgaard_sylius_brand.fixture.example_factory.brand", "sylius.fixture.example_factory.api_client", "sylius.fixture.example_factory.api_access_toke
n".
Do you have an idea what that might be?
Hi, @wittwerch
Not sure, but try to disable autowire (autowire: false)