编写器需要为gitlab上的api/v3而不是api/v4请求的包名称
当我需要一个带有composer的软件包时,它将返回一条错误消息: composer需要Bugloos/file manager捆绑包:1.0.6编写器需要为gitlab上的api/v3而不是api/v4请求的包名称,git,composer-php,gitlab,Git,Composer Php,Gitlab,当我需要一个带有composer的软件包时,它将返回一条错误消息: composer需要Bugloos/file manager捆绑包:1.0.6 Installation failed, reverting ./composer.json to its original content. [Composer\Downloade
Installation failed, reverting ./composer.json to its original content.
[Composer\Downloader\TransportException]
The "https://gitlab.com/api/v3/projects/bugloos%2Flogin%2Dbundle" file could not be downloaded (HTTP/1.1 410 Gone)
但是如果我单击带有v4的链接,gitlab将返回正确的响应,我不知道如何告诉gitlab使用v4版本响应我?
"repositories": [
{
"type": "vcs",
"url": "git@gitlab.com:bugloos/login-bundle.git"
},
这是两年多前作曲家的作品。您需要更新作曲家:
composer self-update
如果composer是全局安装的,则使用sudo:
sudo -H composer self-update
解决方案是: 更新composer的verison,但使用phar而不是package manager 我已经更新了composer版本,将其删除,然后再次安装最新版本,并且由于我通过ubuntu软件包管理器安装了composer,所以它不支持以下命令:
composer self-update > only works if you installed it with phar
但是如果您没有使用phar安装它您必须将其删除,然后从以下位置重新安装:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
这个url在哪里?在
composer.lock中
?在composer.json
forrepositories
?@GrenierJ中,我更新了问题,即当composer抛出错误时终端中的问题。您应该始终从it网站安装composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"