Re: [Console_CommandLine] optional argument not working

From: Date: Tue, 20 Sep 2011 10:15:59 +0000
Subject: Re: [Console_CommandLine] optional argument not working
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31231@lists.php.net to get a copy of this message
Hi, As the warnings suggest, "TRUE" is not a valid boolean value, see here for details: http://svn.php.net/viewvc/pear/packages/Console_CommandLine/trunk/data/xmlschema.rng?revision=282427&view=markup Maybe we should be less strict about that... -- David Le 20/09/2011 11:46, Reuben Cummings a écrit : > 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! >

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