鍍金池/ 問(wèn)答/PHP  HTML/ composer下載yi2不成功

composer下載yi2不成功

clipboard.png

回答
編輯回答
不討喜

https://packagist.org/package...
圖片描述

雖然不知道你為什么要下載那么古老的 2.0.5 的版本,但是 composer 官網(wǎng)上的 yiisoft/yii2-app-advanced 包并沒(méi) 2.0.5 版本。

現(xiàn)在 yiisoft/yii2-app-advanced 的最新版本是 2.0.14,可以使用如下命令進(jìn)行下載:

composer create-project yiisoft/yii2-app-advanced advanced 2.0.14

實(shí)際上,到目前為止,yii2框架核心的版本已經(jīng)是 2.0.15.1,安裝時(shí)composer 會(huì)自動(dòng)將其升級(jí)為最新版本。

[/tmp] ]$composer create-project yiisoft/yii2-app-advanced advanced 2.0.14
Installing yiisoft/yii2-app-advanced (2.0.14)
  - Installing yiisoft/yii2-app-advanced (2.0.14): Loading from cache
Created project in advanced
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 59 installs, 0 updates, 0 removals
  - Installing yiisoft/yii2-composer (2.0.6): Loading from cache
  - Installing swiftmailer/swiftmailer (v5.4.9): Loading from cache
  - Installing bower-asset/jquery (3.2.1): Loading from cache
  - Installing bower-asset/yii2-pjax (2.0.7.1): Loading from cache
  - Installing bower-asset/punycode (v1.3.2): Loading from cache
  - Installing cebe/markdown (1.1.2): Loading from cache
  - Installing ezyang/htmlpurifier (v4.10.0): Loading from cache
  - Installing bower-asset/inputmask (3.3.11): Loading from cache
  - Installing yiisoft/yii2 (2.0.15.1): Loading from cache
  - Installing yiisoft/yii2-swiftmailer (2.0.7): Loading from cache
  - Installing bower-asset/bootstrap (v3.3.7): Loading from cache
  - Installing yiisoft/yii2-bootstrap (2.0.8): Loading from cache
  - Installing yiisoft/yii2-debug (2.0.13): Loading from cache
  - Installing bower-asset/typeahead.js (v0.11.1): Loading from cache
  - Installing phpspec/php-diff (v1.1.0): Loading from cache
  - Installing yiisoft/yii2-gii (2.0.6): Loading from cache
  - Installing fzaninotto/faker (v1.7.1): Loading from cache
  - Installing yiisoft/yii2-faker (2.0.4): Loading from cache
  - Installing doctrine/instantiator (1.0.5): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing sebastian/recursion-context (2.0.0): Loading from cache
  - Installing sebastian/exporter (2.0.0): Loading from cache
  - Installing phpunit/phpunit-mock-objects (3.4.4): Loading from cache
  - Installing codeception/stub (1.0.2): Loading from cache
  - Installing sebastian/diff (1.4.3): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-file-iterator (1.4.5): Loading from cache
  - Installing sebastian/resource-operations (1.0.0): Loading from cache
  - Installing sebastian/comparator (1.2.4): Loading from cache
  - Installing webmozart/assert (1.3.0): Loading from cache
  - Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  - Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (3.3.2): Loading from cache
  - Installing phpspec/prophecy (1.7.5): Loading from cache
  - Installing myclabs/deep-copy (1.7.0): Loading from cache
  - Installing phpunit/php-token-stream (1.4.12): Loading from cache
  - Installing sebastian/environment (2.0.0): Loading from cache
  - Installing phpunit/php-code-coverage (4.0.8): Loading from cache
  - Installing phpunit/php-timer (1.0.9): Loading from cache
  - Installing sebastian/global-state (1.1.1): Loading from cache
  - Installing sebastian/object-enumerator (2.0.1): Loading from cache
  - Installing symfony/yaml (v3.4.8): Downloading (100%)
  - Installing phpunit/phpunit (5.7.27): Loading from cache
  - Installing codeception/phpunit-wrapper (6.0.9): Downloading (100%)
  - Installing behat/gherkin (v4.5.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.7.0): Loading from cache
  - Installing symfony/dom-crawler (v3.4.8): Downloading (100%)
  - Installing symfony/css-selector (v3.4.8): Downloading (100%)
  - Installing symfony/browser-kit (v3.4.8): Downloading (100%)
  - Installing symfony/event-dispatcher (v3.4.8): Downloading (100%)
  - Installing psr/log (1.0.2): Loading from cache
  - Installing symfony/debug (v3.4.8): Downloading (100%)
  - Installing symfony/console (v3.4.8): Downloading (100%)
  - Installing symfony/finder (v3.4.8): Downloading (100%)
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing guzzlehttp/psr7 (1.4.2): Loading from cache
  - Installing codeception/base (2.4.1): Downloading (100%)
  - Installing codeception/verify (0.3.3): Loading from cache
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
symfony/browser-kit suggests installing symfony/process ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
symfony/console suggests installing symfony/lock ()
symfony/console suggests installing symfony/process ()
codeception/base suggests installing aws/aws-sdk-php (For using AWS Auth in REST module and Queue module)
codeception/base suggests installing codeception/phpbuiltinserver (Start and stop PHP built-in web server for your tests)
codeception/base suggests installing codeception/specify (BDD-style code blocks)
codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module)
codeception/base suggests installing league/factory-muffin (For DataFactory module)
codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
codeception/base suggests installing stecman/symfony-console-completion (For BASH autocompletion)
codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files
2017年4月16日 05:42
編輯回答
吢涼

你可以嘗試一下使用composer的國(guó)內(nèi)鏡像

composer config -g repo.packagist composer https://packagist.phpcomposer.com
2018年6月27日 00:20