Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1698

Inconsistent proxy file name & namespace result in __PHP_Incomplete_Class when unserializing entities

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2, 2.2.1, 2.3, 2.4
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:

      Description

      Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
      For example, a class named Application\Model\User creates the following proxy class:

      Application\Proxy\__CG__\Application\Model\User
      

      This class is located in the following file:

      Application/Proxy/__CG__ApplicationModelUser.php
      

      But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:

      Application/Proxy/__CG__/Application/Model/User.php
      

      But it is not.
      As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

      I'm not sure whether this is an intended behavior, but I would assume this is a bug.

        Activity

        Benjamin Morel created issue -
        Benjamin Morel made changes -
        Field Original Value New Value
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:
        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the autoloader assumes the class to be located in:
        {code}
        Application\Proxy\__CG__\Application\Model\User.php
        {code}
        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the autoloader expects the class to be located in:
        {code}
        Application\Proxy\__CG__\Application\Model\User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Affects Version/s 2.2 [ 10157 ]
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the autoloader expects the class to be located in:
        {code}
        Application\Proxy\__CG__\Application\Model\User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}

        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}

        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:


        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:


        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {code}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {code}
        But the proxy class created is:
        {code}
        Application\Proxy\__CG__\Application\Model\User
        {code}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {code}
        Application/Proxy/__CG__/Application/Model/User.php
        {code}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {noformat}
        But the proxy class created is:
        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php file.
        {noformat}
        But the proxy class created is:
        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php
        {noformat}
        But the proxy class created is:
        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User gets a proxy file named:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php
        {noformat}
        But the proxy class created is:
        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}
        When we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:
        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User creates the following proxy class:

        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}

        This class is located in the following file:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php
        {noformat}

        But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:

        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Morel made changes -
        Description Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named Application\Model\User creates the following proxy class:

        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}

        This class is located in the following file:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php
        {noformat}

        But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:

        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.
        For example, a class named *Application\Model\User* creates the following proxy class:

        {noformat}
        Application\Proxy\__CG__\Application\Model\User
        {noformat}

        This class is located in the following file:

        {noformat}
        Application/Proxy/__CG__ApplicationModelUser.php
        {noformat}

        But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:

        {noformat}
        Application/Proxy/__CG__/Application/Model/User.php
        {noformat}

        But it is not.
        As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.

        I'm not sure whether this is an intended behavior, but I would assume this is a bug.
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.2 [ 10195 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13521 ] jira-feedback [ 15271 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15271 ] jira-feedback2 [ 17135 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17135 ] jira-feedback3 [ 19388 ]
        Benjamin Morel made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Benjamin Eberlei made changes -
        Issue Type Bug [ 1 ] Documentation [ 6 ]
        Marco Pivetta made changes -
        Fix Version/s 2.2.2 [ 10195 ]
        Marco Pivetta made changes -
        Affects Version/s 2.4 [ 10321 ]
        Affects Version/s 2.3 [ 10185 ]
        Marco Pivetta made changes -
        Issue Type Documentation [ 6 ] Improvement [ 4 ]
        Marco Pivetta made changes -
        Labels proxy
        Marco Pivetta made changes -
        Environment Irrelevant
        Marco Pivetta made changes -
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Benjamin Morel
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: