Sync Promises 3.1 and use PHP 8.4 tooling

Merged
BI
2d ago
+222-129

This brings the fork up to upstream Promises 3.1.0 while keeping its coroutine ownership checks and scoped task queues.

Upstream adds State with explicit method names and deprecates Is for PHP 8.6 compatibility. Internal calls and tests now use State; existing callers of Is keep working through upstream's deprecation handling. The public promise interfaces are unchanged.

Static checks now run on PHP 8.4 with Swoole, using the same environment as the fork runtime. This removes the separate PHP 7.4 setup and Composer platform exceptions. Tool versions stay the same, and the formatter keeps upstream's comma style so this does not rewrite unrelated source.

The upstream merge is retained in Git history. This targets the new 3.1 branch and prepares the fork for a matching release; it does not remove earlier release tags.

Validation: PHP-CS-Fixer, PHPStan, Composer normalization and the promises test suite pass. The candidate also passes the affected Hypervel HTTP, broadcasting and SDK integration tests alongside the updated Guzzle fork.


Summary by cubic

Syncs the fork to upstream Promises 3.1.0 while keeping its coroutine ownership checks and scoped task queues. The upstream merge is retained in Git history; this targets the new 3.1 branch and does not remove earlier release tags.

State API

  • Adds State with explicit method names and deprecates Is, which PHP 8.6 disallows as a class name.
  • Internal calls and tests now use State; existing callers of Is keep working through the deprecation handling.
  • The public promise interfaces are unchanged.

Tooling

  • Static checks now run on PHP 8.4 with Swoole, removing the PHP 7.4 setup and Composer platform exceptions.
  • Tool versions stay the same and the formatter keeps upstream's comma style so this does not rewrite unrelated source.
  • PHP-CS-Fixer, PHPStan, Composer normalization, and the test suite pass, as do the affected Hypervel HTTP, broadcasting, and SDK integration tests.

Summary by CodeRabbit

  • New Features
    • Added State checks for pending, settled, fulfilled, and rejected promises.
  • Updates
    • Promise state checks now use State. The existing Is checks are deprecated and will be removed in version 4.0; callers should use the corresponding State checks instead.
    • Updated promise API documentation and added the 3.1.0 changelog entry.