Closed skjaro closed 8 years ago
There is bug in getCommitOrder which adds multiple times same node which clears dependencyList in TopologicalSorter instance.
foreach ($classes as $class) { $sorter->addNode($class->name, $class);
should be:
foreach ($classes as $class) { if ( ! $sorter->hasNode($class->name)) $sorter->addNode($class->name, $class);
becouse code bellow already adds class in associationMappings:
if ( ! $sorter->hasNode($targetClassName)) { $sorter->addNode($targetClassName, $targetClass); } // add dependency ($targetClass before $class) $sorter->addDependency($targetClassName, $class->name);
@skjaro Can you make a test case and a PR for it ?
I will try, but I look at pull request #240 there is already fixed this issue.
Definitely, #240 fix my issue. I tested it today, please merge.
closed by #240
There is bug in getCommitOrder which adds multiple times same node which clears dependencyList in TopologicalSorter instance.
should be:
becouse code bellow already adds class in associationMappings: