Skip to content

Doctrine2: grabEntityFromRepository() causes invalid entity to be persisted #26

@ThomasLandauer

Description

@ThomasLandauer

In short: When editing an existing entity with a Symfony form and making it invalid, calling $I->grabEntityFromRepository() in a functional tests causes the (invalid!) entity to get persisted to the database.

Sample repository to reproduce: https://github.com/ThomasLandauer/codeception_issue_5439

Instructions:

The bug only appears if the form is editing an existing user (not creating a new one).

This might be related to https://github.com/Codeception/Codeception/issues/4804 , but it's worse, since it doesn't just flush what is "ready" to get flushed, but performs a full persist on its own.

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