Skip to content

Improve PHP 8.5+ support by avoiding deprecated null array offset - #276

Merged
WyriHaximus merged 1 commit into
reactphp:3.xfrom
clue-labs:php8.5
Oct 25, 2026
Merged

WyriHaximus merged 1 commit into
reactphp:3.xfrom
clue-labs:php8.5

Conversation

@clue

@clue clue commented Oct 25, 2026

Copy link
Copy Markdown
Member

This changeset improves PHP 8.5+ support by avoiding a deprecated null array offset when cancelling and updates the test environment to run the test suite on PHP 8.5.

This only affects cancelling a pending race(), all() or any() without any cancellable inputs, which would report a deprecation notice on PHP 8.5 and otherwise work as expected. Promises from this package are always cancellable and plain values settle immediately. In practice, this only applies to third-party thenables without a cancel() method or to race([]), which is rarely useful, but returns a forever pending promise for consistency with other implementations as discussed in #83 and #207.

This is not backported to older versions, as Promise v2 does not support PHP 8.4+ anyway as discussed in #269, and v1 is not affected.

Builds on top of #275, #271, #264 and clue/framework-x#297
Refs #83, #207 and #269

@clue clue added this to the v3.4.0 milestone Oct 25, 2026
@clue
clue requested a review from WyriHaximus October 25, 2026 13:16
@WyriHaximus
WyriHaximus merged commit 63cde9c into reactphp:3.x Oct 25, 2026
19 checks passed
@clue
clue deleted the php8.5 branch October 25, 2026 23:09
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.

2 participants