On Thu, 9 Dec 2010 16:33:25 +0100, Lukas Kahwe Smith <[email protected]> wrote: > On 09.12.2010, at 12:22, Benjamin Eberlei wrote: > >> Ok, if auto-detection isn't the must we really should move to the >> suggested scheme. :-) >> >> But you are right, Entities outside the bundle scheme are still an issue. >> One could register them in the Bundle Extension by accessing the >> Definition >> for 'doctrine.orm.metadata_driver' but that is rather technical. >> >> Mapping Drivers essentially need three pieces of information. >> >> 1. Type of the Driver (XML, Annotation, Yaml, PHP, StaticPHP or a service >> name) >> 2. Location of either the mapping data or the entities (depending on the >> type of driver) >> 3. Class-Prefix to attach this driver to for the DriverChain. >> >> We could add another config key for this: >> >> doctrine.orm: >> default: >> bundles: >> ... >> mappings: >> arbitrary_key: { type: xml, dir: >> src/vendor/DoctrineExtensions/lib/DoctrineExtensions/Entities, prefix: >> DoctrineExtensions\Entities\ } >> >> It would be possible to merge bundles and mappings and detect a bundle by >> the key. This is rather magical though. I lean for supporting both key >> "bundles" and "mappings". The bundles key is really easy to use and the >> mappings key always requires the three options "type", "dir", "prefix". >> And >> by default users really only need the bundles key. > > > sounds good to me. > i think the mappings should support both directories as well as explicit > files (maybe glob syntax?) so that one could also exclude stuff. this way > one could also use the mappings syntax to selectively pick stuff from > Bundles. > > regards, > Lukas Kahwe Smith > [email protected]
That doesnt make sense to me imho. If a bundle has several entities/mappings in a directory they belong together by assumption. I wouldn't allow the user go fiddle with what he wants and what not. He can use the bundle, or not. Everything else is micromanagement that will do more harm than good. -- 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
