PackageTrack
Sign in Get early access

react/async

Async utilities and fibers for ReactPHP

v4.3.0 10.0M downloads/mo #1085 most downloaded on Packagist reactphp/async

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Ships unpredictably

gaps range from 5 months to 9.4 years

Nearly every release is documented

notes for 11 of 11 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

11 releases · first in 2013

0 releases in the last 12 months

see the full history below

Release timeline

11 releases · Feb 2013 to Jun 2024
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 11
  1. v4.3.0 04 Jun 2024
    Release notes
    • Feature: Improve performance by avoiding unneeded references in FiberMap.
      (#88 by @clue)

    • Feature: Improve PHP 8.4+ support by avoiding implicitly nullable type declarations.
      (#87 by @clue)

    • Improve type safety for test environment.
      (#86 by @SimonFrings)

    Open source →
    Release notes
    • Feature: Improve performance by avoiding unneeded references in FiberMap. (#88 by @clue)

    • Feature: Improve PHP 8.4+ support by avoiding implicitly nullable type declarations. (#87 by @clue)

    • Improve type safety for test environment. (#86 by @SimonFrings)

    Open source →
  2. v4.2.0 22 Nov 2023
    Release notes
    • Feature: Add Promise v3 template types for all public functions.
      (#40 by @WyriHaximus and @clue)

      All our public APIs now use Promise v3 template types to guide IDEs and static
      analysis tools (like PHPStan), helping with proper type usage and improving
      code quality:

      assertType('bool', await(resolve(true)));
      assertType('PromiseInterface<bool>', async(fn(): bool => true)());
      assertType('PromiseInterface<bool>', coroutine(fn(): bool => true));
    • Feature: Full PHP 8.3 compatibility.
      (#81 by @clue)

    • Update test suite to avoid unhandled promise rejections.
      (#79 by @clue)

    Open source →
    Release notes
    • Feature: Add Promise v3 template types for all public functions. (#40 by @WyriHaximus and @clue)

      All our public APIs now use Promise v3 template types to guide IDEs and static analysis tools (like PHPStan), helping with proper type usage and improving code quality:

      assertType('bool', await(resolve(true)));
      assertType('PromiseInterface<bool>', async(fn(): bool => true)());
      assertType('PromiseInterface<bool>', coroutine(fn(): bool => true));
      
    • Feature: Full PHP 8.3 compatibility. (#81 by @clue)

    • Update test suite to avoid unhandled promise rejections. (#79 by @clue)

    Open source →
  3. v4.1.0 22 Jun 2023
    Release notes
    • Feature: Add new delay() function to delay program execution.
      (#69 and #78 by @clue)

      echo 'a';
      Loop::addTimer(1.0, function () {
          echo 'b';
      });
      React\Async\delay(3.0);
      echo 'c';
      
      // prints "a" at t=0.0s
      // prints "b" at t=1.0s
      // prints "c" at t=3.0s
    • Update test suite, add PHPStan with max level and report failed assertions.
      (#66 and #76 by @clue and #61 and #73 by @WyriHaximus)

    Open source →
    Release notes
    • Feature: Add new delay() function to delay program execution. (#69 and #78 by @clue)

      echo 'a';
      Loop::addTimer(1.0, function () {
          echo 'b';
      });
      React\Async\delay(3.0);
      echo 'c';
      
      // prints "a" at t=0.0s
      // prints "b" at t=1.0s
      // prints "c" at t=3.0s
      
    • Update test suite, add PHPStan with max level and report failed assertions. (#66 and #76 by @clue and #61 and #73 by @WyriHaximus)

    Open source →
  4. v4.0.0 11 Jul 2022
    Release notes

    A major new feature release, see release announcement.

    • We'd like to emphasize that this component is production ready and battle-tested.
      We plan to support all long-term support (LTS) releases for at least 24 months,
      so you have a rock-solid foundation to build on top of.

    • The v4 release will be the way forward for this package. However, we will still
      actively support v3 and v2 to provide a smooth upgrade path for those not yet
      on PHP 8.1+. If you're using an older PHP version, you may use either version
      which all provide a compatible API but may not take advantage of newer language
      features. You may target multiple versions at the same time to support a wider range of
      PHP versions:

    This update involves some major new features and a minor BC break over the
    v3.0.0 release. We've tried hard to avoid BC breaks where possible and
    minimize impact otherwise. We expect that most consumers of this package will be
    affected by BC breaks, but updating should take no longer than a few minutes.
    See below for more details:

    • Feature / BC break: Require PHP 8.1+ and add mixed type declarations.
      (#14 by @clue)

    • Feature: Add Fiber-based async() and await() functions.
      (#15, #18, #19 and #20 by @WyriHaximus and #26, #28, #30, #32, #34, #55 and #57 by @clue)

    • Project maintenance, rename main branch to 4.x and update installation instructions.
      (#29 by @clue)

    The following changes had to be ported to this release due to our branching
    strategy, but also appeared in the v3.0.0 release:

    • Feature: Support iterable type for parallel() + series() + waterfall().
      (#49 by @clue)

    • Feature: Forward compatibility with upcoming Promise v3.
      (#48 by @clue)

    • Minor documentation improvements.
      (#36 by @SimonFrings and #51 by @nhedger)

    Open source →
    Release notes

    A major new feature release, see release announcement.

    • We'd like to emphasize that this component is production ready and battle-tested. We plan to support all long-term support (LTS) releases for at least 24 months, so you have a rock-solid foundation to build on top of.

    • The v4 release will be the way forward for this package. However, we will still actively support v3 and v2 to provide a smooth upgrade path for those not yet on PHP 8.1+. If you're using an older PHP version, you may use either version which all provide a compatible API but may not take advantage of newer language features. You may target multiple versions at the same time to support a wider range of PHP versions:

    This update involves some major new features and a minor BC break over the v3.0.0 release. We've tried hard to avoid BC breaks where possible and minimize impact otherwise. We expect that most consumers of this package will be affected by BC breaks, but updating should take no longer than a few minutes. See below for more details:

    • Feature / BC break: Require PHP 8.1+ and add mixed type declarations. (#14 by @clue)

    • Feature: Add Fiber-based async() and await() functions. (#15, #18, #19 and #20 by @WyriHaximus and #26, #28, #30, #32, #34, #55 and #57 by @clue)

    • Project maintenance, rename main branch to 4.x and update installation instructions. (#29 by @clue)

    The following changes had to be ported to this release due to our branching strategy, but also appeared in the v3.0.0 release:

    • Feature: Support iterable type for parallel() + series() + waterfall(). (#49 by @clue)

    • Feature: Forward compatibility with upcoming Promise v3. (#48 by @clue)

    • Minor documentation improvements. (#36 by @SimonFrings and #51 by @nhedger)

    Open source →
  5. v3.2.0 22 Nov 2023
    Release notes

    This release contains backported features from the Async v4.2.0 release for those
    not yet on PHP 8.1+. Async v3 provides a compatible API, but may not take advantage
    of newer language features. We encourage upgrading to the latest version when possible.

    • Feature: Add Promise v3 template types for all public functions.
      (#82 by @WyriHaximus and @clue)

      All our public APIs now use Promise v3 template types to guide IDEs and static
      analysis tools (like PHPStan), helping with proper type usage and improving
      code quality:

      assertType('bool', await(resolve(true)));
      assertType('PromiseInterface<bool>', coroutine(fn(): bool => true));
    • Feature: Full PHP 8.3 compatibility.
      (#83 by @clue)

    • Update test suite to avoid unhandled promise rejections.
      (#80 by @clue)

    Open source →
  6. v3.1.0 22 Jun 2023
    Release notes
    • Feature: Add new delay() function to delay program execution.
      (#71 by @clue)

      echo 'a';
      Loop::addTimer(1.0, function () {
          echo 'b';
      });
      React\Async\delay(3.0);
      echo 'c';
      
      // prints "a" at t=0.0s
      // prints "b" at t=1.0s
      // prints "c" at t=3.0s
    • Update test suite, add PHPStan with max level and report failed assertions.
      (#67 and #77 by @clue and #60 and #74 by @WyriHaximus)

    Open source →
  7. v3.0.0 11 Jul 2022
    Release notes

    A major new feature release, see release announcement.

    • We'd like to emphasize that this component is production ready and battle-tested.
      We plan to support all long-term support (LTS) releases for at least 24 months,
      so you have a rock-solid foundation to build on top of.

    • The v4 release will be the way forward for this package. However, we will still
      actively support v3 and v2 to provide a smooth upgrade path for those not yet
      on PHP 8.1+. If you're using an older PHP version, you may use either version
      which all provide a compatible API but may not take advantage of newer language
      features. You may target multiple versions at the same time to support a wider range of
      PHP versions:

    This update involves some major new features and a minor BC break over the
    v2.0.0 release. We've tried hard to avoid BC breaks where possible and
    minimize impact otherwise. We expect that most consumers of this package will be
    affected by BC breaks, but updating should take no longer than a few minutes.
    See below for more details:

    • Feature / BC break: Require PHP 7.1+ and add type declarations.
      (#11 by @clue)

    • Feature: Add Generator-based coroutine() function.
      (#12, #13 and #54 by @clue)

    • Feature: Support iterable type for parallel() + series() + waterfall().
      (#45 by @clue)

    The following changes had to be ported to this release due to our branching
    strategy, but also appeared in the v2.0.0 release:

    • Feature: Only stop loop for await() if a pending promise resolves/rejects.
      (#33 by @SimonFrings)

    • Feature: Forward compatibility with upcoming Promise v3.
      (#47 by @clue)

    • Minor documentation improvements.
      (#37 by @SimonFrings and #52 by @nhedger)

    Open source →
    Release notes

    See 3.x CHANGELOG for more details.

    Open source →
  8. v2.2.0 22 Nov 2023
    Release notes

    This is a compatibility release to ensure a smooth upgrade path for those not yet
    on Async v4 or v3. We encourage upgrading to the latest version when possible, as
    Async v4 will be the way forward for this project.

    • Feature: Full PHP 8.3 compatibility.
      (#84 by @clue)
    Open source →
  9. v2.1.0 22 Jun 2023
    Release notes
    • Feature: Add new delay() function to delay program execution.
      (#72 by @clue)

      echo 'a';
      Loop::addTimer(1.0, function () {
          echo 'b';
      });
      React\Async\delay(3.0);
      echo 'c';
      
      // prints "a" at t=0.0s
      // prints "b" at t=1.0s
      // prints "c" at t=3.0s
    • Update test suite, run tests on PHP 8.2 and report failed assertions.
      (#59 and #75 by @WyriHaximus and #68 by @clue)

    Open source →
  10. v2.0.0 11 Jul 2022
    Release notes

    A major new feature release, see release announcement.

    • We'd like to emphasize that this component is production ready and battle-tested.
      We plan to support all long-term support (LTS) releases for at least 24 months,
      so you have a rock-solid foundation to build on top of.

    • The v4 release will be the way forward for this package. However, we will still
      actively support v3 and v2 to provide a smooth upgrade path for those not yet
      on PHP 8.1+. If you're using an older PHP version, you may use either version
      which all provide a compatible API but may not take advantage of newer language
      features. You may target multiple versions at the same time to support a wider range of
      PHP versions:

    This update involves some major changes over the previous v1.0.0 release that
    has been deprecated since 2013. Accordingly, most consumers of this package
    should not be affected by any BC breaks. See below for more details:

    • Feature / BC break: Change to Promise-based APIs instead of callbacks (continuation-passing style).
      Support promise cancellation and upcoming Promise v3.
      (#6, #7, #9 and #46 by @clue)

    • Feature: Add new await() function (import from clue/reactphp-block).
      (#8 by @clue and #39 by @SimonFrings)

    • Minor documentation improvements.
      (#38 by @SimonFrings and #53 by @nhedger)

    • Improve test suite and add .gitattributes to exclude dev files from exports.
      Run tests on PHP 8.1, PHPUnit 9, switch to GitHub actions and clean up test suite.
      (#2, #3, #4, #5 and #10 by @clue)

    Open source →
    Release notes

    See 2.x CHANGELOG for more details.

    Open source →
  11. v1.0.0 06 Feb 2013
    Release notes
    • First tagged release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive