Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location of schema.xml (outside of bundle) #330

Closed
gharlan opened this issue Mar 9, 2015 · 2 comments
Closed

Location of schema.xml (outside of bundle) #330

gharlan opened this issue Mar 9, 2015 · 2 comments

Comments

@gharlan
Copy link
Contributor

gharlan commented Mar 9, 2015

At the moment the schema.xml has to be in <bundle>/Resources/config (correct me if I'm wrong).
But I think /app/config/schema.xml should also be considered.

According to the Symfony Best Practices there should be only one bundle for the application logic (called AppBundle) and the global resources should be located in /app (e.g. templates and translation files).

@Maxooo
Copy link

Maxooo commented Mar 12, 2015

Now, the question is : is the schema.xml (or another propel schema file name) a global resource ? To initiate the reflexion we can look at the Doctrine ORM implementation in Symfony2. The schema definition doesn't require any "configuration" file and it lies in the classes themselves (stored in a bundle).
Even if you store your schema definition file in the app directory you will have to specify the path where you want to store the model classes : in a Bundle...
So, I think the schema.xml file is not a configuration file but a definition file attached to a specific Bundle or the most global application Bundle : the AppBundle.
I understand the idea and the goal, but don't know if it's a real good idea. I'm also interested in knowing your point of view.

@havvg
Copy link
Member

havvg commented Jul 16, 2015

As no bundle is required at all, I'm +1 on enabling support for global schema files. Currently I'm putting them into one bundle, so they are at least in one place :)

It's especially useful, if your models do not live inside a bundle.

@havvg havvg added this to the 1.5 milestone Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants