Build fast, concurrent applications with PHP
                Benefit from concurrency by replacing your blocking I/O with non-blocking I/O,
                or designing your system with non-blocking I/O from the ground up.
            
We shipped fibers in PHP 8.1 to extend its capabilities for concurrent applications.
The PHP standard library has already provided everything else we needed for years now, but it only ships the low-level building blocks. AMPHP provides higher-level libraries using non-blocking I/O under the hood. Fibers allow these libraries to just work, no matter whether they're used in concurrent or traditional contexts.
Latest Releases
- 
                
                
                
                
                amphp/parallel 2.3.2
What’s Changed
- Use 
str_increment()to fix PHP 8.5 deprecation by @nicolas-grekas in https://github.com/amphp/parallel/pull/222 - Add .github and psalm.xml to export-ignore by @savinmikhail in https://github.com/amphp/parallel/pull/210
 
New Contributors
- @savinmikhail made their first contribution in https://github.com/amphp/parallel/pull/210
 - @nicolas-grekas made their first contribution in https://github.com/amphp/parallel/pull/222
 
Full Changelog: https://github.com/amphp/parallel/compare/v2.3.1…v2.3.2
 - Use 
 - 
                
                
                
                
                amphp/amp 3.1.1
What’s Changed
- Improve 
weakClosure()signature by @vudaltsov in https://github.com/amphp/amp/pull/452 - Use 
str_increment()to fix PHP 8.5 deprecation by @nicolas-grekas in https://github.com/amphp/amp/pull/456 
New Contributors
- @vudaltsov made their first contribution in https://github.com/amphp/amp/pull/452
 
Full Changelog: https://github.com/amphp/amp/compare/v3.1.0…v3.1.1
 - Improve 
 - 
                
                
                
                
                amphp/php-cs-fixer-config 2.1.1
- Fix formatting of 
str_increment 
Full Changelog: https://github.com/amphp/php-cs-fixer-config/compare/v2.1.0…v2.1.1
 - Fix formatting of 
 - 
                
                
                
                
                amphp/websocket-client 2.0.2
What’s Changed
- Fix 
League\Uri\Httpdeprecation warning by @foxycode in https://github.com/amphp/websocket-client/pull/56 
Full Changelog: https://github.com/amphp/websocket-client/compare/v2.0.1…v2.0.2
 - Fix 
 - 
                
                
                
                
                amphp/http-client 5.3.4
What’s Changed
- Fixed an issue where an HTTP/2 connection was closed unexpectedly, on rare occasions an exception was being thrown to the event-loop error handler
 - Made an optimization when shutting down an HTTP/2 connection to only create an exception instance if there are outstanding requests on the connection.
 
Full Changelog: https://github.com/amphp/http-client/compare/v5.3.3…v5.3.4
 - 
                
                
                
                
                amphp/http-client-guzzle-adapter 1.1.3
What’s Changed
- Improved curl options check by @root-aza in https://github.com/amphp/http-client-guzzle-adapter/pull/4
 
New Contributors
- @root-aza made their first contribution in https://github.com/amphp/http-client-guzzle-adapter/pull/4
 
Full Changelog: https://github.com/amphp/http-client-guzzle-adapter/compare/v1.1.2…v1.1.3
 - 
                
                
                
                
                amphp/sql-common 2.0.3
What’s Changed
- Added a reference to $this in the returned 
GeneratorfromSqlPooledResult::getIterator()to prevent destruction of theSqlPooledResultwhile the returnedGeneratorobject exists. 
Full Changelog: https://github.com/amphp/sql-common/compare/v2.0.2…v2.0.3
 - Added a reference to $this in the returned 
 - 
                
                
                
                
                amphp/http-server 3.4.3
What’s Changed
- Avoid hanging requests in case a request body is closed prematurely by @danog in https://github.com/amphp/http-server/pull/380
 - Fix parsing of raw ipv6 address in host header by @luzrain in https://github.com/amphp/http-server/pull/378
 
New Contributors
- @danog made their first contribution in https://github.com/amphp/http-server/pull/380
 
Full Changelog: https://github.com/amphp/http-server/compare/v3.4.2…v3.4.3
 - 
                
                
                
                
                amphp/byte-stream 2.1.2
