ZF2-124: Zend_Validator pyrus packages has an invalid optional dependency

Description

Not sure if the bug is in the component itself. Trying to install Zend_Validator from packages.zendframework.com using the latest pyrus.phar and turning on optional dependencies leads to this:

gaigalas$ php pyrus.phar install -f -o packages.zendframework.com/Zend_Validator-beta Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D Using PEAR installation found at /Volumes/Dev/Projects/PEAR PEAR2\Pyrus\Channel\Exception: package Zend_Server does not exist PEAR2\Pyrus\HTTPException: Download of http://packages.zendframework.com/rest/p/… failed, file does not exist

This is blocking me from distributing a component that depends on Zend_Validator.

I'm also not sure on how to contribute to fix this. Is there any repo for the package generator or package.xml files?

Thanks!

Comments

There is a place to contribute a patch: https://github.com/zendframework/ZF2Package

Each package has a file returning a list of dependencies -- for Zend_Validator, it's https://github.com/zendframework/ZF2Package/….

Obviously, you also need to trace each package on which a dependency is made to find which one may have the erroneous dependency. Also, if you think a given dependency is optional, versus require, you can change which array it is returned in (or introduce the "optional" array, if none present).

The actual problem is the Zend_Json package which has an optional dependency on Zend_Server. I'll take a closer look in a bit.

https://github.com/zendframework/ZF2Package/…

The problem seems to be in the Zend_Json package indeed, Evan.

I'm actually creating a package which optionally depends on Zend_Validator. Declaring the optional dependency on package.xml and installing with -o also installs every optional dependency recursively (all the optional dependency tree from Zend_Validator).

I can't reproduce this with Zend Framework 2 beta 3 and pyrus 2.0.0a4