<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed May 22 07:13:54 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=project+%3D+DCOM+AND+resolution+%3D+Unresolved+AND+assignee+%3D+ocramius+ORDER+BY+priority+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=project+%3D+DCOM+AND+resolution+%3D+Unresolved+AND+assignee+%3D+ocramius+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="3" total="3"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DCOM-175] Proxies return private properties in __sleep, which is not supported by PHP.</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-175</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;__sleep should not return private parent property names (see &lt;a href=&quot;http://php.net/__sleep&quot; class=&quot;external-link&quot;&gt;http://php.net/__sleep&lt;/a&gt;) this raises notices, and also results in the value of the property being &apos;N&apos; (null) instead of keeping its value.&lt;/p&gt;

&lt;p&gt;I am unfortunately stuck having to serialize proxies in my revision tracking, as doctrine seems to be currently ignoring the fetch=&quot;EAGER&quot; I set on the related properties.&lt;/p&gt;

&lt;p&gt;Proxies should use the Serializable interface, and not __sleep, or not return parent property names which are private, it serves no purpose, and is not supported by PHP itself anyway.&lt;/p&gt;

&lt;p&gt;Also, if you keep __sleep, but do not return the parent property names, then it will only include the items you return, so it would be better to simply drop the __sleep method, I cannot actually see any useful purpose it serves.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13562">DCOM-175</key>
            <summary>Proxies return private properties in __sleep, which is not supported by PHP.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="bittarman">Ryan Mauger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Mar 2012 13:25:56 +0000</created>
                <updated>Fri, 19 Apr 2013 12:06:43 +0000</updated>
                                    <version>2.4</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="17663" author="bittarman" created="Tue, 27 Mar 2012 13:32:12 +0000"  >&lt;p&gt;just updated the issue body, realised that I worded something badly.&lt;/p&gt;</comment>
                    <comment id="19386" author="ocramius" created="Wed, 23 Jan 2013 22:29:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=bittarman&quot; class=&quot;user-hover&quot; rel=&quot;bittarman&quot;&gt;Ryan Mauger&lt;/a&gt; I think that&apos;s a limitation we have. We use `__sleep` to avoid serializing fields like the initializers and the persisters of course.&lt;/p&gt;

&lt;p&gt;Even by implementing serializable, it would only work if the end user implemented it in the parent class.&lt;/p&gt;

&lt;p&gt;Tempted to mark it as &quot;can&apos;t fix&quot;&lt;/p&gt;</comment>
                    <comment id="19397" author="ocramius" created="Thu, 24 Jan 2013 08:59:23 +0000"  >&lt;p&gt;I think there&apos;s a solution by having something like following:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class SomeGeneratedProxyName &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; RealName &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; \Serializable
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function unserialize($data)
    {
        $reflectionClass = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ReflectionClass($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        foreach ($reflectionClass-&amp;gt;getProperties(ReflectionProperty::IS_PRIVATE) as $privateProp) {
            $privateProp-&amp;gt;setAccessible(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
            $privateProp-&amp;gt;setValue($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, $data[$privateProp-&amp;gt;getName()]);
        }
        &lt;span class=&quot;code-comment&quot;&gt;// ... other props ...
&lt;/span&gt;    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function serialize()
    {
        $data = array();
        $reflectionClass = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; ReflectionClass($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        foreach ($reflectionClass-&amp;gt;getProperties(ReflectionProperty::IS_PRIVATE) as $privateProp) {
            $privateProp-&amp;gt;setAccessible(&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
            $data[$privateProp-&amp;gt;getName()] = $privateProp-&amp;gt;getValue($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
        }
        &lt;span class=&quot;code-comment&quot;&gt;// ... other props ...
&lt;/span&gt;        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; $data;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="19676" author="ocramius" created="Sat, 23 Feb 2013 03:15:26 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=bittarman&quot; class=&quot;user-hover&quot; rel=&quot;bittarman&quot;&gt;Ryan Mauger&lt;/a&gt; I started implementing this one at &lt;a href=&quot;https://github.com/Ocramius/common/compare/hotfix;DCOM-175&quot; class=&quot;external-link&quot;&gt;https://github.com/Ocramius/common/compare/hotfix;DCOM-175&lt;/a&gt; and so far it looks promising. &lt;/p&gt;

&lt;p&gt;The only doubts so far are with handling cases like following:&lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
class MyEntity &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; Serializable
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function serialize()
    {
        &lt;span class=&quot;code-comment&quot;&gt;// [...]
&lt;/span&gt;    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function unserialize($serialized)
    {
        &lt;span class=&quot;code-comment&quot;&gt;// [...]
&lt;/span&gt;    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __sleep()
    {
        &lt;span class=&quot;code-comment&quot;&gt;// [...]
&lt;/span&gt;    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function __wakeup()
    {
        &lt;span class=&quot;code-comment&quot;&gt;// [...]
&lt;/span&gt;    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;So far I didn&apos;t get to write tests that demonstrate the exact behaviour for this case, but it looks like when `Serializable` is implemented, `_&lt;em&gt;sleep` and `&lt;/em&gt;_wakeup` are ignored. Any thoughts on this?&lt;/p&gt;</comment>
                    <comment id="20067" author="ocramius" created="Fri, 19 Apr 2013 12:06:43 +0000"  >&lt;p&gt;A possible solution is to use something like &lt;a href=&quot;http://eval.in/16806&quot; class=&quot;external-link&quot;&gt;http://eval.in/16806&lt;/a&gt;, and thus exploiting the ability of php to retrieve an object&apos;s private properties by using the special &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;chr(0) . &apos;Foo&apos; . chr(0) . &apos;bar&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;trick.&lt;/p&gt;

&lt;p&gt;This can be abstracted by using &lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;array_keys((array) $object);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;, which retrieves also those special keys&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-189] Doctrine Proxies may conflict with interfaced constructors</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-189</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;The Doctrine ProxyGenerator generates for a proxy a constructor. The documentation of Doctrine states that the constructor is never called. For a project, I created a group of entities with a interfaced constructor in order to enforce a common interface. This results in a incompatible proxy and so a fatal error.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14825">DCOM-189</key>
            <summary>Doctrine Proxies may conflict with interfaced constructors</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>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="harmenm">Harmen M</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 May 2013 09:05:15 +0000</created>
                <updated>Fri, 3 May 2013 13:05:24 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="20193" author="ocramius" created="Fri, 3 May 2013 09:08:16 +0000"  >&lt;p&gt;Cannot fix this - the constructor is required to override instantiation logic&lt;/p&gt;</comment>
                    <comment id="20194" author="harmenm" created="Fri, 3 May 2013 09:10:51 +0000"  >&lt;p&gt;Edit: added the correct description. I accidentially submitted the form before editing the description.&lt;/p&gt;</comment>
                    <comment id="20195" author="ocramius" created="Fri, 3 May 2013 09:13:13 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=harmenm&quot; class=&quot;user-hover&quot; rel=&quot;harmenm&quot;&gt;Harmen M&lt;/a&gt; why do you have a constructor in an interface? That&apos;s a very bad practice, and it makes things quite hard to handle.&lt;/p&gt;

&lt;p&gt;I can think of a workaround, but I first want to be sure there&apos;s a real advantage in changing the current implementation to use &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;unserialize()&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; just to handle this specific use case.&lt;/p&gt;</comment>
                    <comment id="20196" author="beberlei" created="Fri, 3 May 2013 09:31:11 +0000"  >&lt;p&gt;Adding __construct to an interface is an anti pattern and shouldn&apos;t be done.&lt;/p&gt;</comment>
                    <comment id="20197" author="harmenm" created="Fri, 3 May 2013 10:20:29 +0000"  >&lt;p&gt;Ok, then I change my implementation.&lt;/p&gt;

&lt;p&gt;But, maybe it is an idea to update the documentation of the ORM and state that constructor interfacing is not possible?&lt;br/&gt;
&lt;a href=&quot;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/architecture.html&quot; class=&quot;external-link&quot;&gt;http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/architecture.html&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-165] Entities seems not be recognized by AnnotationDriver</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-165</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;Problem:&lt;br/&gt;
--------&lt;br/&gt;
&quot;$em-&amp;gt;getMetadataFactory()-&amp;gt;getAllMetadata()&quot;&lt;br/&gt;
Will result in an empty array. The entitiy manager is correctly configured and the entities files are loaded (echo&apos;s in the files will be displayed).&lt;/p&gt;


&lt;p&gt;Debug steps:&lt;br/&gt;
------------&lt;br/&gt;
Looking in the code for the problem I created the following debug points first:&lt;/p&gt;

&lt;p&gt;file AnnotationDriver.php method getAllClassNames()&lt;br/&gt;
after the line: &quot;$includedFiles[] = $sourceFile;&quot;&lt;br/&gt;
add: &quot;echo $sourceFile . &apos; is loaded&apos; . PHP_EOL;&quot;&lt;/p&gt;

&lt;p&gt;file AnnotationDriver.php method getAllClassNames()&lt;br/&gt;
after the line: &quot;$sourceFile = $rc-&amp;gt;getFileName();&quot;&lt;br/&gt;
add: &quot;echo $className . &apos; is loaded from: &apos; . $sourceFile . &apos; in the includedFiles array? &apos; . (in_array($sourceFile, $includedFiles) ? &apos;YES&apos; : &apos;not found &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&apos;) . PHP_EOL;&quot;&lt;/p&gt;


&lt;p&gt;the following output will be displayed:&lt;br/&gt;
...&lt;br/&gt;
f:\workspace\nl.markei.posto-2.3\lib\relaties\Contact.php is loaded&lt;br/&gt;
...&lt;br/&gt;
nl\markei\posto\relaties\Contact is loaded from: F:\workspace\nl.markei.posto-2.3\lib\relaties\Contact.php in the includedFiles array? not found &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;It seems that Doctrine includes the file from f: but ReflectionClass say it is loaded from F:. The in_array() will fail and Doctrine will not recognized the entity.&lt;/p&gt;

&lt;p&gt;But this is not the full problem. I created a new debug point:&lt;/p&gt;

&lt;p&gt;file AnnotationDriver.php method getAllClassNames()&lt;br/&gt;
after the line: &quot;foreach ($this-&amp;gt;_paths as $path) {&quot;&lt;br/&gt;
add: &quot;echo &apos;path: &apos; . $path . &apos; after realpath: &apos; . realpath($path) . PHP_EOL;&quot;&lt;/p&gt;

&lt;p&gt;This will result in the following output:&lt;br/&gt;
&quot;path: F:\domains\markei.nl\lib\nl.markei.posto\ after realpath: f:\workspace\nl.markei.posto-2.3\lib&quot;&lt;/p&gt;

&lt;p&gt;So the conversion of the F: to f: is done by realpath; its look like &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;A simple fix should be in AnnotationDriver.php / getAllClassNames()&lt;br/&gt;
replace: &quot;$sourceFile = $rc-&amp;gt;getFileName();&quot;&lt;br/&gt;
by: &quot;$sourceFile = realpath($rc-&amp;gt;getFileName());&quot;&lt;/p&gt;

&lt;p&gt;After I did that, the problem still exists. So I add to echo&apos;s (one with realpath and one without at the part of the code). And both echo&apos;s result in a path starting with &quot;F:&quot;.&lt;/p&gt;

&lt;p&gt;So my first reaction was freaky!&lt;/p&gt;

&lt;p&gt;After some frustrating hours I found the problem in the symlink I used.&lt;br/&gt;
&quot;F:\domains\markei.nl\lib\nl.markei.posto&quot; was a symlink to &quot;f:\workspace\nl.markei.posto-2.3\lib&quot; and realpath will not convert the driver char in the target of the symlink for some freaky reason. After changing the symlink target to &quot;F:\workspace....&quot; everything works fine.&lt;/p&gt;


&lt;p&gt;Summary:&lt;br/&gt;
--------&lt;br/&gt;
realpath results are not consistent on Windows. This will resulting in problems under Windows.&lt;/p&gt;


&lt;p&gt;Possible solutions:&lt;br/&gt;
-------------------&lt;br/&gt;
Saying &quot;this is a PHP bug&quot;.&lt;br/&gt;
It is possible that there are more case sensitive problems hidding here on Windows. Maybe it is better to use (for Windows only!) a case insensitive in_array-alternative in AnnotationDriver.php getAllClassNames() (or convert all paths for to lowercase for Windows)&lt;/p&gt;</description>
                <environment>Windows 7 Profesional, Enterprise and Windows Server 2003 and 2008; Common: 2.2.3 DBAL: 2.2.2 ORM: 2.2.3; PHP 5.4.5 and 5.3.5</environment>
            <key id="14007">DCOM-165</key>
            <summary>Entities seems not be recognized by AnnotationDriver</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="maartendekeizer">Maarten de Keizer</reporter>
                        <labels>
                        <label>annotationdriver</label>
                        <label>realpath</label>
                        <label>symlink</label>
                        <label>windows</label>
                    </labels>
                <created>Sun, 2 Sep 2012 20:07:14 +0000</created>
                <updated>Wed, 23 Jan 2013 23:07:12 +0000</updated>
                                    <version>2.2</version>
                <version>2.3</version>
                                                <component>Annotations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19394" author="ocramius" created="Wed, 23 Jan 2013 23:06:56 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=maartendekeizer&quot; class=&quot;user-hover&quot; rel=&quot;maartendekeizer&quot;&gt;Maarten de Keizer&lt;/a&gt; looks like the issue is still there in doctrine/annotations. Are you able to come up with a failing test case?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>