DDC-26: Add support for subdirectories in classdir when using schema-tool --create #32

Closed
opened 2026-01-22 12:24:51 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 1, 2009).

Originally assigned to: @jwage on GitHub.

Jira issue originally created by user itoijala:

Currently when using schema-tool --create, all entity classes have to be in one directory. Subdirectories are not supported and result in errors. The iterator tries to require the subdirectories. This makes it impossible to use schema-tool --create to create the database for models that use namespaces and follow Doctrine rules for placing the files in subdirectories.

The schema-tool should iterate through all of the subdirectories of the classdir to find all of the entity classes. It should also not try to require() any directories.

Originally created by @doctrinebot on GitHub (Oct 1, 2009). Originally assigned to: @jwage on GitHub. Jira issue originally created by user itoijala: Currently when using schema-tool --create, all entity classes have to be in one directory. Subdirectories are not supported and result in errors. The iterator tries to require the subdirectories. This makes it impossible to use schema-tool --create to create the database for models that use namespaces and follow Doctrine rules for placing the files in subdirectories. The schema-tool should iterate through all of the subdirectories of the classdir to find all of the entity classes. It should also not try to require() any directories.
admin added the Improvement label 2026-01-22 12:24:51 +01:00
admin closed this issue 2026-01-22 12:24:52 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 1, 2009):

Comment created by romanb:

Jon, I remember you mentioning this issue already. Did you fix it already?

@doctrinebot commented on GitHub (Oct 1, 2009): Comment created by romanb: Jon, I remember you mentioning this issue already. Did you fix it already?
Author
Owner

@doctrinebot commented on GitHub (Oct 1, 2009):

Comment created by @jwage:

No but I will fix it. The problem exists in Doctrine\ORM\Tools\Export\ClassMetadataExporter as well.

@doctrinebot commented on GitHub (Oct 1, 2009): Comment created by @jwage: No but I will fix it. The problem exists in Doctrine\ORM\Tools\Export\ClassMetadataExporter as well.
Author
Owner

@doctrinebot commented on GitHub (Oct 3, 2009):

Comment created by @guilhermeblanco:

We should make is an option, not recursive all the time.... maybe include as an optional parameter --recursive

I'll check it out the issue and will come with a solution later today.

@doctrinebot commented on GitHub (Oct 3, 2009): Comment created by @guilhermeblanco: We should make is an option, not recursive all the time.... maybe include as an optional parameter --recursive I'll check it out the issue and will come with a solution later today.
Author
Owner

@doctrinebot commented on GitHub (Oct 5, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 5, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#32