php webman ect_cycles 运行出错了 —— vendor中的问题 #336

Open
opened 2026-01-02 16:20:30 +08:00 by bigtran · 0 comments
Owner

➜ ectms-web php webman ect_cycles 20 full
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 /var/webman-dev/ectms-web/vendor/webman/event/src/EventListCommand.php on line 29
➜ ectms-web php webman ect_cycles 20
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 /var/webman-dev/ectms-web/vendor/webman/event/src/EventListCommand.php on line 29

问题原因:

错误是由于 webman/event 插件中的 EventListCommand 类与 Symfony Console 组件之间的方法签名不兼容导致的。

注释掉就解决了

image.png

➜ ectms-web php webman ect_cycles 20 full 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 /var/webman-dev/ectms-web/vendor/webman/event/src/EventListCommand.php on line 29 ➜ ectms-web php webman ect_cycles 20 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 /var/webman-dev/ectms-web/vendor/webman/event/src/EventListCommand.php on line 29 # 问题原因: 错误是由于 webman/event 插件中的 EventListCommand 类与 Symfony Console 组件之间的方法签名不兼容导致的。 # 注释掉就解决了 ![image.png](/attachments/c80ea382-32f6-47da-a7ba-44b98a079e14)
Sign in to join this conversation.