<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue May 21 07:13:56 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=fixVersion+%3D+%222.2.2%22+AND+project+%3D+DDC+AND+resolution+%3D+Unresolved+ORDER+BY+updated+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=fixVersion+%3D+%222.2.2%22+AND+project+%3D+DDC+AND+resolution+%3D+Unresolved+ORDER+BY+updated+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="1" total="1"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DDC-1698] Inconsistent proxy file name &amp; namespace result in __PHP_Incomplete_Class when unserializing entities</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1698</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Starting with Doctrine 2.2, the Proxy classes have inconsistent naming with their file name, which raises problems with class autoloading.&lt;br/&gt;
For example, a class named &lt;b&gt;Application\Model\User&lt;/b&gt; creates the following proxy class:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application\Proxy\__CG__\Application\Model\User
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This class is located in the following file:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application/Proxy/__CG__ApplicationModelUser.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But whe we serialize such an entity, then unserialize it in another session, the framework autoloader expects the class to be located in:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application/Proxy/__CG__/Application/Model/User.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it is not.&lt;br/&gt;
As a result, a __PHP_Incomplete_Class is created instead of the expected proxy class.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure whether this is an intended behavior, but I would assume this is a bug.&lt;/p&gt;</description>
                <environment>Irrelevant</environment>
            <key id="13521">DDC-1698</key>
            <summary>Inconsistent proxy file name &amp; namespace result in __PHP_Incomplete_Class when unserializing entities</summary>
                <type id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/documentation.png">Documentation</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="benjamin">Benjamin Morel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Mar 2012 00:11:42 +0000</created>
                <updated>Sun, 6 Jan 2013 13:18:41 +0000</updated>
                                    <version>2.2</version>
                <version>2.2.1</version>
                                <fixVersion>2.2.2</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="17561" author="benjamin" created="Tue, 13 Mar 2012 16:46:38 +0000"  >&lt;p&gt;It looks like there is an even broader problem with the new _&lt;em&gt;CG&lt;/em&gt;_ prefix; the PSR-0 standard for autoloading states that the underscores should be handled this way:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;\namespace\package\Class_Name =&amp;gt; {...}/namespace/package/Class/Name.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which means that in the above example, it could even expect the file to be located in:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Application/Proxy///CG///Application/Model/User.php
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;... which is far away from the actual location.&lt;br/&gt;
Upgrade to 2.2 broke this code, for us.&lt;/p&gt;</comment>
                    <comment id="17565" author="beberlei" created="Wed, 14 Mar 2012 18:30:24 +0000"  >&lt;p&gt;Proxy classes do not follow PSR-0. For the case unserializing objects we should provide an extra autoloader i guess.&lt;/p&gt;

&lt;p&gt;See here how symfony does it &lt;a href=&quot;https://github.com/doctrine/DoctrineBundle/blob/master/DoctrineBundle.php#L57&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/DoctrineBundle/blob/master/DoctrineBundle.php#L57&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17566" author="beberlei" created="Wed, 14 Mar 2012 19:12:07 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/9b4d60897dfc7e9b165712428539e694ec596c80&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/9b4d60897dfc7e9b165712428539e694ec596c80&lt;/a&gt; and &lt;a href=&quot;https://github.com/doctrine/orm-documentation/commit/01381fae1ff3d4944086c7cfe46721925bf6ca15&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/orm-documentation/commit/01381fae1ff3d4944086c7cfe46721925bf6ca15&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="17589" author="benjamin" created="Wed, 14 Mar 2012 22:36:59 +0000"  >&lt;p&gt;Thanks for the quick fix, Benjamin.&lt;br/&gt;
However, I have to admit that I&apos;m not fully happy with the fix, as we (and probably many others) are not using the Doctrine autoloader.&lt;br/&gt;
I supposed that the purpose of PSR-0 was precisely not to be tied to a particular autoloader implementation, and this benefit is lost with this version of Doctrine.&lt;/p&gt;

&lt;p&gt;You mentioned in the doc that the proxies are not PSR-0 compliant &quot;for implementation reasons&quot;; as this was working fine before 2.2, could you please explain what requirement prevents Doctrine from keeping the previous naming convention?&lt;/p&gt;</comment>
                    <comment id="17671" author="beberlei" created="Thu, 29 Mar 2012 09:56:11 +0000"  >&lt;p&gt;In 2.1 the proxies are not PSR-0 compatible themselves, however their class naming is simpler.&lt;/p&gt;

&lt;p&gt;In 2.2 we changed proxy names so that you can derive the original name of the proxy by searching for the _&lt;em&gt;CG&lt;/em&gt;_ flag. This flag obviously contains the __ chars that some PSR autoloaders detect as directory seperators. I agree this is an unfortunate decision, but it was done this way.&lt;/p&gt;

&lt;p&gt;I do think however that we can automatically register the proxy atuoloader (if not yet done)  in EntityManager#create(). This would hide this fact from developers automatically.&lt;/p&gt;</comment>
                    <comment id="18898" author="benjamin" created="Mon, 29 Oct 2012 21:37:00 +0000"  >&lt;p&gt;@Benjamin Eberlei&lt;br/&gt;
In 2.3 we still have to manually call Autoloader::register() before unserializing entities that may contain proxies.&lt;br/&gt;
So EntityManager::create() still doesn&apos;t register it. Is there a plan to add this feature?&lt;/p&gt;</comment>
                    <comment id="19231" author="beberlei" created="Sun, 6 Jan 2013 10:10:22 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=benjamin&quot; class=&quot;user-hover&quot; rel=&quot;benjamin&quot;&gt;Benjamin Morel&lt;/a&gt; Not at the moment, seems too dangerous for me since it might produce race conditions. This should really be done in the bootstrap of the system.&lt;/p&gt;

&lt;p&gt;We need to document this though.&lt;/p&gt;</comment>
                    <comment id="19234" author="benjamin" created="Sun, 6 Jan 2013 13:18:41 +0000"  >&lt;p&gt;Ok, thanks for your answer!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>