I would like to add dependency to zendframework/zend-db
package, so I added it to my composer.json:
"repositories": [
{
"type": "composer",
"url": "http://packages.zendframework.com/"
}
],
"require": {
"php": ">=5.3.2",
"symfony/class-loader": "dev-master",
"symfony/console": "dev-master",
"symfony/filesystem": "dev-master",
"symfony/finder": "dev-master",
"symfony/locale": "dev-master",
"symfony/yaml": "dev-master",
"doctrine/dbal": "dev-master",
"zendframework/zend-db": "dev-master"
}
The problem is that composer installs entire zendframework/zendframework
package.
Any idea why?
as explained here http://packages.zendframework.com/#composer ZF2 now provide a composer repository with all modules.
to add the repo to you package:
"repositories": [
{
"type": "composer",
"url": "http://packages.zendframework.com/"
}
],
and from here on you can add packages seperately:
"require": {
"zendframework/zend-config": "2.0.*",
"zendframework/zend-http": "2.0.*"
},
you only need to specify the packages you want, if they have dependencies they will be resolved by compser.
allthough this does not seem to work atm...
Here's the composer.json from zend-db in the zend github. According to the file, zend-db does not have any dependencies.
This can be due to the fact that you're trying to download a package from dev-master and there's a missmatch in the composer.json of the dev-master.
I would suggest you to change the required version to something like 2.0.* and try again.
Also, Although Zend Framework is loosely coupled, in the older versions of the framework the dependencies were not explicit.
For instance, with a quick sweep over the source code of zend_db from ZEND 1.9, I found that it depends, at least, on the following packages:
These packages might have other dependencies, hence the download size. Regardless, as King explained, Zend Framework 2.0 is different from version 1.9 and maybe this is not applicable to 2.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With