Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2140

[GH-512] Added addParameters() to Query and QueryBuilder

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3, Git Master
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Environment:
      OS X 10.8.2, PHP 5.3.18, Nginx 1.2.4 (php through FPM)

      Description

      This issue is created automatically through a Github pull request on behalf of jappie:

      Url: https://github.com/doctrine/doctrine2/pull/512

      Message:

      This method behaves like setParameters() before version 2.3:
      It will add new parameters to the collection, and override any existing positions/names.

      It can take a Doctrine\Common\Collections\ArrayCollection with Doctrine\ORM\Query\Parameter objects, as well as a plain array with key/value pairs, as argument.

      This will greatly ease the upgrade to Doctrine 2.3, because you only need to perform a project-wide replace of setParameters with addParameters, in stead of going into your code and determine if calls to setParameters are ok or need refactoring.

      I've also added unit-tests to maintain integrity.

        Activity

        Benjamin Eberlei created issue -
        Jasper N. Brouwer made changes -
        Field Original Value New Value
        Affects Version/s Git Master [ 10100 ]
        Environment OS X 10.8.2, PHP 5.3.18, Nginx 1.2.4 (php through FPM)
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Description This issue is created automatically through a Github pull request on behalf of jappie:

          Url: https://github.com/doctrine/doctrine2/pull/512

        Message:

        This method behaves like `setParameters()` before version 2.3:
        It will add new parameters to the collection, and override any existing positions/names.

        It can take a `Doctrine\Common\Collections\ArrayCollection` with `Doctrine\ORM\Query\Parameter` objects, as well as a plain `array` with key/value pairs, as argument.

        This will greatly ease the upgrade to Doctrine 2.3, because you only need to perform a project-wide replace of `setParameters` with `addParameters`, in stead of going into your code and determine if calls to `setParameters` are ok or need refactoring.

        I've also added unit-tests to maintain integrity.
        This issue is created automatically through a Github pull request on behalf of jappie:

          Url: https://github.com/doctrine/doctrine2/pull/512

        Message:

        This method behaves like {{setParameters()}} before version 2.3:
        It will add new parameters to the collection, and override any existing positions/names.

        It can take a {{Doctrine\Common\Collections\ArrayCollection}} with {{Doctrine\ORM\Query\Parameter}} objects, as well as a plain {{array}} with key/value pairs, as argument.

        This will greatly ease the upgrade to Doctrine 2.3, because you only need to perform a project-wide replace of {{setParameters}} with {{addParameters}}, in stead of going into your code and determine if calls to {{setParameters}} are ok or need refactoring.

        I've also added unit-tests to maintain integrity.
        Priority Major [ 3 ] Minor [ 4 ]
        Labels Query, QueryBuilder
        Component/s ORM [ 10012 ]
        Jasper N. Brouwer made changes -
        Affects Version/s 2.3 [ 10185 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: