We use the Alice bundle for our fixtures in the behat feature tests. With the last update the order of the inserts of the entities has been changed. I don’t know how or why but it was done. But we must ensure that the entities has the expected ids.

Now we change to the Foundry package where we can be safe that the entities will be created in the expected order.

Does someone had the same problem with the Alice bundle?

#symfony #behat #feature #fixtures #php

@vansari you shouldn't rely on IDs, rather on references or particular properties...

@alessandrolai I know what you mean but if you work with API test you must rely on ids rather on referencesor particular properties.

Because you want to update or delete a resource with a specific id.

@vansari yes but you shouldn't hard code IDs in your tests, rather fetch the entity by reference and get the ID from there.