Doctrine Common
  1. Doctrine Common
  2. DCOM-73

CodeGeneration using Doctrine\Common\Persistence\Mapping\ObjectMetadata


    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      Currently we have tons of code in the ODM/ORMs regarding code generation that are ugly to extend and maintain. We should extract all them into a new component, for example named: doctrine-code-generator

      • It should be feed by only instances of Doctrine\Common\Persistence\Mapping\ObjectMetadata into a twig template.
      • A base template for an entity/document is shipped
      • Maybe ORM/ODM specific child templates or twig traits are necessary to handle writing annotations. This could also be done by adding hooks into the code-generation somehow.
      • Each entity of the user can provide its own template, for examples from a configurable directory "code_templates/Vendor.ProjectBundle.Entity.User.twig" to extend the base template and add own code.
      • As a perspective we should aim for 5.4 generating a trait so that you can have your entity "class User { use UserBase; }



        Benjamin Eberlei created issue -
        Guilherme Blanco made changes -
        Field Original Value New Value
        Fix Version/s 2.3 [ 10183 ]
        Fix Version/s 2.2 [ 10152 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13121 ] jira-feedback2 [ 17857 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17857 ] jira-feedback3 [ 19820 ]
        Marco Pivetta made changes -
        Fix Version/s 2.3 [ 10183 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to failed: Error in remote call to 'FishEye 0 (' ( [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DCOM-73, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            Jonathan H. Wage
            Benjamin Eberlei
          • Votes:
            1 Vote for this issue
            2 Start watching this issue


            • Created: