Doctrine Common
  1. Doctrine Common
  2. DCOM-194

Creating Proxy class failure for own __get method

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
    • Environment:
      using Nette framework ( http://nette.org ), PHP 5.4

      Description

      Nette framework (http://nette.org) has got own Nette\Object as a base of other objects. It also rewrite the default __get method in PHP object but it uses definition with pointer:

      public function &__get($name)
      

      Doctrine Common creates Proxy classes with __get method too but not with reference. It causes an error using strict warning:

      Declaration of Proxy\__CG__\MyEntityObject::__get() should be compatible with & Nette\Object::__get($name)
      

      The problem is in ProxyGenerator. Locally I've patched it in my Doctrine repository clone but don't know how to resolve it globally.

        Activity

        Jan Pecek created issue -
        Marco Pivetta made changes -
        Field Original Value New Value
        Labels nette proxy proxy
        Marco Pivetta made changes -
        Component/s Caching [ 10054 ]
        Marco Pivetta made changes -
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Marco Pivetta made changes -
        Description Nette framework (http://nette.org) has got own Nette\Object as a base of other objects. It also rewrite the default __get method in PHP object but it uses definition with pointer:

        public function &__get($name)

        Doctrine Common creates Proxy classes with __get method too but not with reference. It causes an error using strict warning:

        Declaration of Proxy\__CG__\MyEntityObject::__get() should be compatible with & Nette\Object::__get($name)

        The problem is in ProxyGenerator. Locally I've patched it in my Doctrine repository clone but don't know how to resolve it globally.
        Nette framework (http://nette.org) has got own Nette\Object as a base of other objects. It also rewrite the default __get method in PHP object but it uses definition with pointer:

        {code}
        public function &__get($name)
        {code}

        Doctrine Common creates Proxy classes with __get method too but not with reference. It causes an error using strict warning:

        {code}
        Declaration of Proxy\__CG__\MyEntityObject::__get() should be compatible with & Nette\Object::__get($name)
        {code}

        The problem is in ProxyGenerator. Locally I've patched it in my Doctrine repository clone but don't know how to resolve it globally.
        Marco Pivetta made changes -
        Priority Minor [ 4 ] Critical [ 2 ]
        Marco Pivetta made changes -
        Environment using Nette framework (http://nette.org), PHP 5.4 using Nette framework ( http://nette.org ), PHP 5.4
        Marco Pivetta made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Fix Version/s 2.4 [ 10327 ]

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Jan Pecek
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: