composer
1.Composer 是 PHP 用来管理依赖(dependency)关系的工具,
可以在自己的项目中声明所依赖的外部工具库(libraries),Composer 会帮你安装这些依赖的库文件;
2. 安装Composer,http://www.phpcomposer.com,提供详细安装方法和说明文档;
3. 添加镜像,加快安装包下载,
系统全局配置方式:打开命令行窗口(windows用户)或控制台(Linux、Mac 用户),进入你的项目的根目录(也就是 composer.json 文件所在目录),执行如下命令:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
全局配置的文件一般放在 C:\Users\XXX\AppData\Roaming\Composer\config.json
4. 用composer安装thinkphp的单体测试包:
PS D:\wamp\www\tp5> composer require "topthink/think-testing:1.*" ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 25 installs, 0 updates, 0 removals - Installing symfony/polyfill-mbstring (v1.6.0): Downloading (100%) - Installing symfony/dom-crawler (v2.8.33): Downloading (100%) - Installing symfony/yaml (v3.4.3): Downloading (100%) - Installing sebastian/version (1.0.6): Downloading (100%) - Installing sebastian/global-state (1.1.1): Downloading (100%) - Installing sebastian/recursion-context (1.0.5): Downloading (100%) - Installing sebastian/exporter (1.2.2): Downloading (100%) - Installing sebastian/environment (1.3.8): Downloading (100%) - Installing sebastian/diff (1.4.3): Downloading (100%) - Installing sebastian/comparator (1.2.4): Downloading (100%) - Installing doctrine/instantiator (1.0.5): Downloading (100%) - Installing phpunit/php-text-template (1.2.1): Downloading (100%) - Installing phpunit/phpunit-mock-objects (2.3.8): Downloading (100%) - Installing phpunit/php-timer (1.0.9): Downloading (100%) - Installing phpunit/php-file-iterator (1.4.5): Downloading (100%) - Installing phpunit/php-token-stream (1.4.12): Downloading (100%) - Installing phpunit/php-code-coverage (2.2.4): Downloading (100%) - Installing webmozart/assert (1.2.0): Downloading (100%) - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%) - Installing phpdocumentor/type-resolver (0.3.0): Downloading (100%) - Installing phpdocumentor/reflection-docblock (3.2.2): Downloading (100%) - Installing phpspec/prophecy (1.7.3): Downloading (100%) - Installing phpunit/phpunit (4.8.36): Downloading (100%) - Installing topthink/think-helper (v1.0.6): Downloading (100%) - Installing topthink/think-testing (v1.0.6): Downloading (100%) symfony/dom-crawler suggests installing symfony/css-selector () symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command) sebastian/global-state suggests installing ext-uopz (*) phpunit/phpunit suggests installing phpunit/php-invoker (~1.1) Writing lock file Generating autoload files PS D:\wamp\www\tp5> PS D:\wamp\www\tp5> composer require "topthink/think-testing:1.*"

浙公网安备 33010602011771号