easyswoole升级到3.2.3 遇到的问题

葛宪
2023-12-01

关于热重载时 注册子进程时 启动报错

PHP Fatal error: Uncaught ArgumentCountError: Swoole\Process::__construct() expects at most 3 parameters, 4 given in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php:32
Stack trace:
#0 /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php(32): Swoole\Process->__construct(Array, false, 2, false)
#1 /data/www/es/EasySwooleEvent.php(43): EasySwoole\Component\Process\AbstractProcess->__construct(‘HotReload’, Array)
#2 /data/www/es/vendor/easyswoole/easyswoole/src/Core.php(124): EasySwoole\EasySwoole\EasySwooleEvent::mainServerCreate(Object(EasySwoole\EasySwoole\Swoole\EventRegister))
#3 /data/www/es/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()
#4 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(44): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)
#5 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(52): EasySwoole\EasySwoole\Command\CommandContainer->hook(’ in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php on line 32

Fatal error: Uncaught ArgumentCountError: Swoole\Process::__construct() expects at most 3 parameters, 4 given in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php:32
Stack trace:
#0 /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php(32): Swoole\Process->__construct(Array, false, 2, false)
#1 /data/www/es/EasySwooleEvent.php(43): EasySwoole\Component\Process\AbstractProcess->__construct(‘HotReload’, Array)
#2 /data/www/es/vendor/easyswoole/easyswoole/src/Core.php(124): EasySwoole\EasySwoole\EasySwooleEvent::mainServerCreate(Object(EasySwoole\EasySwoole\Swoole\EventRegister))
#3 /data/www/es/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()
#4 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(44): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)
#5 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(52): EasySwoole\EasySwoole\Command\CommandContainer->hook(’ in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php on line 32
[2019-05-20 11:36:31][FatalError][file:/data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php][line:32]Uncaught ArgumentCountError: Swoole\Process::__construct() expects at most 3 parameters, 4 given in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php:32
Stack trace:
#0 /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php(32): Swoole\Process->__construct(Array, false, 2, false)
#1 /data/www/es/EasySwooleEvent.php(43): EasySwoole\Component\Process\AbstractProcess->__construct(‘HotReload’, Array)
#2 /data/www/es/vendor/easyswoole/easyswoole/src/Core.php(124): EasySwoole\EasySwoole\EasySwooleEvent::mainServerCreate(Object(EasySwoole\EasySwoole\Swoole\EventRegister))
#3 /data/www/es/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()
#4 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(44): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)
#5 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(52): EasySwoole\EasySwoole\Command\CommandContainer->hook(’
[root@localhost es]# php easyswoole start
PHP Fatal error: Uncaught ArgumentCountError: Swoole\Process::__construct() expects at most 3 parameters, 4 given in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php:32
Stack trace:
#0 /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php(32): Swoole\Process->__construct(Array, false, 2, true)
#1 /data/www/es/EasySwooleEvent.php(43): EasySwoole\Component\Process\AbstractProcess->__construct(‘HotReload’, Array)
#2 /data/www/es/vendor/easyswoole/easyswoole/src/Core.php(124): EasySwoole\EasySwoole\EasySwooleEvent::mainServerCreate(Object(EasySwoole\EasySwoole\Swoole\EventRegister))
#3 /data/www/es/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()
#4 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(44): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)
#5 /data/www/es/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(52): EasySwoole\EasySwoole\Command\CommandContainer->hook('s in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php on line 32

Fatal error: Uncaught ArgumentCountError: Swoole\Process::__construct() expects at most 3 parameters, 4 given in /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php:32
Stack trace:
#0 /data/www/es/vendor/easyswoole/component/src/Process/AbstractProcess.php(32): Swoole\Process->__construct(Array, false, 2, true)
#1 /data/www/es/EasySwooleEvent.php(43): EasySwoole\Component\Process\AbstractProcess->__co

解决方案

估计是swoole版本过低的问题,重新安装swoole 4.3.5搞定!
从新编译时记得开抢OpenSSL

 类似资料: