PackageTrack
Sign in Get early access

amphp/amp

A non-blocking concurrency framework for PHP applications.

v3.1.3 141M downloads/mo #289 most downloaded on Packagist amphp/amp

What this package is like to depend on

Last release 1 months ago

19 Jul 2026

Release timing varies

gaps range from 1 weeks to 1.3 years

Rarely documented

notes for 10 of 81 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

102 releases · first in 2013

3 releases in the last 12 months

see the full history below

Release timeline

102 releases · Aug 2013 to Jul 2026
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 60 of 102
  1. v3.1.3 19 Jul 2026
    Release notes

    What's Changed

    • Fixed garbage collection of the iterable returned from Future::iterate() when the source iterable is a Traversable. Previously, iteration would continue even if the returned iterable was destroyed.

    Full Changelog: v3.1.2...v3.1.3

    Open source →
  2. v3.1.2 21 Jun 2026
    Release notes

    What's Changed

    • Fixed detection of AMP_DEBUG when set as a PHP constant when a falsey environment AMP_DEBUG value is present
    • Forbid cloning and serialization of Interval to prevent cancellation of event-loop callbacks from the original object for cloning or arbitrary callbacks on deserialization

    Full Changelog: v3.1.1...v3.1.2

    Open source →
  3. v3.1.1 27 Aug 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v3.1.0...v3.1.1

    Open source →
  4. v3.1.0 26 Jan 2025
    Release notes

    What's Changed

    • Add Interval by @trowski in #441
    • Added a throwing __unserialize method to ForbidSerialization to guard against malicious payloads unserializing to forbidden class instances.

    New Contributors

    Full Changelog: v3.0.2...v3.1.0

    Open source →
  5. v3.0.2 10 May 2024
    Release notes

    What's Changed

    • Changed Closure(mixed...) annotation to Closure(...) to support PHPStan.

    Full Changelog: v3.0.1...v3.0.2

    Open source →
  6. v3.0.1 18 Apr 2024
    Release notes

    What's Changed

    • Fixed compatibility of Amp\weakClosure() with changes made to closure names in PHP 8.4.

    Full Changelog: v3.0.0...v3.0.1

    Open source →
  7. v3.0.0 18 Dec 2022
    Release notes

    Event Loop

    Amp no longer ships its own event loop. It's now based on Revolt. Revolt\EventLoop is quite similar to Amp's previous Amp\Loop. A very important difference is using float $seconds instead of int $milliseconds for timers though!

    Promises

    Future is a replacement for the previous Promise.
    There's no need for callbacks or yield anymore!
    Its await() method is based on fibers and replaces generator based coroutines / Amp\Promise\wait().

    • Renamed Amp\Deferred to Amp\DeferredFuture.
    • Removed Amp\Promise\wait(): Use Amp\Future::await() instead, which can be called in any (nested) context unlike before.
    • Removed Amp\call(): Remove the passed closure boilerplate and all yield keywords, interruption is handled via fibers now instead of generator coroutines.
    • Removed Amp\asyncCall(): Replace invocations with Amp\async(), which starts a new fiber instead of using generators.
    • Removed Amp\coroutine(): There's no direct replacement.
    • Removed Amp\asyncCoroutine(): There's no direct replacement.
    • Removed Amp\Promise\timeout(): Future::await() accepts an optional Cancellation, which can be used as a replacement.
    • Removed Amp\Promise\rethrow(): Unhandled errors are now automatically thrown into the event loop, so there's no need for that function anymore.
    • Unhandled errors can be ignored using Future::ignore() if needed, but should usually be handled in some way.
    • Removed Amp\Promise\wrap(): Use Future::finally() instead.
    • Renamed Amp\getCurrentTime() to Amp\now() returning the time in seconds instead of milliseconds.
    • Changed Amp\delay() to accept the delay in seconds now instead of milliseconds.
    • Added Amp\weakClosure() to allow a class to hold a self-referencing Closure without creating a circular reference that prevents automatic garbage collection.
    • Added Amp\trapSignal() to await one or multiple signals.

    Promise Combinators

    Promise combinators have been renamed:

    • Amp\Promise\race() has been renamed to Amp\Future\awaitFirst()
    • Amp\Promise\first() has been renamed to Amp\Future\awaitAny()
    • Amp\Promise\some() has been renamed to Amp\Future\awaitAnyN()
    • Amp\Promise\any() has been renamed to Amp\Future\awaitAll()
    • Amp\Promise\all() has been renamed to Amp\Future\await()

    CancellationToken

    • CancellationToken has been renamed to Cancellation.
    • CancellationTokenSource has been renamed to DeferredCancellation.
    • NullCancellationToken has been renamed to NullCancellation.
    • TimeoutCancellationToken has been renamed to TimeoutCancellation.
    • CombinedCancellationToken has been renamed to CompositeCancellation.
    • SignalCancellation has been added.

    Iterators

    Iterators have been removed from amphp/amp as normal PHP iterators can be used with fibers now and there's no need for a separate API.
    However, there's still some need for concurrent iterators, which is covered by the new amphp/pipeline library now.

    Closable

    Amp\Closable has been added as a new basic interface for closable resources such as streams or sockets.

    Strict Types

    Strict types now declared in all library files.
    This will affect callbacks invoked within this library's code which use scalar types as parameters.
    Functions used with Amp\async() are the most likely to be affected by this change — these functions will now be invoked within a strict-types context.

    Open source →
  8. v3.0.0-beta.11 16 Dec 2022 pre-release

    Nothing published for this version

  9. v3.0.0-beta.10 06 Nov 2022 pre-release

    Nothing published for this version

  10. v3.0.0-beta.9 12 Jul 2022 pre-release

    Nothing published for this version

  11. v3.0.0-beta.8 25 Jun 2022 pre-release

    Nothing published for this version

  12. v3.0.0-beta.7 14 Jun 2022 pre-release

    Nothing published for this version

  13. v3.0.0-beta.6 20 Apr 2022 pre-release

    Nothing published for this version

  14. v3.0.0-beta.5 03 Apr 2022 pre-release

    Nothing published for this version

  15. v3.0.0-beta.4 16 Jan 2022 pre-release

    Nothing published for this version

  16. v3.0.0-beta.3 12 Dec 2021 pre-release

    Nothing published for this version

  17. v3.0.0-beta.2 03 Dec 2021 pre-release

    Nothing published for this version

  18. v3.0.0-beta.1 03 Dec 2021 pre-release

    Nothing published for this version

  19. v2.6.5 03 Sep 2025
    Release notes

    What's Changed

    Full Changelog: v2.6.4...v2.6.5

    Open source →
  20. v2.6.4 21 Mar 2024
    Release notes

    What's Changed

    • Fix optional before required parameter deprecation

    Full Changelog: v2.6.3...v2.6.4

    Open source →
  21. v2.6.3 21 Mar 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v2.6.2...v2.6.3

    Open source →
  22. v2.6.2 20 Feb 2022

    Nothing published for this version

  23. v2.6.1 23 Sep 2021

    Nothing published for this version

  24. v2.6.0 16 Jul 2021

    Nothing published for this version

  25. v2.5.2 10 Jan 2021

    Nothing published for this version

  26. v2.5.1 03 Nov 2020

    Nothing published for this version

  27. v2.5.0 14 Jul 2020

    Nothing published for this version

  28. v2.4.4 30 Apr 2020

    Nothing published for this version

  29. v2.4.3 19 Apr 2020

    Nothing published for this version

  30. v2.4.2 04 Apr 2020

    Nothing published for this version

  31. v2.4.1 10 Feb 2020

    Nothing published for this version

  32. v2.4.0 11 Nov 2019

    Nothing published for this version

  33. v2.3.2 26 Oct 2019

    Nothing published for this version

  34. v2.3.1 01 Oct 2019

    Nothing published for this version

  35. v2.3.0 01 Oct 2019

    Nothing published for this version

  36. v2.2.1 21 Sep 2019

    Nothing published for this version

  37. v2.2.0 02 Aug 2019

    Nothing published for this version

  38. v2.1.2 31 May 2019

    Nothing published for this version

  39. v2.1.1 11 Dec 2018

    Nothing published for this version

  40. v2.1.0 10 Dec 2018

    Nothing published for this version

  41. v2.0.7 30 Apr 2018

    Nothing published for this version

  42. v2.0.6 27 Jan 2018

    Nothing published for this version

  43. v2.0.5 19 Dec 2017

    Nothing published for this version

  44. v2.0.4 05 Dec 2017

    Nothing published for this version

  45. v2.0.3 07 Nov 2017

    Nothing published for this version

  46. v2.0.2 19 Sep 2017

    Nothing published for this version

  47. v2.0.1 09 Jul 2017

    Nothing published for this version

  48. v2.0.0 15 Jun 2017

    Nothing published for this version

  49. v2.0.0-RC4 09 Jun 2017 pre-release

    Nothing published for this version

  50. v2.0.0-RC3 24 May 2017 pre-release

    Nothing published for this version

  51. v2.0.0-RC2 16 May 2017 pre-release

    Nothing published for this version

  52. v2.0.0-RC1 04 May 2017 pre-release

    Nothing published for this version

  53. v1.2.2 12 May 2016

    Nothing published for this version

  54. v1.2.1 12 May 2016

    Nothing published for this version

  55. v1.2.0 11 May 2016

    Nothing published for this version

  56. v1.1.1 11 May 2016

    Nothing published for this version

  57. v1.1.0 09 Mar 2016

    Nothing published for this version

  58. v1.0.8 22 Feb 2016

    Nothing published for this version

  59. v1.0.7 09 Jan 2016

    Nothing published for this version

  60. v1.0.6 16 Nov 2015

    Nothing published for this version

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