我试图通过Composer将PHPUnit安装到Laravel框架中.
问题是运行composer update后未下载所需的文件.
我的流程如下:
首先,我在中插入PHPUnit要求composer.json
.整个文件看起来像这样:
{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "laravel/framework": "4.1.*", "laravelbook/ardent": "dev-master", "phpunit/phpunit": "4.2.*" // i have also tried with 3.7 and 3.8 }, "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/database/seeds", "app/tests/TestCase.php", "app/filters" ] }, "scripts": { "post-install-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-update-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php artisan key:generate" ] }, "config": { "preferred-install": "dist" }, "minimum-stability": "stable", "require": { "laravelbook/ardent": "dev-master" } }
接下来,我跑composer update -vvv
.转储看起来像这样(Bonus Weirdness:这是从命令提示符复制的,如果我执行相同的命令但是尝试使用>命令将其写入txt文件,该过程在该Downloading https://packagist.org/packages.json
行之后挂起)
C:\wamp\www\Dropbox\ltest>composer update -vvv Reading ./composer.json Executing command (CWD): git describe --exact-match --tags Executing command (CWD): git branch --no-color --no-abbrev -v Loading composer repositories with package information Downloading https://packagist.org/packages.json Writing C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/packages .json into cache Updating dependencies (including require-dev) Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/p-provid er-active.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/p-provid er-archived.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/p-provid er-latest.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/p-provid er-stale.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -laravelbook$ardent.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -laravel$laravel.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -psr$log.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$http-foundation.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$http-kernel.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -stack$builder.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$event-dispatcher.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$debug.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -predis$predis.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -phpseclib$phpseclib.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -nesbot$carbon.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -monolog$monolog.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -nikic$php-parser.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -jeremeamia$superclosure.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -jeremeamia$functionparser.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -ircmaxell$password-compat.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -filp$whoops.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -d11wtq$boris.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$console.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$filesystem.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$finder.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -classpreloader$classpreloader.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -patchwork$utf8.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -swiftmailer$swiftmailer.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$browser-kit.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$css-selector.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$dom-crawler.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$process.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$routing.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$security.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$translation.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -laravel$framework.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$dbal.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$common.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$inflector.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$cache.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$collections.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$lexer.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -doctrine$annotations.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$support.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$database.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$validation.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$container.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$events.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$auth.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$cache.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$config.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$console.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$cookie.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$encryption.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$exception.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$filesystem.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$foundation.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$hashing.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$html.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$http.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$log.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$mail.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$pagination.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$queue.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$redis.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$routing.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$session.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$translation.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$view.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -illuminate$workbench.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$security-acl.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$security-core.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$security-csrf.json from cache Reading C:/Users/aske/AppData/Local/Composer/repo/https---packagist.org/provider -symfony$security-http.json from cache Nothing to install or update Reading ./composer.lock Generating autoload files Executing command (CWD): php artisan clear-compiled Executing command (CWD): php artisan optimize Generating optimized class loader
并且最终不会添加所需的文件vendor/bin/
.据我所知phpunit.php
,此时应该放置一个名为的文件,但没有任何迹象.
这是我的composer.lock
奖励信息,运行更新后没有任何phpunit的迹象.