I should probably write something about the reasoning for this patch:

1. The previous autodetection mapping defaults were very unflexible. They 
required you to have Entities in a predefined naming convention and inside your 
bundle. This patch allows you to map anything inside or outside a bundle 
without problems.
2. When you had bundles that offered both MongoDB and ORM mappings (for example 
FOS/UserBundle) the autodetection would always detect both with no option for 
the developer to pick which one he uses. The explicit mapping circumvents this 
problem.


On Thu, 30 Dec 2010 16:00:48 +0100
Benjamin Eberlei <[email protected]> wrote:

> Hello everyone,
> 
> Fabien merged my patch that requires explicit definition of the ORM and 
> MongoDB bundle information.
> 
> See the patch:
> 
> https://github.com/fabpot/symfony/commit/ba2b1aad281d389d9464bc53ef31e565272cdb5e#L0R381
> 
> This means for each bundle that has mapping information and follows the 
> conventions you have to specify:
> 
> doctrine.orm:
>   mappings:
>     MyBundle: ~
> 
> For each bundle that does not follow the conventions there are 5 variables 
> you can specifiy:
> 
> type: (xml, yml, annotations, php, static-php)
> dir: directory of the mapping data or entities
> prefix: the namespace prefix for this entities.
> alias: the alias for the entity or document aliases.
> is_bundle: defaults to true
> 
> All this can be autodetected if you follow the conventions:
> 
> Entities/Documents into "Bundle/Entities" or "Bundle/Documents" if you use 
> annotations.
> Or Resources/config/doctrine/metadata/<mongodb|orm>/ for yml or xml.
> 
> The prefix defaults to the BundleName + \Entities or \Documents. The Alias 
> defaults to the bundle name.
> 
> If "dir" is a relative path (file_exists => false) it is assumed to be 
> relative to the bundle directory.
> If you are using mapping files that are not inside your bundle you have to 
> use %kernel.dir% or equivalent
> parameters that are resolved through the DI Container.
> 
> I'll write all that up in more nicer language and push it to the symfony docs 
> asap.
> 
> greetings,
> Benjamin
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
> 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to