正文
组件包测试
在给 hyperf
框架贡献PR的时候,有时候改完想在本地起一个项目引入修改后的包来本地测试。操作过好多次,但每次都还是要去百度搜索…直接记录到博客一下
在项目的composer.json设置仓库
{
"repositories": {
"hyperf/http-server": {
"type": "path",
"url": "/dockerfile/hyperf-github/hyperf/src/http-server",
"options": {
"symlink": true
}
}
}
}
如果要模拟版本,在包的composer.json设置
{
"name": "hyperf/utils",
"description": "A tools package that could help developer solved the problem quickly.",
"license": "MIT",
"vension":"v3.1.444"
}
create-project 骨架测试
{
"packages": {
"siam/hyperf-skeleton": {
"3.1": {
"name": "siam/hyperf-skeleton",
"version": "3.1",
"dist": {
"url": "/data/home/Siam/Code/github/hyperf/hyperf-skeleton",
"type": "path"
}
}
}
}
}
composer create-project --repository=/data/home/Siam/Code/packages.json siam/hyperf-skeleton hyperf-skeleton-local
扫描二维码,分享此文章