mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
The orm:generate-repositories command still uses psr-0 #5778
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jorygeerts on GitHub (Nov 21, 2017).
Originally assigned to: @Ocramius on GitHub.
If you run
orm:generate-repositories src/, repositories are generated insrc/Vendor/Package/, psr-0 style.Given the fact that psr-0 has been deprecated for over two years, I feel it would be a good step add support for psr-4.
The most straight forward way to do this would be an extra option to
orm:generate-repositoriescalledpsr4-prefixor something in that spirit.EntityRepositoryGenerator::writeEntityRepositoryClass()could then be changed to remove that prefix from the start of$fullClassNamebefore generating the$path.If this is a change people would like to see, I'm more then willing to write the code and open a pull request.
@Ocramius commented on GitHub (Nov 21, 2017):
Not gonna happen: Doctrine voted against the abbreviated PSR-4 directory prefixing approach ages ago, and still stands against it.
It is needless complexity that isn't needed.
In addition to that, code generators are likely targeted for removal in 3.x.
@jorygeerts commented on GitHub (Nov 21, 2017):
I wasn't aware of that and a search of the issues didn't bring up anything; sorry for bringing it up again. :)
Thanks for the quick response.