编辑
我想我误解了satis,现在这是我的新理解,如果我错了,请纠正我:
在 satis.json 中,我必须指定要镜像的包的 url,例如,学说 git repo、yaml git repo... 然后 satis 将所有这些包镜像到我的服务器上。这意味着我需要将项目的 composer.json 中使用的所有包添加到 satis json(大约 20 个包/要求)。现在,我可以将我的私有 satis 存储库添加到我的项目的 composer.json 文件中,并且在运行“composer update”时,它将首先在 satis 镜像包中查找所需的包。我理解正确吗?
情况:
我正在尝试将 Satis 用于私人作曲家存储库。我在 github 上有一个私人项目,用于我的网站。在项目中,我使用的是composer,因此我在项目的根目录上有一个composer.json。它看起来如下:
{
"name": "Peter North",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
}
},
"require": {
"php": ">=5.3.9",
"symfony/http-foundation": "dev-master"
}
...
}
现在我想使用我的私有 url 满足存储库:packages.ait.company,在 apache 上运行并且到目前为止可以访问。satis.json 如下所示:
{
"name": "AIT Company",
"homepage": "packages.ait.com",
"repositories": [
{
"type": "vcs",
"url": "git@github.com:north/ait.git" // this is the url of my private github project
}
],
"require-all": true,
"require-dependencies": true,
"archive": {
"directory": "dist",
"format": "tar",
"skip-dev": true
}
}
我认为我不太了解如何构建 satis.json 文件以及它需要包含什么,因为我尝试的方式是它不会下载我指定的“php”和“symfony/http-foundation”包在 composer.json 文件中 - 尽管它确实将项目的正确 composer.json 文件下载到 /satis/include 目录 json 文件中。
当我想从 github 读取我的项目的 composer.json 并构建“需要条目”的私有 satis 存储库时,satis.json 需要看起来如何?