Skip to content

Issue with disabling fixtures #52

@maciekpaprocki

Description

@maciekpaprocki

Sylius version affected: 1.8+, but seems that the current one has an issue.

Description
It seems that it's Impossible to switch off certain ( or all ) fixtures using false as in the doc:
https://github.com/Sylius/SyliusFixturesBundle/blob/master/docs/architecture.md#disabling-listeners--fixtures-in-consecutive-configurations

This is especially hard when we want to define fixtures with smaller subset. For example, I want to have only 3 currencies in my shop. I could disable default one and redeclare it with lower subset under different key.

Steps to reproduce

sylius_fixtures:
    suites:
        default:
            fixtures:
                currency: false

And run bin/console sylius:fixtures:load --no-interaction

Command outputs Running suite "currency" and the data is loaded from the default fixture configuration.

As the fixtures are not doing checks first, overwriting certain fixtures will end up with duplicate entries.

According to the documentation that should disable the currency fixture, but unfortunately, it has no effect.

I think this feature is documented but it's actually not supported, or maybe supported only in subset.

Possible Solution

I am not really sure if that's feature you want to support, but if not the doc should be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions