Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1197

Proxies should handle variable argument lists

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Can't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      This is a contingency issue for https://github.com/doctrine/doctrine2/pull/60

      "Fix to allow for proxy generated classes to respect methods in parent which may use func_get_args internally. Previously they would be passed nothing and thus fail. Also reduces need to build up argumentString. "

        Activity

        Benjamin Eberlei created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 12699 ] jira-feedback [ 13931 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13931 ] jira-feedback2 [ 15795 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15795 ] jira-feedback3 [ 18052 ]
        Hide
        Chris Richard added a comment - - edited

        Could we use an annotation to indicate when a function uses variable arguments and output call_user_func_array only in that case?

        Show
        Chris Richard added a comment - - edited Could we use an annotation to indicate when a function uses variable arguments and output call_user_func_array only in that case?
        Hide
        Marco Pivetta added a comment -

        I won't fix this. There are some problems here that are not trivial:

        1 - to make proxies always "safe", we would need to use func_get_args in every proxy call
        2 - because of (1), performance will GREATLY degrade
        3 - because of (1), byref parameter passing will be broken

        What we could do is introspecting the contents of methods to look for func_get_args usages (requires introduction of a complex parser).

        I am closing this - consider opening an issue at https://github.com/Ocramius/ProxyManager/issues instead, so we can analyze if this logic can be improved for 3.x with the replacement of the "simple" doctrine proxies with something more complete.

        Also note that https://github.com/Ocramius/ProxyManager/issues/159 could also solve this without the need for complex logic.

        Show
        Marco Pivetta added a comment - I won't fix this. There are some problems here that are not trivial: 1 - to make proxies always "safe", we would need to use func_get_args in every proxy call 2 - because of (1), performance will GREATLY degrade 3 - because of (1), byref parameter passing will be broken What we could do is introspecting the contents of methods to look for func_get_args usages (requires introduction of a complex parser). I am closing this - consider opening an issue at https://github.com/Ocramius/ProxyManager/issues instead, so we can analyze if this logic can be improved for 3.x with the replacement of the "simple" doctrine proxies with something more complete. Also note that https://github.com/Ocramius/ProxyManager/issues/159 could also solve this without the need for complex logic.
        Marco Pivetta made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Can't Fix [ 7 ]

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

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

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: