需要搭建composer私库,然而折腾了近两天时间还没有搞定,真是崩溃。 这里将笔记贴出来,希望有路过的大神可以指点一二。
目前: satis已安装搭建,satis.json配置如下:
{
"name": "yixzm/utils",
"homepage": "http://composer.yixzm.cn/",
"repositories": [
{
"type": "vcs",
"url": "https://gitee.com/yixzm/yix_composer.git"
}
],
"require-all": true
}
satis build 成功
# php bin/satis build satis.json public/
Scanning packages
Wrote packages to public//include/all$989a20d35d4868fd05f313331a59ea07112207dc.json
Writing packages.json
Pruning include directories
Deleted public//include/all$96e5c0926e9d7f87094d1ba307e38ea76cd09c53.json
Writing web view
私有composer库源码包中的composer.json如下:
{
"name": "yixzm/yix_composer",
"description": "~",
"license": "MIT",
"authors": [
{
"name": "Yix",
"email": "dream@yixzm.cn"
}
],
"autoload": {
"psr-4": {
"Yix\\Utils\\": "src"
}
},
"require": {},
"minimum-stability": "dev",
"prefer-stable": true
}
从网络资料及官方文档看,貌似composer私库已经搭建完毕。 然而,新建测试项目和composer.json
{
"config": {
"preferred-install": "dist",
"secure-http": false
},
"repositories": [
{
"type": "composer",
"url": "http://composer.yixzm.cn/"
}
],
"require": {
"yixzm/yix_composer": "*"
}
}
执行 composer install 或者 composer update,报错如下:
PS E:\code\v3> composer update
Loading composer repositories with package information
Warning: Accessing composer.yixzm.cn over http which is an insecure protocol.
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package yixzm/yix_composer could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
额,真心搞不定~
先放这里,问题存档。祈祷大神路过指点,,,