在此之前執(zhí)行了 composer update
在命令行準(zhǔn)備打包的時(shí)候。
運(yùn)行 php webman
的時(shí)候,報(bào)錯(cuò)如下,
php webman
PHP Fatal error: Declaration of Webman\Event\EventListCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in vendor/webman/event/src/EventListCommand.php on line 29
Fatal error: Declaration of Webman\Event\EventListCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in vendor/webman/event/src/EventListCommand.php on line 29
你的webman/event不是最新的,執(zhí)行 composer require webman/event 升級下
老大你好,我看了一下,v1.0.5好像是解決了這個(gè)問題,但是我直接 composer update 他被鎖定了v1.0.4
yulinzhihou@yulinzhihoudeiMac hands_offline % composer update webman/event
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package paragonie/easyrsa is abandoned, you should avoid using it. Use paragonie/sodium_compat instead.
Generating autoload files
30 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
然后執(zhí)行 composer update webman/event:v1.0.5
或者 composer update
以及刪除 composer.lock
和 vender
目錄重新 安裝,都會(huì)是v1.0.4
yulinzhihou@yulinzhihoudeiMac hands_offline % composer update webman/event:v1.0.5
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires webman/event ^1.0, found webman/event[v1.0.2, v1.0.3, v1.0.4] but it conflicts with your temporary update constraint (webman/event:v1.0.5).
Problem 2
- webman/admin is locked to version v0.6.24 and an update of this package was not requested.
- webman/admin v0.6.24 requires webman/event ^1.0 -> found webman/event[v1.0.2, v1.0.3, v1.0.4] but it conflicts with your temporary update constraint (webman/event:v1.0.5).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
用的是阿里云的鏡像,剛剛把阿里云鏡像移除,好像更新到 v1.0.5 可以了。難道是阿里云鏡像同步問題?有點(diǎn)玄學(xué)。
感謝老大的指點(diǎn)
用騰訊的鏡像: composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer
使用騰訊鏡像:
composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer
然后升級 even
composer require webman/event