Skip to content

Feature Request: Add preLoad and postLoad events to enhance fixture loading managementΒ #71

@EdouardCourty

Description

@EdouardCourty

Hi there! πŸ‘‹

First off, thank you for this fantastic bundle β€” it's been a pleasure to use and has made fixture management so much simpler! πŸ™

I've come across a scenario while building an app that leverages Doctrine's onFlush and postFlush events to trigger additional logic. While this works great under normal circumstances, I’d like to ensure these events are bypassed when loading fixtures.

In the past, I’ve tried using a special environment parameter to manage this, but I’ve found it to be somewhat flaky and not the most reliable or elegant solution. I’ve also considered implementing a stateful service to track whether fixtures are being loaded. However, such an approach would greatly benefit from explicit events fired by the fixture loader itself.

Would it be possible to introduce events like preLoad and postLoad into this bundle? This addition would make it much easier to handle cases like mine and would likely be helpful for others too.

I’d be happy to contribute and submit a PR for this feature if it aligns with the goals of the project.

Thank you for considering this suggestion! Looking forward to hearing your thoughts. 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions