walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.16k stars 2.27k forks source link

Fatal error: Declaration of Workerman\Events\React\Base::cancelTimer(React\EventLoop\TimerInterface $timer) must be compatible with React\EventLoop\LoopInterface::cancelTimer(React\EventLoop\Timer\TimerInterface $timer) in W:\domains\crypter-chat\vendor\workerman\workerman\Events\React\Base.php on line 24 #551

Closed cr1gger closed 4 years ago

cr1gger commented 4 years ago

`Red Promo@DESKTOP-DEO3Q74 W:\domains\crypter-chat $ php yii server/start ----------------------- WORKERMAN ----------------------------- Workerman version:4.0.6 PHP version:7.2.22 ------------------------ WORKERS ------------------------------- worker listen processes status none websocket://0.0.0.0:2346 4 [ok]

Fatal error: Declaration of Workerman\Events\React\Base::cancelTimer(React\EventLoop\TimerInterface $timer) must be compatible with React\EventLoop\LoopInterface::cancelTimer(React\EventLoop\Timer\TimerInterface $timer) in W:\domains\crypter-chat\vendor\workerman\workerman\Events\React\Base.php on line 24 PHP Compile Error 'yii\base\ErrorException' with message 'Declaration of Workerman\Events\React\Base::cancelTimer(React\EventLoop\TimerInterface $timer) must be compatible with React\EventLoop\LoopInterface::cancelTimer(React\EventLoop\Timer\TimerInterface $timer)'

in W:\domains\crypter-chat\vendor\workerman\workerman\Events\React\Base.php:24

Stack trace:

0 W:\domains\crypter-chat\vendor\yiisoft\yii2\base\ErrorHandler.php(0): yii\console\ErrorHandler->handleFatalError()

1 W:\domains\crypter-chat\vendor\composer\ClassLoader.php(444): ::unknown()

2 W:\domains\crypter-chat\vendor\composer\ClassLoader.php(322): ::Composer\Autoload\includeFile()

3 W:\domains\crypter-chat\vendor\workerman\workerman\Events\React\StreamSelectLoop.php(20): Composer\Autoload\ClassLoader->loadClass()

4 W:\domains\crypter-chat\vendor\workerman\workerman\Events\React\StreamSelectLoop.php(20): ::spl_autoload_call()

5 W:\domains\crypter-chat\vendor\composer\ClassLoader.php(444): ::unknown()

6 W:\domains\crypter-chat\vendor\composer\ClassLoader.php(322): ::Composer\Autoload\includeFile()

7 W:\domains\crypter-chat\vendor\workerman\workerman\Worker.php(2373): Composer\Autoload\ClassLoader->loadClass()

8 W:\domains\crypter-chat\vendor\workerman\workerman\Worker.php(2373): ::spl_autoload_call()

9 W:\domains\crypter-chat\vendor\workerman\workerman\Worker.php(1404): Workerman\Worker->run()

10 W:\domains\crypter-chat\vendor\workerman\workerman\Worker.php(1347): Workerman\Worker::forkWorkersForWindows()

11 W:\domains\crypter-chat\vendor\workerman\workerman\Worker.php(546): Workerman\Worker::forkWorkers()

12 W:\domains\crypter-chat\commands\ServerController.php(38): Workerman\Worker::runAll()

13 W:\domains\crypter-chat\vendor\yiisoft\yii2\base\InlineAction.php(57): app\commands\ServerController->actionStart()

14 W:\domains\crypter-chat\vendor\yiisoft\yii2\base\InlineAction.php(57): ::call_user_func_array:{W:\domains\crypter-chat\vendor\yiisoft\yii2\base\InlineAction.php:57}()

15 W:\domains\crypter-chat\vendor\yiisoft\yii2\base\Controller.php(180): yii\base\InlineAction->runWithParams()

16 W:\domains\crypter-chat\vendor\yiisoft\yii2\console\Controller.php(181): app\commands\ServerController->runAction()

17 W:\domains\crypter-chat\vendor\yiisoft\yii2\base\Module.php(528): app\commands\ServerController->runAction()

18 W:\domains\crypter-chat\vendor\yiisoft\yii2\console\Application.php(180): yii\console\Application->runAction()

19 W:\domains\crypter-chat\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runAction()

20 W:\domains\crypter-chat\vendor\yiisoft\yii2\base\Application.php(386): yii\console\Application->handleRequest()

21 W:\domains\crypter-chat\yii(20): yii\console\Application->run()

22 {main}`

HOW TO FIX YII2 ?????

walkor commented 4 years ago

Try to remove react/event-loop by commandcomposer remove react/event-loop`

cr1gger commented 4 years ago

Thank you! Is working!