【发布时间】:2019-05-28 01:20:36
【问题描述】:
我正在使用composer 更新一些软件包。我在我的项目中使用 Laravel5.6。
我正在尝试的是PHPStan 到版本0.10.7。我当前的版本是0.9.2。
问题
当我尝试更新时,它显示一条成功消息,但在检查 outdate 包输出时,它仍然是 OUTDATED。
我尝试过的
使用composer why-not phpstan/phpstan 0.10.7 给了我以下输出:
laravel/laravel my-branch-test requires (for development) phpstan/phpstan (^0.9.2)
phpstan/phpstan 0.10.7 requires nikic/php-parser (^4.0.2)
laravel/laravel my-branch-test does not require nikic/php-parser (but v3.1.5 is installed)
phpstan/phpstan 0.10.7 requires phpstan/phpdoc-parser (^0.3)
laravel/laravel my-branch-test does not require phpstan/phpdoc-parser (but 0.2 is installed)
然后我尝试更新 nikic/php-parser 和 phpdoc-parser 并重新运行 composer update phpstan/phpstan 但它给了我与以前相同的结果。 (不更新)
更新:运行composer update phpstan/phpstan --with-dependencies 给了我以下输出:(但仍然没有更新phpstan)
composer update phpstan/phpstan --with-dependencies
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 11 updates, 0 removals
- Updating ocramius/package-versions (1.2.0 => 1.3.0): Loading from cache
- Updating symfony/finder (v4.1.4 => v4.2.1): Loading from cache
- Updating symfony/polyfill-mbstring (v1.9.0 => v1.10.0): Loading from cache
- Updating jean85/pretty-package-versions (1.1 => 1.2): Loading from cache
- Updating nette/utils (v2.4.9 => v2.5.3): Loading from cache
- Updating nette/php-generator (v3.0.2 => v3.0.5): Loading from cache
- Updating nette/neon (v2.4.2 => v2.4.3): Loading from cache
- Updating nette/di (v2.4.10 => v2.4.14): Loading from cache
- Updating nette/bootstrap (v2.4.5 => v2.4.6): Loading from cache
- Updating nette/finder (v2.4.1 => v2.4.2): Loading from cache
- Updating nette/robot-loader (v3.0.3 => v3.1.0): Loading from cache
Package sebastian/git is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: caffeinated/modules
Discovered Package: fideloper/proxy
Discovered Package: jenssegers/agent
Discovered Package: laravel/tinker
Discovered Package: rap2hpoutre/laravel-log-viewer
Discovered Package: rcrowe/twigbridge
Package manifest generated successfully.
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
代码
在我的composer.json 文件中,包被列为:
"require-dev": {
"phpstan/phpstan": "^0.9.2",
有什么想法吗?
【问题讨论】:
-
您能否尝试
composer update phpstan/phpstan --with-dependencies,如果没有帮助,请显示完整的命令输出? -
Ofc @xabbuh,查看我的更新答案。
-
你可以用
composer require --dev phpstan/phpstan:^0.10 --update-with-dependencies代替吗? -
这种方法的结果相同
标签: php composer-php version versioning