<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 15:37:11 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+fixVersion+%3D+%222.1%22&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+fixVersion+%3D+%222.1%22</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="6" total="6"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DCOM-56] Remote autoloading from annotations completly, replacing it with its own loading mechanism</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-56</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;This is a mail from me to the symfony-dev mailing-list:&lt;/p&gt;

&lt;p&gt;I am sorry it is very late to bring this up again, but given the nasty problems I faced today with the way annotationreader works with autoload = true I have to share them (and blow of some steam). While i guess its to late to change this again before 2.0, we might still have to discuss to go away from autoload = true for 2.1. Now for the reasons:&lt;/p&gt;

&lt;p&gt;AnnotationReader with autoload = true (which Symfony2 uses) will not only require a silent autoloader, it requires ALL autoloaders used to be silent. While this is the case for the Symfony Universal loader its not the case for the Doctrine one, and not for many others - and its not even a PSR-0 requirement. For a simple reason: Supporting silent failure means using file_exists, means a file stat, which means apc.stat = 0 is useless. While I don&apos;t care so much about it in Doctrine context, because the AnnotationReader default is NOT to autoload annotations this will cause problems for Symfony: Not every library in any Symfony2 app will be included through a silent autoloader. That means given the context users might run into problems using annotations that they have absolutely no way of fixing. And since the AnnotationReader does not know this upfront, potential failures become very real issue.&lt;/p&gt;

&lt;p&gt;Example: I use SecurityExtraBundle and happen to have my SuperDuperLibrary XYZ. That library was developed by my company and contains tons of important business logic but unfortunately uses a non-silent autoloader (for whatever reasons). However i use Symfony to secure access to it by generating secure proxies. Now what happens if an annotation reader runs over that library? Because the current namespace is always considered, for every @var _&lt;em&gt;NAMESPACE&lt;/em&gt;.&quot;&lt;br class=&quot;atl-forced-newline&quot; /&gt;var&quot; is class_exists&apos;ed and then your code fatal errors. I didn&apos;t see this problem before, because i don&apos;t use annotations myself so much and always in the BC Doctrine 2.0.x way and that slipped my mind. Same goes for Validation with Annotations on external code, or maybe in the future services definitions through annotations.&lt;/p&gt;

&lt;p&gt;All this trouble we are getting into with autoloading annotations is just because we wanted to validate that the annotations used actually exist. But since we changed to a use/import approach rather then re-using namespaces we don&apos;t even have the clashing problem anymore that got us into the trouble with class_exists before. The autoloading however also got us and users into other problems:&lt;/p&gt;

&lt;p&gt;1. We have to maintain a rather large map of &quot;blacklisted&quot; annotations that never throw failure exceptions because they are actually used as doc documentations. As with blacklists this is never a complete list. &lt;br/&gt;
2. Users with intensive doc-block usage are punished by Symfony having to maintain their own blacklist of annotations that never throw exceptions so that their code actually works.&lt;br/&gt;
3. Libraries have to handle the case that a reader is either using autoloading or not through special code.&lt;/p&gt;

&lt;p&gt;While I do think it would have been nice to offer validation for annotation this is a task that should be put on IDEs and developers, since it turns out that its not possible flawlessly within the library itself. The AnnotationReader should always use class_exists($name, false). Docblocks are still comments and the code shouldn&apos;t fail because classes are not available that are not even relevant in the context of the current AnnotationReader. Each part of the code that uses an AnnotationReader should require_once the annotations that it can potentially need upfront. That even works for Validation as you can grab the tags from the DIC. That way we have a single mode of operation for the AnnotationReader and not two different ones that are 180 degrees different. OF course one could argue ALWAYS to use class_exists($name, true) instead, but i hope my mail showed why this is not a good idea.&lt;/p&gt;

&lt;p&gt;If for some reason we do want autoloading for annotations then it should be a mechanism different from the PHP one, because they are both not compatible. The reader could have hooks for autoloading and validation mechanisms. Nothing we want to add for Doctrine Common 2.1, but something we could easily play around with for Common 3.&lt;/p&gt;

&lt;p&gt;Next a mail with implementation details:&lt;/p&gt;

&lt;p&gt; I propose to change the following on AnnotationReader:&lt;/p&gt;

