我为我的个人 PHP 库创建了一个 SVN 存储库,并在根级别添加了一个 composer.json 文件:
{
"name": "myPersonalLibrary/lib",
"type": "library",
"description": "Light MVC framework for PHP 5.4",
"keywords": ["database","mvc"],
"homepage": "http://mysite.com",
"license": "MIT",
"require": {
"php": ">=5.3.0",
"mustache/mustache": "dev-master"
},
"autoload": {
"psr-0": {
"bbn": "src"
}
}
}
然后我使用以下composer.json创建了一个项目:
{
"require": {
"monolog/monolog": "1.0.*",
"zerkalica/php-code-sniffer": "dev-master",
"mustache/mustache": "dev-master",
"myPersonalLibrary/lib": "*"
},
"repositories": [
{
"type": "svn",
"url": "https://mysite.com/svn/myPersonalLibrary",
"branches-path": false,
"tags-path": false,
"trunk-path": "src"
}
]
}
当我尝试更新我的项目时,我得到:No valid composer.json was found in any branch or tag of https...
我认为问题出在我的文件结构上,但我找不到任何关于此的文档:
/my_repo
/src
/lib
/api
/db
/file
/html
....
/mvc.php
/obj.php
/composer.json
我试图在 packagist.org 上发布我的 URL 并得到No valid/supported repository was found at the given URL