我正在使用composer
更新一些软件包。我在我的项目中使用 Laravel5.6。
我正在尝试的是 PHPStan 到 版本 0.10.7
.我当前的版本是 0.9.2
.
问题所在
当我尝试更新时,它会显示一条成功消息,但是在检查outdate
包输出时,它仍然已过时。
我尝试过什么
使用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
> IlluminateFoundationComposerScripts::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",
有什么想法吗?
这里的问题是我使用的其他软件包也在使用nikic/php-parser
软件包,但只考虑非中断性更改(nikic/php-parser":"^3.0"
),"阻止"升级到> 4.0
。
由于作曲家无法安装同一包的两个版本,因此我的解决方案暂时没有更新phpstan
。
我将等待需要nikic/php-parser
的库将其要求更新为 4.0
及更高版本,或者将来会更改这些包。