&lt;p&gt; 1. Add a method to register annotation classes: &lt;br/&gt;
 $reader-&amp;gt;registerAnnotation(&quot;Symfony\Bridge\Doctrine\Validator\UniqueEntity&quot;); &lt;br/&gt;
 and $reader-&amp;gt;registerAnnotations(array(..));&lt;br/&gt;
 2. Add a method to register files that contain annotations: &lt;br/&gt;
 $reader-&amp;gt;registerAnnotationFile(&quot;..&quot;), directly loading them via &lt;br/&gt;
 require_once;&lt;br/&gt;
 3. Add a method to register annotation namespaces: &lt;br/&gt;
 $reader-&amp;gt;registerAnnotationNamespace(&quot;Symfony\Component\Validator\Constraint&quot;, &lt;br/&gt;
 $dir). This is used to create a silently failing PSR-0 &quot;autoloader&quot; for &lt;br/&gt;
 this path + directories. It can be automatically populated from data in &lt;br/&gt;
 the UniversalClassLoader.&lt;br/&gt;
 4. Change the class_exists check to never use autoload = true. If a &lt;br/&gt;
 class is part of a registered annotation namespace try load the file based on a silent &lt;br/&gt;
 PSR-0 autoload for it using an autoloader impl. contained in the &lt;br/&gt;
 AnnotationReader (not the php autoloading mechanism), before triggering &lt;br/&gt;
 the class_exists($name, false)&lt;/p&gt;

&lt;p&gt; This way for symfony only the UniversalClassLoader data has to be used &lt;br/&gt;
 to populate the registered annotation namespaces.&lt;/p&gt;
</description>
                <environment></environment>
            <key id="12781">DCOM-56</key>
            <summary>Remote autoloading from annotations completly, replacing it with its own loading mechanism</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Jul 2011 18:23:43 +0000</created>
                <updated>Sat, 2 Jul 2011 19:15:15 +0000</updated>
                    <resolved>Sat, 2 Jul 2011 19:15:15 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1</fixVersion>
                                <component>Annotations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16106" author="beberlei" created="Sat, 2 Jul 2011 19:15:15 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-55] Ugly problems with default import __NAMESPACE__ when it contains non-annotation classes that are docblock props</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-55</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;Say you have a class &quot;Entity&quot;.&lt;/p&gt;

&lt;p&gt;Then /** @Entity */ on a class in the same namespace will try to instantiate Entity.&lt;/p&gt;

&lt;p&gt;We should avoid this by testing if Entity is a subclass of  \Doctrine\Common\Annotations\Annotation&lt;/p&gt;</description>
                <environment></environment>
            <key id="12764">DCOM-55</key>
            <summary>Ugly problems with default import __NAMESPACE__ when it contains non-annotation classes that are docblock props</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="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Jun 2011 21:10:34 +0000</created>
                <updated>Wed, 29 Jun 2011 22:01:14 +0000</updated>
                    <resolved>Wed, 29 Jun 2011 22:01:14 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16098" author="beberlei" created="Wed, 29 Jun 2011 21:55:31 +0000"  >&lt;p&gt;Actually this problem is more problematic, we have to enforce extending \Doctrine\Common\Annotations\Annotation for ALL annotations.&lt;/p&gt;</comment>
                    <comment id="16099" author="beberlei" created="Wed, 29 Jun 2011 22:01:14 +0000"  >&lt;p&gt;Fixed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-51] Support parsing of single quotes</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-51</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;It&apos;d be great to support single quotes, this limitation doesn&apos;t make sense from a user point of view and in php context single quotes are so commonly used that it&apos;s easy to slip and then get some funny Exception message out of it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12611">DCOM-51</key>
            <summary>Support parsing of single quotes</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="seldaek">Jordi Boggiano</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 May 2011 10:55:20 +0000</created>
                <updated>Thu, 5 May 2011 04:26:13 +0000</updated>
                    <resolved>Thu, 5 May 2011 04:26:13 +0000</resolved>
                            <version>2.0.2</version>
                                <fixVersion>2.1</fixVersion>
                                <component>Annotations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15802" author="seldaek" created="Tue, 3 May 2011 10:56:19 +0000"  >&lt;p&gt;Patch against master is at &lt;a href=&quot;https://github.com/doctrine/common/pull/17&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/pull/17&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="15806" author="guilhermeblanco" created="Thu, 5 May 2011 04:26:13 +0000"  >&lt;p&gt;Merged the pull request.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-46] Make annotation index configurable</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-46</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;So, this is another improvement that I&apos;d like to make. Right now all annotations are indexed by their name which has the limitation that on the top level annotations with the same name are only gathered once.&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;/**
 * @param mixed $a
 * @param mixed $a
 * @param mixed $a
 */
function ($a, $b, $c) { }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the above case the annotation parser would only pick up one &quot;param&quot; annotation. My guess is that this was done for fast lookups, but I think we need to make this configurable (I know you hate this word &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;) as the workaround here is needlessly bloated.&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;/**
 * @params({@param, @param, @param})
 */
