Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callable(mixed) to callable(TIn) in __construct() $handler parameter #48

Closed
wants to merge 1 commit into from

Conversation

devnix
Copy link

@devnix devnix commented Apr 22, 2024

This allows to create a new instance of Queue with a typed input parameter on the $handler callable

…rameter

This allows to create a new instance of `Queue` with a typed input parameter on the `$handler` callable
@SimonFrings
Copy link
Collaborator

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 v2 and v1 and in Async to v2.

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants