Closed mvar closed 8 years ago
I have the same issue, fixtures are loaded when using v1.1.1 but it doesn't work with v1.2.0 and v1.2.1 and I get the same exception
I also have the same problem could anyone tell me how to fix it.
I have the same issue with a schema that uses inheritance see #227.
Same issue here.
This is because @Ocramius did some refactoring, i had solve it with tying the dependencies instead of
"doctrine/doctrine-fixtures-bundle": "~2.3.0",
"doctrine/data-fixtures": "~1.1.1",
to:
"doctrine/doctrine-fixtures-bundle": "~2.3.0",
"doctrine/data-fixtures": "1.1.1",
I think there was a wrong tagging somewhere because ~1.1.1 installed 1.2.0 which does not make sense. But in any case, there is your solution we can close this ticket after you guys confirm.
@cordoval sticking to old version is not a solution.
he he, it seems it is for sylius too. Not saying new code is not good. Just saying old code was not holding me back.
There is ongoing work in #231. With the minor improvement in #233 you will see the classes causing the exception.
Sticking to 1.1.*
is a good-enough solution for now. ORM 2.6 will not be compatible with it, though.
@Ocramius the 1.1 version was not breaking on purge for circular references (it may break at the DB level if you don't have ON DELETE
behavior configured for your constraints, but it would allow to work with cyclic graphs).
Throwing an exception instead of silently accepting cyclic graphs with the same limitation is a BC break, so not good for a minor version. And there is no workaround (contrary to the 1.1.x behavior where you could solve it by changing the ON DELETE behavior of your constraint in the DB)
Same issue here too, revert of composer update was the only solving way.
@Ocramius , why are you stopping to support cyclic definitions of entities? It's commonly used...
@Ocramius I think we would need to have a way to make the TopologicalSorter accept cyclic references for entities (their order is then undefined, and you have to ensure that the DB constraints can handle the removal of cycles) but keep being strict for the sorting of fixtures
I run into this exception when I try to load fixtures:
Fixtures are loaded when using version v1.1.1 of this library. Does not work with v1.2.1 or v1.2.0.
And... how I'm supposed to know where is the issue? Why does exception message prints
A
,B
,C
instead of real class names? I have ~100 entities (including embeddables).More about my case:
I have 3 level hierarchy which is made up with two additional classes. Top and bottom levels extends abstract class (single table inheritance). Middle level is of two types, so it has another abstract class which extends the first one. These levels are connected with parent-children relations which is described in main abstract class. Other classes just holds specific type and setter/getters for parent/children where needed.
I'm not sure what's wrong, but
CircularReferenceException
exception is thrown while processing main abstract class.