Zend Framework Composer Packages

前端 未结 3 2156
轮回少年
轮回少年 2021-02-13 19:33

I would like to add dependency to zendframework/zend-db package, so I added it to my composer.json:

\"repositories\": [
    {
        \"type\": \"co         


        
3条回答
  •  旧巷少年郎
    2021-02-13 19:41

    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...

提交回复
热议问题