作曲家包装有一些公共镜像吗?

时间:2015-06-10 12:44:08

标签: composer-php packagist

我公司的IP系列似乎被packagist.org的托管服务阻止,我无法访问该域名。我已经联系过他们,但我不知道要消除堵塞需要多长时间。此外,我尝试使用的每个外部Web代理都属于我公司的防火墙,因此我陷入困境。

是否有任何公共镜像作曲家包,所以我不必依赖packagist.org域名?

欢迎任何其他解决方案。

2 个答案:

答案 0 :(得分:1)

我无法找到公共镜像,但我能够通过编辑~/.composer/config.json并添加依赖项目来解决packagist.org依赖关系问题。 GitHub链接为存储库,例如:

{
    "repositories": [
        { "type": "vcs", "url": "https://github.com/smarty-php/smarty" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/phpunit" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-code-coverage" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-file-iterator" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-text-template" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-timer" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects" },
        { "type": "vcs", "url": "https://github.com/phpspec/prophecy" },
        ...
        { "packagist": false }
    ]
}

缺点非常明显:我必须映射每个依赖项和依赖项的依赖项,并指出它们的GitHub链接。至少它要比等待OVH托管服务解决阻塞问题更快。

答案 1 :(得分:0)

负责packagist.org的团队表示,他们不会阻止服务器内的任何人。但他们无法担保托管公司。

我知道没有镜像服务器。您是否确定这不是防火墙的问题?如果你说你不能使用公共代理,我会说它可能会阻止太多。

另一方面,在需要时依赖某些外部服务器可能是一种无法满足的期望。这不仅仅是packagist.org,而是所有其他托管网络服务器,包含您想要的软件,如Github,Bitbucket等。我说这将是开始为您创建本地副本的理想机会,但当然这需要第一次与packagist.org联系。