Thanks for you answer, though I might need further clarification. Let's say I intended to use php mappings for my application. I have a folder filled with mapping files and a namespace filled with ORM agnostic entities. I configured Doctrine to use PHPDriver to link those entities to their respective mappings. If I used annotations or YAML, I would only need to register the extension eventListener and the extension properties could simply be mapped through new annotations or yaml properties. Since the entity namespace is already handled by the PHP driver, I cannot set another driver to handle the extension mappings and I cannot set the extension properties through php mappings since ClassMetadata is not intended to handle extensions. So I suppose that there are only 2 ways to go left, change the whole application mapping type or create a new ClassMetadata that could handle the new properties (through new methods or properties) with a dedicated driver that extend doctrine's metadata system.
What I say may not be clear, unfortunately :/ Le jeudi 12 novembre 2015 19:45:40 UTC+1, Marco Pivetta a écrit : > > The Gedmo extensions use their own metadata system, completely unrelated > to doctrine's. > > Currently, you'd simply implement a mapping driver directly: rather than > using the PHP driver, you really just implement the driver interface. > > We will change how metadata is loaded in 3.x, allowing for (eventually) > custom mapping as well. > > Greets, > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ > > On 12 November 2015 at 12:26, dunaeth <[email protected] <javascript:>> > wrote: > >> Hi, >> >> Many doctrine extensions only focus on YAML, XML and Annotation drivers, >> like Gedmo extensions, and I was wondering if it was possible to easily do >> PHP drivers for those kind of extensions. For now, I think it would require >> to write some specific ClassMetadata derived class to be able to handle new >> properties. Is there another (and better) way to do this ? Are PHP Drivers >> not intended to be used for this ? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "doctrine-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/doctrine-user. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
