PackageTrack
Sign in Get early access

amphp/sql

Asynchronous SQL client for Amp.

v2.1.1 1.4M downloads/mo #3766 most downloaded on Packagist amphp/sql

What this package is like to depend on

Last release 5 months ago

25 Feb 2026

Release timing varies

gaps range from 4 weeks to 2.8 years

Most releases are documented

notes for 5 of 7 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

13 releases · first in 2018

2 releases in the last 12 months

see the full history below

Release timeline

13 releases · Oct 2018 to Feb 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 13
  1. v2.1.1 25 Feb 2026
    Release notes

    What's Changed

    • Fix acceptance of escaped spaces in connection strings

    Full Changelog: v2.1.0...v2.1.1

    Open source →
  2. v2.1.0 22 Feb 2026
    Release notes

    What's Changed

    • Added support for quoted strings within connection strings, e.g. "host=localhost port=5432 options='--client_encoding=UTF8'"

    Full Changelog: v2.0.1...v2.1.0

    Open source →
  3. v2.0.1 23 Nov 2024
    Release notes

    What's Changed

    • Added PHP 8.4 compatibility by @Bilge in #9

    New Contributors

    • @Bilge made their first contribution in #9

    Full Changelog: v2.0.0...v2.0.1

    Open source →
  4. v2.0.0 10 Mar 2024
    Release notes

    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 with ResolutionType.

    • Added template types to interfaces for better type expression on implementations and extensions.
    • All classes now start with Sql as a prefix to avoid name collisions with other libraries.
    • Combined ResultSet and CommandResult into a single interface, SqlResult.
    • SqlTransaction now extends SqlLink instead of SqlExecutor to support nested transactions.
    • Added onCommit() and onRollback() methods to SqlTransaction. These methods attach callbacks after the transaction is either committed or rolled back, respectively.
    • Removed the methods createSavepoint(), rollbackTo(), and releaseSavepont() from SqlTransaction. Use nested transactions through SqlTransaction::beginTransaction() instead.
    • SqlPool now extends SqlConnection instead of SqlLink. SqlPool::extractConnection() returns an instance of SqlConnection instead of SqlLink.
    • Added SqlResult::fetchRow(), which will return a single row (associative array) from the result set on each call until no further rows remain in the result.
    • SqlTransientResource and now extends Amp\Closable.
    • Added SqlTransactionIsolation and an enum-based implementation, SqlTransactionIsolationLevel.
    • Renamed ConnectionConfig to SqlConfig.
    • Renamed FailureException to SqlException.
    Open source →
    Release notes

    What's Changed

    • The Transaction interface now extends Link, adding nested transaction functionality through beginTransaction() on a transaction object.
    • Added Connection interface with methods to retrieve the config and get/set the current transaction isolation.
    • The TransactionIsolation argument of Link::beginTransaction() has been removed. Transaction isolation is now set on the connection in the new Connection interface.
    • Pool now extends Connection instead of Link. Pool::extractConnection() returns an instance of Connection instead of Link.
    • SqlConnector::connect() returns an instance of Connection instead of Link.
    • Renamed Transaction::getIsolationLevel() to getIsolation().
    • Removed the methods createSavepoint(), rollbackTo(), and releaseSavepont() from Transaction. Use nested transactions through beginTransaction() instead.
    • Added onCommit() and onRollback() methods to Transaction. These methods attach callbacks when the transaction is either committed or rolled back, respectively.

    Full Changelog: v2.0.0-beta.5...v2.0.0-beta.6

    Open source →
    Release notes
    Open source →
    Release notes
    • Removed PoolError
    • Updated several docblock types to be non-empty-string instead of string
    Open source →
    Release notes
    • Added Result::fetchRow(), which will return a single row (associative array) from the result set on each call until no further rows remain in the result.
    // Iterate over result rows with a simple while loop
    while ($row = $result->fetchRow()) {
        // ...
    }
    
    // Also useful if you know your result will contain only a single row
    $id = $result->fetchRow()['id'] ?? throw new Exception('Item not found');
    Open source →
    Release notes
    • Fix template type restriction in Amp\Sql\Pool.
    Open source →
  5. v2.0.0-beta.6 08 Dec 2023 pre-release

    Nothing published for this version

  6. v2.0.0-beta.5 22 Oct 2023 pre-release

    Nothing published for this version

  7. v2.0.0-beta.4 16 Jan 2023 pre-release

    Nothing published for this version

  8. v2.0.0-beta.3 18 Dec 2022 pre-release

    Nothing published for this version

  9. v2.0.0-beta.2 23 Sep 2022 pre-release

    Nothing published for this version

  10. v2.0.0-beta.1 17 Jul 2022 pre-release

    Nothing published for this version

  11. v1.0.2 18 Dec 2022
    Release notes
    • Fix a deprecation notice on PHP 8.1 if a configuration key does not have a value.
    Open source →
  12. v1.0.1 26 Sep 2019

    Nothing published for this version

  13. v1.0.0 13 Oct 2018

    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