cch*_*man 0 php phpunit composer-php
I'm trying to update my phpunit version, however it doesn't seem to be working with the regular composer install.
My composer.json file is as follows:
{
"require": {
...
},
"require-dev": {
"phpunit/phpunit": "4.*",
"phpunit/php-invoker": "^1.1",
"phpunit/dbunit": "^2.0"
}
}
Run Code Online (Sandbox Code Playgroud)
And running both composer install and update as php composer.phar install and php composer.phar update (I don't have composer installed globally which might be the issue?) I get
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Run Code Online (Sandbox Code Playgroud)
When I check to see the phpunit version, I get
$ phpunit --version
PHPUnit 3.7.28 by Sebastian Bergmann.
Run Code Online (Sandbox Code Playgroud)
My PHP version is 5.6 which does seem to rule out the solution from this very similar issue.
My best guess is that there is a global version of phpunit installed and overriding my local one. But I haven't been able to find any guidance as to how to fix this without making too many changes to the rest of the global environment.
该命令本身phpunit将在您的 shell 路径中搜索 PHPUnit 可执行文件。Acomposer install将把它放到 composer bin 目录中,这是vendor/bin默认的。您可以直接使用 执行脚本./vendor/bin/phpunit,或者允许 composer 为您执行脚本,从而为您的项目解析正确的路径composer exec phpunit
| 归档时间: |
|
| 查看次数: |
820 次 |
| 最近记录: |