Open sharan1 opened 4 years ago
when we updated factory muffin from v2.1 to v3.1
For auto-incrementing ids, we used to use the following function:
function () { static $last; if ($last === null) { return $last = 1; } return ++$last; }
But after upgrading the same function always started returning 1, resulting in errors for duplication of primary key in our test database.
1
Any idea what could be the issue and how to resolve it?
Originally posted by @sharan1 in https://github.com/thephpleague/factory-muffin/issues/382#issuecomment-582616072
Thanks for the report. I can't quite remember why this would have been broken. I'll have a think. ;)
when we updated factory muffin from v2.1 to v3.1
For auto-incrementing ids, we used to use the following function:
But after upgrading the same function always started returning
1
, resulting in errors for duplication of primary key in our test database.Any idea what could be the issue and how to resolve it?
Originally posted by @sharan1 in https://github.com/thephpleague/factory-muffin/issues/382#issuecomment-582616072