<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 01:43:24 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/si/jira.issueviews:issue-xml/DDC-359/DDC-359.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DDC-359] Specified, but empty CLI Options --option= causes Notice undefined offset: 0 [Test case for CliController included]</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-359</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Specified, but empty CLI Options --option= cause a Notice (undefined offset: 0)&lt;/p&gt;

&lt;p&gt;This problem also exists in trunk.&lt;/p&gt;

&lt;p&gt;What I ran:&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;naderman@Chaumont:~/projects/doctrine/Doctrine-trunk/tools/sandbox$ ./doctrine Orm:generate-proxies --class-dir=
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Expected output:&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;Doctrine Command Line Interface

No classes to process.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Actual output:&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;PHP Notice:  Undefined offset: 0 in /home/naderman/projects/doctrine/Doctrine-trunk/lib/Doctrine/Common/Cli/CliController.php on line 230
PHP Stack trace:
PHP   1. {main}() /home/naderman/projects/doctrine/Doctrine-trunk/tools/sandbox/doctrine:0
PHP   2. include() /home/naderman/projects/doctrine/Doctrine-trunk/tools/sandbox/doctrine:4
PHP   3. Doctrine\Common\Cli\CliController-&amp;gt;run() /home/naderman/projects/doctrine/Doctrine-trunk/tools/sandbox/doctrine.php:12
PHP   4. Doctrine\Common\Cli\CliController-&amp;gt;_processArguments() /home/naderman/projects/doctrine/Doctrine-trunk/lib/Doctrine/Common/Cli/CliController.php:127
Doctrine Command Line Interface

Orm:generate-proxies =&amp;gt; The supplied configuration uses the annotation metadata driver. The &apos;class-dir&apos; argument is required &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; driver.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I decided to write a patch and a test case for the issue but it turns out there aren&apos;t any tests for CliController, so I added some. You can find the result attached. Not sure if you can still call this &quot;unit&quot; test but it looks to me like the best you can currently do and should work quite well.&lt;/p&gt;

&lt;p&gt;I also came across another problem in CliController where it incorrectly refers to AbstractPrinter, rather than Printers\AbstractPrinter which is now included in the patch for the original bug.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure what your guideline on @author tags is, I added them to the test case and the TaskMock class now, but feel free to remove them if you like. Some of Doctrine&apos;s files seem to have them and some not.&lt;/p&gt;</description>
                <environment>PHP 5.3.1</environment>
            <key id="10929">DDC-359</key>
            <summary>Specified, but empty CLI Options --option= causes Notice undefined offset: 0 [Test case for CliController included]</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="naderman">Nils Adermann</reporter>
                        <labels>
                    </labels>
                <created>Sun, 21 Feb 2010 21:27:19 +0000</created>
                <updated>Mon, 14 Jun 2010 09:17:34 +0000</updated>
                    <resolved>Thu, 18 Mar 2010 17:48:32 +0000</resolved>
                            <version>2.0-ALPHA4</version>
                                <fixVersion>2.0-BETA1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="12344" author="jwage" created="Thu, 18 Mar 2010 17:48:32 +0000"  >&lt;p&gt;Thanks for the bug report and awesome patch/test case!&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="10649">DDC-222</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="10382" name="cli_controller_tests.diff" size="7678" author="naderman" created="Sun, 21 Feb 2010 21:27:19 +0000" />
                    <attachment id="10381" name="empty_option_bug.diff" size="1398" author="naderman" created="Sun, 21 Feb 2010 21:27:19 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>