zend framework2 - How do i set my composer.json on github to allow inclusion as a library? -


all of documentation , tutorials , forums i've looked @ setting client composer.json downloading other people's packages, i'm trying set own packages, zf2 modules, can include them in multiple projects. hello-world attempt. have shiny-rest repository depends on shiny-lib repository, , want specify dependency numeric(al?) version numbers. shiny-rest's composer.json:

{     "name": "shinymayhem/shiny-rest",     "description": "rest json, xml , api-problem style errors",     "license": "apache 2.0",     "authors": [         {             "name": "reese wilson",             "email": "email"         }     ],     "extra": {         "branch-alias": {             "dev-master": "0.0.x-dev"         }     },     "require": {         "shinymayhem/shiny-lib": "0.0.*",         "zendframework/zendframework": "2.*"     },     "repositories": [         {             "url": "https://github.com/shinymayhem/shiny-lib",             "type": "git"         }     ],     "autoload": {         "psr-0": {             "shinyrest": "src"         },         "classmap": [             "module.php"         ]     } } 

shiny-lib's composer.json:

{     "name": "shinymayhem/shiny-lib",     "description": "base lib xml2array trait",     "license": "apache 2.0",     "authors": [         {             "name": "reese wilson",             "email": "email"         }     ],     "extra": {         "branch-alias": {             "dev-master": "0.0.x-dev"         }     },     "require": {         "zendframework/zendframework": "2.*"     },     "autoload": {         "psr-0": {             "shinylib": "src"         },         "classmap": [             "module.php"         ]     } } 

when require shiny-rest: dev-master on client's composer.json (which includes minimum stability: dev), resolves shiny-rest repository correctly, says

shinymayhem/shiny-rest dev-master requires shinymayhem/shiny-lib 0.0.* -> no matching package found. 

i've tried couple different things, following documentation @ getcomposer.org, or trying copy other repositories work composer packages, i'm guessing , checking. how specify versions , dependencies , aliases in source package composer.json? there documentation somewhere?

your client's composer.json needs include repository line shiny lib:

"repositories": [     {         "url": "https://github.com/shinymayhem/shiny-lib",         "type": "git"     } ], 

the repository line in shiny-rest composer.json ignored when include lib in other projects - additional repositories can specified in root composer.json. security feature in composer prevent 3rd party libraries specifying overriding standard repos other 3rd party libraries.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -