Re: [Console_CommandLine] optional argument not working

From: Date: Tue, 20 Sep 2011 13:31:54 +0000
Subject: Re: [Console_CommandLine] optional argument not working
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31232@lists.php.net to get a copy of this message
On 20 September 2011 10:46, Reuben Cummings <reubano@gmail.com> wrote: > I couldn't find any way to search the mailing list so hopefully this > hasn't been asked before. How do I get the optional argument to work? > I tried: > > <command> >        <name>textileme</name> >        <argument name="inputFile"> >                <help_name>input-file</help_name> >        </argument> >        <argument name="outputFile"> >                <help_name>output-file</help_name> >                <optional>TRUE</optional> >        </argument> >  </command> > > But I get the following error when run my script with 'textileme argument1' > > PHP Warning:  DOMDocument::relaxNGValidate(): Extra element optional > in interleave in > /usr/local/php5/PEAR/Console/CommandLine/XmlParser.php on line 116 > PHP Warning:  DOMDocument::relaxNGValidate(): Element argument failed > to validate content in > /usr/local/php5/PEAR/Console/CommandLine/XmlParser.php on line 116 > PHP Warning:  DOMDocument::relaxNGValidate(): Extra element argument > in interleave in > /usr/local/php5/PEAR/Console/CommandLine/XmlParser.php on line 116 > PHP Warning:  DOMDocument::relaxNGValidate(): Element command failed > to validate content in > /usr/local/php5/PEAR/Console/CommandLine/XmlParser.php on line 116 > Error: You must provide at least 2 arguments. > Type "textileme --help" to get help. > > > Thanks! Using a lowercase 'true' will work. This issue has been fixed in the main code. http://svn.php.net/viewvc?view=revision&revision=317054 Thank you for your report. Regards, Richard. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

« previous php.pear.general (#31232) next »