Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-2170

Decorator base classes for query related objects


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


      Doctrine\ORM\Query should not be directly extendable but it would be nice to decorate query objects and add additional methods. Use cases are e.g. doctrine-fun (see https://github.com/lstrojny/doctrine-fun/blob/master/src/Doctrine/Fun/Query.php) or even cases where users want to add domain specific methods. As Doctrine\ORM\Query is final it is not so easy to decorate correctly. I would propose:

      • Add a new interfaces: Doctrine\ORM\QueryInterface that provides a contract for all methods Doctrine\ORM\Query provides
      • Add a decorator base class Doctrine\ORM\QueryDecorator as an extension point
      • Some for NativeQuery and QueryBuilder


        lstrojny Lars Strojny created issue -
        gcds Aurimas Niekis made changes -
        Field Original Value New Value
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        ocramius Marco Pivetta made changes -
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        ocramius Marco Pivetta made changes -
        Status Awaiting Feedback [ 10000 ] Open [ 1 ]


          • Assignee:
            ocramius Marco Pivetta
            lstrojny Lars Strojny
          • Votes:
            0 Vote for this issue
            3 Start watching this issue


            • Created: