Re: pear convert: Invalid package.xml
| From: | Greg Beaver | Date: | Sat, 28 Jan 2006 23:01:00 +0000 |
| Subject: | Re: pear convert: Invalid package.xml | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41120@lists.php.net to get a copy of this message | ||
Sebastian Bergmann wrote:
> I am trying to convert PHPUnit2's package.xml to package2.xml:
>
> sb@wopr-mobile PHPUnit2 % pear convert
> Invalid tag order in <dependencies><optional>, found <php> expected
> one of "package, subpackage, extension"
> PEAR_Packagefile_v2::toPackageFile: invalid package.
>
> This is the package.xml part it complains about:
>
> <deps>
> <dep type="php" rel="ge" version="5.1.2" />
> <dep type="php" rel="ge" version="5.1.3"
> optional="yes" />
> ...
> </deps>
>
> Is the following package2.xml part (that I converted manually) legal?
>
> <dependencies>
> <required>
> <php>
> <min>5.1.2</min>
> </php>
> ...
> </required>
> <optional>
> <php>
> <min>5.1.3</min>
> </php>
> ...
> </optional>
> </dependencies>
This is indeed not legal, as this was a hack taking advantage of PEAR
1.3.x's not-so-brilliant dep calculations to display a notice to users.
If you support 5.1.2 and later, use a 5.1.2 dep, and write "5.1.3 and
higher is recommended" in the docs and in the package
information/release notes. There is no such thing as an optional
dependency on php, and the new package.xml format more accurately
reflects dependencies. Sorry for the inconvenience.
Thanks,
Greg