Update to use global default loop with react/event-loop v1.2+ #1105
+15
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changeset updates to use the global default loop when available with react/event-loop v1.2+. This is part 11 of reviving Ratchet as discussed in #1054, unblocking more future progress.
Among others, this changeset simplifies usage by supporting the new default loop and avoids deprecated APIs (reactphp/event-loop#226 and upcoming reactphp/event-loop#274). For most consumers of this package, this change should not have any visible effect, given the old
Factory
sets the globalLoop
internally. Similar to #1095 and #1098, this was implemented in a way to use the newer API when available and the legacy APIs as a fallback. The test suite confirms this has full test coverage and does not otherwise affect any of the existing tests. In case this affects your usage, you may still pass an explicit loop instance to restore the previous behavior.Overall, this required quite a massive effort. If you want to support this project, please consider sponsoring @reactphp ❤️
Builds on top of reactphp/event-loop#226, 6512da0, #1098, #1095, #1088 and others, one step closer to reviving Ratchet as discussed in #1054
Resolves / closes #956