Open discern opened 8 months ago
Strange. Sounds like it's pluralizing the model reference. Feel free to dig into the code for a PR. Otherwise, I'll fix this in the coming weeks.
My weekend brain was thinks the issue appears to be with \Doctrine\Inflector
. But simply adding another rule to contradict '([ti])a$', '\1um'
doesn't solve it. I was able to get the correct class name to appear in RaceFactory
by adding yield new Substitution(new Word('regattas'), new Word('regatta'));
to the getIrregular()
method, but it didn't quite solve the problem because the RaceFactory
now calls Regattas::factory()
. But I'm sure we'll get to the bottom of this... 🕵️
I'm not sure why Blueprint even attempts to pluralize the class name. It should just use the model reference directly as the prefix.
Made a PR over at doctrine/inflector.
Seems like it got merged over there, nice!
Issue:
Blueprint correctly creates a
Regatta
model and aregattas
table; however, in theRaceFactory
file, it callsRegattum::factory()
.draft.yaml: