Our team sometimes experiences a crash when doing a reverse engineer of a schema. We've traced it to the model/Column.php class:
public function hasReferrer(ForeignKey $fk)
return $this->hasReferrers() && in_array($fk, $this->referrers);
Adding a "true" as the third argument for strict checking fixes the issue.
May you provide a simplified schema which shows the problem?
I haven't been able to figure out the exact cause yet, because the recursion occurs in in_array. We may have some sort of circular foreign key which is brining out the issue, but we haven't found it yet. All I know so far is that for this method, using in_array without the true sometimes leads to a crash due to recursion. I think PHP treats the objects like arrays and traverses them unless strict is true. If the objects have circular references, the traversal would become infinite and cause this error. If that is true, adding the true is likely a performance benefit.
This would probably be a good idea anywhere in_array is being used with arrays of objects.