- Fixed the exception type thrown if 
ReadableIterableStreamis closed (Amp\Pipeline\DisposedExceptionwas leaked, now anAmp\ByteStream\ClosedExceptionis thrown). 
Full Changelog: https://github.com/amphp/byte-stream/compare/v2.1.1…v2.1.2
 - Fixed the exception type thrown if 
 - 
                
                
                
                
                amphp/pipeline 1.2.3
- Fixed failing any pending value consumption when a 
Queueis disposed (regression in1.2.2). 
Full Changelog: https://github.com/amphp/pipeline/compare/v1.2.2…v1.2.3
 - Fixed failing any pending value consumption when a 
 - 
                
                
                
                
                amphp/http-tunnel 2.0.0
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of
Promise<ResolutionType>have been replaced withResolutionType.This library provides an implementation of
Amp\Socket\SocketConnectorfromamphp/socketwhich establishes a socket connection via an HTTP/1.1CONNECTrequest to a proxy. - 
                
                
                
                
                amphp/dns 2.4.0
What’s Changed
- Replaced WMIC nameserver lookup with PowerShell equivalent by @Bilge in https://github.com/amphp/dns/pull/116
 
Full Changelog: https://github.com/amphp/dns/compare/v2.3.0…v2.4.0
 - 
                
                
                
                
                amphp/redis 2.0.3
What’s Changed
- Dropped support for 
league/[email protected] 
Full Changelog: https://github.com/amphp/redis/compare/v2.0.2…v2.0.3
 - Dropped support for 
 - 
                
                
                
                
                amphp/cluster 2.0.1
What’s Changed
- Report ExitFailures from cluster worker exits by @bwoebi in https://github.com/amphp/cluster/pull/21
 
New Contributors
- @bwoebi made their first contribution in https://github.com/amphp/cluster/pull/21
 
Full Changelog: https://github.com/amphp/cluster/compare/v2.0.0…v2.0.1
 - 
                
                
                
                
                amphp/file 3.2.0
What’s Changed
- The parallel driver no longer reuses the global worker pool if a specific instance is not provided to the constructor. Instead, a new worker pool is created.
 - The 
$workerLimitparameter to the constructor ofParallelFilesystemDriveris now deprecated. Pass an instance ofLimitedWorkerPoolinstead. 
Full Changelog: https://github.com/amphp/file/compare/v3.1.1…v3.2.0
 - 
                
                
                
                
                amphp/sql 2.0.1
What’s Changed
- Added PHP 8.4 compatibility by @Bilge in https://github.com/amphp/sql/pull/9
 
New Contributors
- @Bilge made their first contribution in https://github.com/amphp/sql/pull/9
 
Full Changelog: https://github.com/amphp/sql/compare/v2.0.0…v2.0.1
 - 
                
                
                
                
                amphp/http 2.1.2
What’s Changed
- Added support for PHP 8.4 by @Bilge in https://github.com/amphp/http/pull/29
 
Full Changelog: https://github.com/amphp/http/compare/v2.1.1…v2.1.2
 - 
                
                
                
                
                amphp/postgres 2.1.1
