当前位置:Gxlcms > PHP教程 > composer无法更新packagist.org有缓存?跟github.com不一样

composer无法更新packagist.org有缓存?跟github.com不一样

时间:2021-07-01 10:21:17 帮助过:3人阅读

  1. <code>composer clear-cache
  2. rm -rf vendor/*
  3. composer update -vvv
  4. </code>
  1. <code> - Installing g9901/yii2-gftp (2.0.1)
  2. Downloading https://api.github.com/repos/G9901/yii2-gftp/zipball/5621e075a25d13b83587f6293ff35c0ee00f1769
  3. Downloading: 100%
  4. Writing /root/.composer/cache/files/g9901/yii2-gftp/5621e075a25d13b83587f6293ff35c0ee00f1769.zip into cache
  5. Extracting archive
  6. Executing command (CWD): unzip '/home/flxx/basic/vendor/g9901/yii2-gftp/74b544ff38bad8cd15f4e57f4fea1bd4' -d '/home/flxx/basic/vendor/composer
  7. /befb67d9' && chmod -R u+w '/home/flxx/basic/vendor/composer/befb67d9'
  8. REASON: Required by root: Install command rule (install g9901/yii2-gftp 2.0|install g9901/yii2-gftp 2.0.1)
  9. </code>

很奇怪的现象,下载到目录的 g9901/yii2-gftp 还是旧的,跟 github.com 上的源码不一样!

下载来的源码:

  1. <code>php</code><code>public function login () {
  2. $this->connectIfNeeded(false);
  3. $this->handle->login();
  4. $this->onLogin(new Event(['sender' => $this, 'data' => $user]));
  5. }
  6. </code>

github.com 上的源码:

  1. <code>php</code><code>public function login () {
  2. $this->connectIfNeeded(false);
  3. $this->handle->login();
  4. $this->onLogin(new Event(['sender' => $this, 'data' => $this->handle->user]));
  5. }
  6. </code>

已经在 packagist.org 上点击了 “update” 按钮很多次了。 https://packagist.org/packages/g9901/yii2-gftp,奇怪的是packagist 显示的最后修改时间还是 2015-07-15 20:04 UTC

回复内容:

  1. <code>composer clear-cache
  2. rm -rf vendor/*
  3. composer update -vvv
  4. </code>
  1. <code> - Installing g9901/yii2-gftp (2.0.1)
  2. Downloading https://api.github.com/repos/G9901/yii2-gftp/zipball/5621e075a25d13b83587f6293ff35c0ee00f1769
  3. Downloading: 100%
  4. Writing /root/.composer/cache/files/g9901/yii2-gftp/5621e075a25d13b83587f6293ff35c0ee00f1769.zip into cache
  5. Extracting archive
  6. Executing command (CWD): unzip '/home/flxx/basic/vendor/g9901/yii2-gftp/74b544ff38bad8cd15f4e57f4fea1bd4' -d '/home/flxx/basic/vendor/composer
  7. /befb67d9' && chmod -R u+w '/home/flxx/basic/vendor/composer/befb67d9'
  8. REASON: Required by root: Install command rule (install g9901/yii2-gftp 2.0|install g9901/yii2-gftp 2.0.1)
  9. </code>

很奇怪的现象,下载到目录的 g9901/yii2-gftp 还是旧的,跟 github.com 上的源码不一样!

下载来的源码:

  1. <code>php</code><code>public function login () {
  2. $this->connectIfNeeded(false);
  3. $this->handle->login();
  4. $this->onLogin(new Event(['sender' => $this, 'data' => $user]));
  5. }
  6. </code>

github.com 上的源码:

  1. <code>php</code><code>public function login () {
  2. $this->connectIfNeeded(false);
  3. $this->handle->login();
  4. $this->onLogin(new Event(['sender' => $this, 'data' => $this->handle->user]));
  5. }
  6. </code>

已经在 packagist.org 上点击了 “update” 按钮很多次了。 https://packagist.org/packages/g9901/yii2-gftp,奇怪的是packagist 显示的最后修改时间还是 2015-07-15 20:04 UTC

人气教程排行