callable(mixed) to callable(TIn) in __construct() $handler parameter#48
callable(mixed) to callable(TIn) in __construct() $handler parameter#48
callable(mixed) to callable(TIn) in __construct() $handler parameter#48Conversation
…rameter This allows to create a new instance of `Queue` with a typed input parameter on the `$handler` callable
|
Hey @devnix, thanks for bringing this up 👍 This seems like a good idea, but it also scratches the service of the overall bigger topic of adding more type definitions. Additionally, we currently don't have a way to confirm these changes work as expected and the only way for this would be to add PHPStan to our test environment. Getting PHPStan to also run with all the legacy PHP versions makes this whole topic way more complicated. This is also one reason why we didn't backport the PHPStan addition in Promise to The plan is to bring out ReactPHP v3 first and raise the minimal supported PHP version to PHP 7.1+. We can then go ahead and support the new major versions in our other projects (like this one here ), but we'd also have to release a new major version (v3) here as well and there are no specific plans yet if this project will actually receive one. I appreciate your input, but I think we'll have to postpone this and keep focusing on ReactPHP v3. I'll close this ticket for now, so let's revisit this in the future 👍 |
This allows to create a new instance of
Queuewith a typed input parameter on the$handlercallable