function($a, $b, $c) {}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This only requires two lines to be changed/made conditional, see&lt;br/&gt;
&lt;a href=&quot;https://github.com/schmittjoh/SecurityExtraBundle/blob/master/Mapping/Driver/AnnotationParser.php#L63&quot; class=&quot;external-link&quot;&gt;https://github.com/schmittjoh/SecurityExtraBundle/blob/master/Mapping/Driver/AnnotationParser.php#L63&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/schmittjoh/SecurityExtraBundle/blob/master/Mapping/Driver/AnnotationParser.php#L72&quot; class=&quot;external-link&quot;&gt;https://github.com/schmittjoh/SecurityExtraBundle/blob/master/Mapping/Driver/AnnotationParser.php#L72&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;p.s. If you want me to provide a patch for this, just tell me.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12542">DCOM-46</key>
            <summary>Make annotation index configurable</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Apr 2011 04:16:51 +0000</created>
                <updated>Fri, 13 May 2011 04:26:13 +0000</updated>
                    <resolved>Fri, 13 May 2011 04:26:13 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1</fixVersion>
                                <component>Annotations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15836" author="guilhermeblanco" created="Fri, 13 May 2011 04:26:13 +0000"  >&lt;p&gt;Implemented on master.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/common/commit/59910f53fad7ce08a1ec840d9874a74cefcf32b8&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/commit/59910f53fad7ce08a1ec840d9874a74cefcf32b8&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-45] Allow different namespaces for the same alias</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-45</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;Right now, it is only possible to register one namespace per annotation alias. This might lead to problems since we now throw exceptions if an annotation is not found in that namespace (&lt;a href=&quot;https://github.com/doctrine/common/commit/8967f476ddcdb7b9017a8be7f774979ca4c72247&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/common/commit/8967f476ddcdb7b9017a8be7f774979ca4c72247&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;This improvement would be a necessary first step in order to overcome the problem we talked about on IRC (FrameworkExtra/SecurityExtra both using the &quot;extra&quot; alias).&lt;/p&gt;</description>
                <environment></environment>
            <key id="12541">DCOM-45</key>
            <summary>Allow different namespaces for the same alias</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="johannes">Johannes Schmitt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Apr 2011 04:06:33 +0000</created>
                <updated>Tue, 26 Apr 2011 12:42:18 +0000</updated>
                    <resolved>Tue, 26 Apr 2011 12:42:18 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.1</fixVersion>
                                <component>Annotations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15746" author="johannes" created="Tue, 26 Apr 2011 12:42:18 +0000"  >&lt;p&gt;I&apos;ll close this as there is a better solution now.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DCOM-44] Throw exception if known namespaced annotation is not found</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-44</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;If we know that an annotation is namespaced and that the namespace exists we should throw an exception if the annotation specified does not exist, currently its just skipped which can be very nasty to debug.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12538">DCOM-44</key>
            <summary>Throw exception if known namespaced annotation is not found</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Apr 2011 14:44:15 +0000</created>
                <updated>Wed, 6 Apr 2011 10:15:54 +0000</updated>
                    <resolved>Tue, 5 Apr 2011 14:50:36 +0000</resolved>
                                            <fixVersion>2.1</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15689" author="beberlei" created="Tue, 5 Apr 2011 14:50:36 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                    <comment id="15693" author="gediminasm" created="Wed, 6 Apr 2011 09:47:20 +0000"  >&lt;p&gt;For example my extensions are using same alias&lt;span class=&quot;error&quot;&gt;&amp;#91;vendor name&amp;#93;&lt;/span&gt; for all annotations. In this case each extension can be used independetly from others. And after this &quot;fix&quot; it couples all extensions and forces to autoload all annotations because in other case it will simply throw a fatal error, since class_exists now uses require without even checking if file exists. &lt;br/&gt;
Instead of fatal error ClassLoader maybe could throw an exception.&lt;/p&gt;</comment>
                    <comment id="15694" author="beberlei" created="Wed, 6 Apr 2011 10:15:54 +0000"  >&lt;p&gt;This change should not fatal through class_exists(). I dont change the autoloading behavior at all, i just throw an exception if the class was not found and annotation is namesapced&lt;/p&gt;

&lt;p&gt;Johannes complained about this for the same reason (reusing vendor prefixes).&lt;/p&gt;

&lt;p&gt;I find this quite annoying, because i constantly misstype annotations and get no error messages at all, the number of bug reports in this regard is also quite high. We have to find a solution for this&lt;/p&gt;
</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>