WyriHaximus / reactphp-child-process-pool

MIT License
40 stars 9 forks source link

Release 1.7.0 breaks React\Filesystem\ChildProcess #69

Closed lucasnetau closed 3 years ago

lucasnetau commented 3 years ago

Release 1.7.0 breaks React\Filesystem\ChildProcess with

PHP Fatal error: Declaration of React\Filesystem\ChildProcess\Process::create(WyriHaximus\React\ChildProcess\Messenger\Messenger $messenger, React\EventLoop\LoopInterface $loop) must be compatible with WyriHaximus\React\ChildProcess\Messenger\ChildInterface::create(WyriHaximus\React\ChildProcess\Messenger\Messenger $messenger, React\EventLoop\LoopInterface $loop): void in /vendor/react/filesystem/src/ChildProcess/Process.php on line 18

library's composer.json recommends "wyrihaximus/react-child-process-messenger": "^3 || ^2.10.1" but version 3 is incompatible with the definition in React Filesystem (no return typehint void).

Workaround is to fix the version of wyrihaximus/react-child-process-messenger to ^2.10.1 in projects composer.json

Perhaps this 1.7.0 needs to be re-released as a version 2.0.0 so that it isn't automatically resolved as a dependancy from React Filesystem's composer.json "wyrihaximus/react-child-process-pool": "^1.3"

WyriHaximus commented 3 years ago

@lucasnetau I'm aware and looking into a fix. Also I'm more likely to fix this in react/filesystem, as all the work that want into this upgrade was to unlock PHP 8 for it, but the rewrite with PHP 8 support is also around the corner so weighing the options here at the moment. Will keep you posted.

WyriHaximus commented 3 years ago

Just did a few releases resolving this issue. Please reopen this issue if it somehow persists for you.