mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
convert-mapping with --namespace param doesn't output in correct directory #5707
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 @PeeHaa on GitHub (Sep 21, 2017).
Originally assigned to: @Ocramius on GitHub.
I am trying to run
convert-mappingfrom the database, but the generated files end up in the wrong location because of the namespace parameter.Path of my project:
/var/www/someprojectname.Path I want my entities to end up in:
/var/www/someprojectname/src/Storage/Doctrine/Entity.Namespace of the project:
Gitlicious.Root of namespace
/var/www/someprojectname/src.Command I run
Expected result
The generated entities end up directly under
/var/www/someprojectname/src/Storage/Doctrine/Entity.Actual result
The generated entities instead end up under
/var/www/src/someprojectname/Storage/Doctrine/Entity/Gitilicious/Storage/Doctrine/Entity.Note: When I don't pass the
--namespaceparameter the files end up where I expect them (without the namespace obviously).There is a (rather big) chance I am doing something stupid, but I don't see it.
@Ocramius commented on GitHub (Sep 21, 2017):
Doctrine doesn't and won't support PSR-4 namespace prefixing: we're the one
of the projects that voted against PSR-4 specifically for the prefixing
quirkyness that requires a lot of additional work in multiple layers.
On 21 Sep 2017 19:07, "Pieter Hordijk" notifications@github.com wrote:
@PeeHaa commented on GitHub (Sep 21, 2017):
Why are you touching the path at all instead of just dumping the files in the directory I tell to use with the namespace I tell it to use?
Where is the extra work? What am I missing?
@Ocramius commented on GitHub (Sep 21, 2017):
The class will be generated with a PSR-0 compliant path structure
On 21 Sep 2017 19:37, "Pieter Hordijk" notifications@github.com wrote:
@lcobucci commented on GitHub (Nov 26, 2017):
Closing as
Won't Fixdue to @Ocramius comments.