What’s Changed
- Fixed handling of 
int2vectorandoidvectorfields when usingext-pgsql(#68). - The type table is now loaded using an async query when using 
ext-pgsql. This query is only executed once per server upon the initial connection to that server. Using an async query will reduce latency when connecting to different Postgres servers. - Improved performance of array parsing when using 
ext-pgsql. 
Full Changelog: https://github.com/amphp/postgres/compare/v2.1.0…v2.1.1
 - Fixed handling of 
 - 
                
                
                
                
                amphp/http-client-psr7 1.1.1
What’s Changed
- Fixed support for PSR-7 requests with a protocol version of 
"2.0"by converting the protocol version to"2"when converting to anAmp\Http\Client\Request(#15). 
Full Changelog: https://github.com/amphp/http-client-psr7/compare/v1.1.0…v1.1.1
 - Fixed support for PSR-7 requests with a protocol version of 
 - 
                
                
                
                
                amphp/websocket 2.0.4
What’s Changed
- Fixed assertion failure when interleaving control frames between continuation frames in 
Rfc6455FrameCompiler. 
Full Changelog: https://github.com/amphp/websocket/compare/v2.0.3…v2.0.4
 - Fixed assertion failure when interleaving control frames between continuation frames in 
 - 
                
                
                
                
                amphp/sync 2.3.0
What’s Changed
- Fixed posix semaphore blocking thread when there is no space left on device by @azjezz in https://github.com/amphp/sync/pull/29
 - Added a buffer size parameter to 
createChannelPair()to specify a number of items which may be buffered in memory before back pressure is applied. 
New Contributors
- @azjezz made their first contribution in https://github.com/amphp/sync/pull/29
 
Full Changelog: https://github.com/amphp/sync/compare/v2.2.0…v2.3.0
 - 
                
                
                
                
                amphp/socket 2.3.1
What’s Changed
- Make implicit nullable types explicit to avoid deprecation notice in PHP 8.4.
 
Full Changelog: https://github.com/amphp/socket/compare/v2.3.0…v2.3.1
 - 
                
                
                
                
                amphp/cache 2.0.1
What’s Changed
- Make implicit nullable types explicit to avoid deprecation notice in PHP 8.4.
 
Full Changelog: https://github.com/amphp/cache/compare/v2.0.0…v2.0.1
 - 
                
                
                
                
                amphp/process 2.0.3
What’s Changed
- Make implicit nullable types explicit to avoid deprecation notice in PHP 8.4.
 
Full Changelog: https://github.com/amphp/process/compare/v2.0.2…v2.0.3
 - 
                
                
                
                
                amphp/parser 1.1.1
What’s Changed
- Make implicit nullable types explicit by @nicolas-grekas in https://github.com/amphp/parser/pull/6
 
New Contributors
- @nicolas-grekas made their first contribution in https://github.com/amphp/parser/pull/6
 
Full Changelog: https://github.com/amphp/parser/compare/v1.1.0…v1.1.1
 - 
                
                
                
                
                amphp/hpack 3.2.1
What’s Changed
- Make implicit nullable types explicit by @nicolas-grekas in https://github.com/amphp/hpack/pull/16
 
Full Changelog: https://github.com/amphp/hpack/compare/v3.2.0…v3.2.1
 - 
                
                
                
                
                amphp/rpc 2.0.0
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of
Promise<ResolutionType>have been replaced withResolutionType. - 
                
                
                
                
                amphp/mysql 3.0.0
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of
Promise<ResolutionType>have been replaced withResolutionType.- Classes and interfaces now are prefixed with 
Mysqlto avoid collisions with similar names from other libraries. - Marked most classes as internal, leaving only interfaces and concrete implementations required to use the API or create a custom connector.
 MysqlTransactionnow extendsMysqlLinkinstead ofMysqlExecutorto support nested transactions.MysqlDataTypeis now an enum of MySQL data type codes and methods to decode data based on type.- Result set field data is now available from 
MysqlResult::getColumnDefinitions()which returns an array ofMysqlColumnDefinitionobjects corresponding to the result set rows. - The second param of 
MysqlStatement::bind()now requires a string. Binding only makes sense with long strings anyway. MysqlConnectionis now an interface extendingSqlConnection, withSocketMysqlConnectionbeing the implementation.- Removed 
MysqlConnectorsince the interface was replaced by template types onSqlConnector, i.e.SqlConnector<MysqlConfig, MysqlConnection> 
 - Classes and interfaces now are prefixed with 
 - 
                
                
                
                
                amphp/windows-registry 1.0.1
What’s Changed
- Removed nullability from return type of 
WindowsRegistry::read(), the method throws if the key is not found. 
Full Changelog: https://github.com/amphp/windows-registry/compare/v1.0.0…v1.0.1
 - Removed nullability from return type of 
 - 
                
                
                
                
                amphp/websocket-server 4.0.0
The
4.0.0release fixes compression support with a couple small compatibility breaks from3.x.Users of
2.xshould upgrade directly to4.0.0.Users of
3.xcan upgrade directly to4.0.0if compression is not being used. If a customWebsocketAcceptorwas created to support compression, this custom implementation may be dropped, instead passing an instance ofWebsocketCompressionContextFactoryto eachWebsocketrequest handler.Backward Compatibility Breaks
- The 
WebsocketCompressionContextFactoryconstructor parameter ofRfc6455ClientFactoryhas been removed and is instead a constructor parameter of theWebsocketclass. - A nullable 
WebsocketCompressionContextparameter was added toWebsocketClientFactory::createClient(). 
 - The 
 - 
                
                
                
                
                amphp/parallel-functions 2.0.0
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of
Promise<ResolutionType>have been replaced withResolutionType. - 
                
                
                
                
                amphp/http-client-cookies 2.0.0
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of
Promise<ResolutionType>have been replaced withResolutionType.- Renamed 
InMemoryCookieJartoLocalCookieJar 
 - Renamed 
 - 
                
                
                
                
                amphp/http-server-form-parser 2.0.0
This release is compatible with
amphp/http-server@^3.- Renamed 
BufferingParserandStreamingParsertoFormParserandStreamingFormParser, respectively. - Removed the 
parseFormfunction in favor of theForm::fromRequest()static method. - Removed 
ParsingMiddleware. UseForm::fromRequest()instead. - Removed 
ParseException. Form parsing errors will throw anHttpErrorExceptionfromamphp/http-serverinstead, which do not need to be caught (the server will automatically return an error response). 
 - Renamed 
 - 
                
                
                
                
                amphp/http-server-session 3.0.0
This release is compatible with
amphp/http-server@^3.- Renamed 
Storage,InMemoryStorage,RedisStorage,DefaultIdGenerator, andDrivertoSessionStorage,LocalSessionStorage,RedisSessionStorage,Base64UrlSessionIdGenerator, andSessionFactory, respectively - Renamed methods on 
Session:open()tolock(),save()tocommit() - Added 
Session::rollback()to undo local changes and re-read the session data from storage - Added 
SessionTrainerfor examining session changes unit testing 
 - Renamed 
 - 
                
                
                
                
                amphp/http-server-static-content 2.0.0
This release is compatible with
amphp/http-server@^3.DocumentRootnow requires an instance ofHttpServerandErrorHandlerto construct- Removed 
DocumentRoot::onStart()andDocumentRoot::onStop(), as it’s now internally registered - Removed support for 
ServerObserver, as it’s been removed fromamphp/http-server - Added 
StaticResourceto serve a single static file 
 - 
                
                
                
                
                amphp/http-server-router 2.0.0
This release is compatible with
amphp/http-server@^3.- A PSR-3 logger is now required in the 
Routerconstructor - Starting the server with an empty 
Routeris now allowed and only logs a notice instead of throwing an exception - Middleware can be added via 
addMiddleware()instead ofstack() - Removed support for adding middleware directly via 
addRoute(), usestackMiddleware()instead if you need this - Removed 
Router::onStart(), as it’s now internally registered - Removed support for 
ServerObserver, as it’s been removed fromamphp/http-server 
 - A PSR-3 logger is now required in the 
 - 
                
                
                
                
                amphp/log 2.0.0
- Increased minimum PHP version to 8.1
 - Make use of fibers with Amp v3 and Revolt
 - Added support for Monolog v3.x
 
This release does not contain any changes in comparison to
v2.0.0-beta.2. - 
                
                
                
                
                amphp/phpunit-util 3.0.0
This package has been redesigned for compatibility with AMPHP v3 and fibers.
AsyncTestCaseserves a similar purpose as before, providing helper methods for unit testing within an async context. Each test case is run within a unique fiber to allow suspending during the test run.AsyncTestCase::setUpAsync()andtearDownAsync()have been removed. UseAsyncTestCase::setUp()andtearDown()instead, as both of these methods are now able to execute async using fibers.AsyncTestCase::createCallback()now returns aClosure. Additionally, an optional parameter for expected arguments upon invocation have been added (usesInvocationMocker::with(...)to set expected arguments).
 - 
                
                
                
                
                amphp/beanstalk 0.3.2
- Added support for Symfony YAML library v4 and v5. (#34)
 
 - 
                
                
                
                
                amphp/serialization 1.0.0
Initial release.
 - 
                
                
                
                
                amphp/http-client-cache 1.0.0
Initial release.
 - 
                
                
                
                
                amphp/react-adapter 2.1.0
React\EventLoop\Factoryis now automatically replaced with another implementation that throws on each usage to prevent two loops existing concurrently by accident. SetAMP_REACT_ADAPTER_DISABLE_FACTORY_OVERRIDE=1as environment variable or constant to disable this protection.
 - 
                
                
                
                
                amphp/react-stream-adapter 0.1.0
Initial release.