You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an entity is on the 1 side of a 1:n relationship (i.e. it has oneToMany), and I handle it with the Doctrine Module, the object gets infinitely large, thereby causing a PHP memory overflow.
Result: The output from var_dump is normal; and the entity exists in the database. But as soon as I remove die; the bug occurs: I get endless (i.e. hundreds or thousands of lines) output in the console. The same happens if I fetch the entity from the database with $I->grabEntityFromRepository.
This explains what I initially observed: If I try to pass the object to some function, I get a memory overflow crash from PHP.
I've tried it with SQLite and PostgreSQL.
If I do the same with the TestUser entity, everything is normal. So I'm figuring it has something to do with the oneToMany setting.
And if I do it in a controller, everything is fine too - so I'm figuring there's no error in the entities.
Setup
Codeception version: 2.3.5
PHP Version: 7.1
Operating System: Windows 10
The text was updated successfully, but these errors were encountered:
If an entity is on the
1
side of a1:n
relationship (i.e. it hasoneToMany
), and I handle it with the Doctrine Module, the object gets infinitely large, thereby causing a PHP memory overflow.Details
I've set up these two entities:
Now I run this functional test:
Result: The output from
var_dump
is normal; and the entity exists in the database. But as soon as I removedie;
the bug occurs: I get endless (i.e. hundreds or thousands of lines) output in the console. The same happens if I fetch the entity from the database with$I->grabEntityFromRepository
.This explains what I initially observed: If I try to pass the object to some function, I get a memory overflow crash from PHP.
I've tried it with SQLite and PostgreSQL.
If I do the same with the
TestUser
entity, everything is normal. So I'm figuring it has something to do with theoneToMany
setting.And if I do it in a controller, everything is fine too - so I'm figuring there's no error in the entities.
Setup
The text was updated successfully, but these errors were encountered: