use React\EventLoop\LoopInterface;
use WyriHaximus\React\ChildProcess\Messenger\ChildInterface;
use WyriHaximus\React\ChildProcess\Messenger\Messages\Payload;
use WyriHaximus\React\ChildProcess\Messenger\Messenger;
I debuged this code and exception throws here:
on line 52
if (!\is_subclass_of($class, 'WyriHaximus\React\ChildProcess\Messenger\ChildInterface')) { throw new \Exception('Given class doesn\'t implement ChildInterface'); }
But my class NewTestChild implements ChildInterface
Maybe someone knows what the proble may be?
Hello, when i use Flexible::createFromClass i have got error. - Given class doesn't implement ChildInterface. Here my code:
Flexible::createFromClass(NewTestChild::class, $loop, $options) ->then(function (PoolInterface $pool) { try { $pool->rpc(MessagesFactory::rpc('return', [ 'i' => 1, 'time' => time() ]))->then(function (Payload $payload) use ($pool) { echo $payload['i'], PHP_EOL; echo $payload['time'], PHP_EOL; }); } catch (\Exception $e) { var_dump($e->getMessage()); } }); $loop->run();
My NewTestChild looks like:
`<?php
namespace childs\child;
use React\EventLoop\LoopInterface; use WyriHaximus\React\ChildProcess\Messenger\ChildInterface; use WyriHaximus\React\ChildProcess\Messenger\Messages\Payload; use WyriHaximus\React\ChildProcess\Messenger\Messenger;
class NewTestChild implements ChildInterface {
}`
I debuged this code and exception throws here: on line 52
if (!\is_subclass_of($class, 'WyriHaximus\React\ChildProcess\Messenger\ChildInterface')) { throw new \Exception('Given class doesn\'t implement ChildInterface'); }
But my class NewTestChild implements ChildInterface Maybe someone knows what the proble may be?