PackageTrack
Sign in Get early access

aura/sql

A PDO extension that provides lazy connections, array quoting, query profiling, value binding, and convenience methods for common fetch styles. Because it extends PDO, existing code that uses PDO can use this without any changes to the existing code.

6.0.1 2.8M downloads/mo #3499 most downloaded on Packagist auraphp/Aura.Sql

What this package is like to depend on

Last release 7 months ago

05 Jan 2026

Release timing varies

gaps range from 2 weeks to 3.3 years

Nearly every release is documented

notes for 27 of 29 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

33 releases · first in 2012

1 release in the last 12 months

see the full history below

Release timeline

32 releases · Nov 2012 to Jan 2026
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 33
  1. 6.0.1 05 Jan 2026
    Release notes

    What's Changed

    Full Changelog: 6.0.0...6.0.1

    Open source →
    Release notes
    • Update README.md, continuous-integration.yml, scrutinizer.yml, code coverage by @harikt in https://github.com/auraphp/Aura.Sql/pull/237, https://github.com/auraphp/Aura.Sql/pull/239 , https://github.com/auraphp/Aura.Sql/pull/240, https://github.com/auraphp/Aura.Sql/pull/241, https://github.com/auraphp/Aura.Sql/pull/244
    • Upload coverage report by @koriym in https://github.com/auraphp/Aura.Sql/pull/243
    • PHP 8.5 Support by @koriym in https://github.com/auraphp/Aura.Sql/pull/247
    • Add Psalm taint-sink annotations for SQL injection detection by @koriym in https://github.com/auraphp/Aura.Sql/pull/248, https://github.com/auraphp/Aura.Sql/pull/249
    Open source →
    Release notes

    6.0.1 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. 6.0.0 22 Jan 2025
    Release notes

    6.0.0

    • CHG: BC Break ExtendedPdo::connect renamed to ExtendedPdo::lazyConnect
    • Changes for PHP 8.4 by @srjlewis in #229
    • Update 6.x docs to reflect latest changes by @srjlewis in #232
    • PDO according to 8.4 changes and feedbacks from @pmjones by @harikt in #233

    Full Changelog: 5.0.2...6.0.0

    Open source →
    Release notes
    • CHG: BC Break ExtendedPdo::connect renamed to ExtendedPdo::lazyConnect
    • Changes for PHP 8.4 by @srjlewis in https://github.com/auraphp/Aura.Sql/pull/229
    • Update 6.x docs to reflect latest changes by @srjlewis in https://github.com/auraphp/Aura.Sql/pull/232
    • PDO according to 8.4 changes and feedbacks from @pmjones by @harikt in https://github.com/auraphp/Aura.Sql/pull/233
    Open source →
    Release notes

    6.0.0

    Compare

    Choose a tag to compare

    Open source →
  3. 6.0.0-beta1 no date pre-release
    Release notes

    What's Changed

    • CHG: BC Break ExtendedPdo::connect renamed to ExtendedPdo::lazyConnect
    • Changes for PHP 8.4 by @srjlewis in #229
    • Update 6.x docs to reflect latest changes by @srjlewis in #232
    • PDO according to 8.4 changes and feedbacks from @pmjones by @harikt in #233

    Full Changelog: 5.0.2...6.0.0

    Open source →
    Release notes

    6.0.0-beta1 Pre-release

    Pre-release

    Compare

    Choose a tag to compare

    Open source →
  4. 5.0.3 22 Jan 2025
    Release notes

    What's Changed

    • Add PHP 8.3 to continuous integration workflow by @koriym in #227
    • Add lazyConnect method for interoperability with future versions by @srjlewis in #230 ( Note : establishConnection was renamed to lazyConnect )

    Full Changelog: 5.0.2...5.0.3

    Open source →
    Release notes

    5.0.3

    Compare

    Choose a tag to compare

    Open source →
  5. 5.0.2 12 Jun 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 5.0.1...5.0.2

    Open source →
    Release notes
    • Add failing test for #183 by @harikt in https://github.com/auraphp/Aura.Sql/pull/211
    • sqlite parser update by @harikt in https://github.com/auraphp/Aura.Sql/pull/212
    • Enable PHP 8.2 compat by @koriym in https://github.com/auraphp/Aura.Sql/pull/218
    • Fix missing properties by @koriym in https://github.com/auraphp/Aura.Sql/pull/219
    • Allow using psr/log v3 by @Qrzysio in https://github.com/auraphp/Aura.Sql/pull/223
    • Fix illegal space (0xE38080) in composer.json by @koriym in https://github.com/auraphp/Aura.Sql/pull/224
    Open source →
    Release notes

    5.0.2

    Compare

    Choose a tag to compare

    Open source →
  6. 5.0.1 19 Feb 2022
    Release notes
    Open source →
    Release notes
    • Fix broken return types #204 by @r4ndsen
    • Fix scrutinizer.yml #206 by @harikt
    Open source →
    Release notes

    5.0.1

    Compare

    Choose a tag to compare

    Open source →
  7. 5.0.0 20 Nov 2021
    Release notes

    Version 5.x supports PHP 8.1 and up.

    What's Changed

    New Contributors

    Full Changelog: 3.0.0...5.0.0

    Open source →
    Release notes
    • Remove unused param in queryparser by @r4ndsen in https://github.com/auraphp/Aura.Sql/pull/180
    • PHP 8 Support by @koriym in https://github.com/auraphp/Aura.Sql/pull/185
    • Allow psr/log v2 by @r4ndsen in https://github.com/auraphp/Aura.Sql/pull/191
    • Compatibility with PHP 8.1 by @srjlewis in https://github.com/auraphp/Aura.Sql/pull/193
    • Update PHPDoc by @kenjis in https://github.com/auraphp/Aura.Sql/pull/196
    • Migrate Travis to GitHub Actions by @koriym in https://github.com/auraphp/Aura.Sql/pull/197
    • Update GitHub Actions for 5.x by @kenjis in https://github.com/auraphp/Aura.Sql/pull/198
    • docs: update README for 5.x by @kenjis in https://github.com/auraphp/Aura.Sql/pull/200
    Open source →
    Release notes

    5.0.0

    Compare

    Choose a tag to compare

    Open source →
  8. 4.0.0 24 Nov 2021
    Release notes

    Version 4.x supports PHP 7.2 and up.

    What's Changed

    New Contributors

    Full Changelog: 3.0.0...4.0.0

    Open source →
    Release notes

    4.0.0

    Compare

    Choose a tag to compare

    Open source →
  9. 3.1.0 28 Apr 2022
    Release notes
    Open source →
    Release notes

    3.1.0

    Compare

    Choose a tag to compare

    Open source →
  10. 3.0.0 11 Jun 2018
    Release notes
    • Fixed issue #163: Add getAttribute and setAttribute functions to make sure pdo is connected before calling the functions

    • Merged pull request #170: fixes error "Class 'Aura\Sql\PDO' not found"

    • Merged pull request #174: fixes bug with null value.

    Open source →
  11. 3.0.0-beta1 28 Jun 2017 pre-release
    Release notes

    First beta release.

    • Updated documentation, and added a Bookdown JSON file.

    • The sqlsrv driver now defaults to exceptions like all other drivers.

    Open source →
  12. 3.0.0-alpha1 09 Mar 2017 pre-release
    Release notes Open source →
  13. 2.6.0 15 Aug 2018
    Release notes

    This release adds two new off-interface methods to ConnectionLocator:

    • setProfiling() to activate profiling across all connections

    • getProfiles() to get the profiles from all connections

    Open source →
    Release notes

    2.6.0

    Compare

    Choose a tag to compare

    Open source →
  14. 2.5.3 02 Aug 2018

    Nothing published for this version

  15. 2.5.2 04 Mar 2018

    Nothing published for this version

  16. 2.5.1 03 Oct 2016
    Release notes

    Hygiene release: update documentation and testing.

    Open source →
  17. 2.5.0 01 May 2016
    Release notes

    This release adds new yield*() methods to ExtendedPdo; these return iterators to generate one result row at a time, which can reduce memory usage with very large result sets.

    Open source →
  18. 2.4.3 27 Mar 2015
    Release notes

    This release modifies the testing structure and updates other support files.

    Open source →
  19. 2.4.2 16 Mar 2015
    Release notes

    This is a hygiene release to update support files.

    Open source →
  20. 2.4.1 03 Mar 2015
    Release notes
    • FIX: #96: Allow first bind value of query with numbered placeholders to be null.
    Open source →
  21. 2.4.0 09 Feb 2015
    Release notes

    The previous release changed the ExtendedPdoInterface by adding a new disconnect() method. That was an unintentional BC break to existing implementations of the interface. This release corrects that break by removing the disconnect() method from the interface, while leaving it in the implementation.

    Open source →
  22. 2.3.0 03 Feb 2015
    Release notes
    • ADD: ExtendedPdo::disconnect() method to close connections explicitly. This does not work for injected PDO connection objects, which should be managed from their creation point, not as part of ExtendedPdo. Thanks to both Jacob Emerick and Jacques Woodcock for their initial implementations.

    • CHG: ExtendedPdo::bindValue() now throws Exception\CannotBindValue when it encounters a non-bindable value. This helps with debugging values that make their way down to the PDO layer, which PDO cannot bind.

    Open source →
  23. 2.2.1 19 Jan 2015
    Release notes
    • CHG: ExtendedPdo::prepare() now profiles the query-preparation time
    Open source →
  24. 2.2.0 17 Jan 2015
    Release notes
    • SEC: ExtendedPdo no longer enables self::ATTR_EMULATE_PREPARES by default; this is to avoid security holes when using emulation.

    • REF: Extract the statement-rebuilding logic to its own Rebuilder class

    • ADD: ExtendedPdo::fetchGroup() functionality.

    • ADD: When binding values via perform(), add the self::PARAM_* type based on the value being bound.

    • TST: Update testing structure

    Open source →
  25. 2.1.0 24 Aug 2014
    Release notes
    • NEW: Method Profiler::resetProfiles() allows you to clear existing profiles.

    • FIX: Correctly handles zero-indexed placeholder arrays on execute.

    • FIX: Passes all tests on HHVM.

    • REF: Added Scrutinizer-CI checks, along with code modifications to improve Scrutinizer score without changing functionality.

    • DOC: Updates to the README and various docblocks.

    Open source →
  26. 2.0.1 08 Apr 2014
    Release notes

    Release 2.0.1 includes a fix that moves PDO parameters explicitly back into the constructor. This restores named parameter matching for DI containers.

    Open source →
  27. 2.0.0 01 Apr 2014
    Release notes

    First stable release of Aura.Sql 2.0.0

    Version 2 of Aura.Sql is greatly reduced from version 1, providing only an ExtendedPDO class, a query profiler, and a connection locator. No query objects, data mappers, or schema discovery objects are included; these are available in separate Aura.Sql_* packages. This keeps the package tightly focused as an extension for PDO, rather than a more general SQL toolset.

    This is a breaking change from the beta. Previously, the ExtendedPdo object itself would retain values to bind against the next query. After discussion with interested parties, notably Rasmus Schultz, I was convinced that it was too much of a departure from normal PDO semantics.

    Thus, the collection of values for binding has been removed. The methods query(), exec(), and prepare() no longer take bound values directly. Instead,we have a new method perform() that acts like query() but takes an array of values to bind at query time. We also have a new method prepareWithValues() that prepares a statement and binds values at that time. Finally, the new method fetchAffected() acts like exec(), but with bind values passed at the time of calling (just like with the other fetch*() methods).

    In addition, you can now pass an existing PDO connection to ExtendedPdo so decorate that existing PDO instance with the ExtendedPdo behaviors.

    Thanks to ralouphie, koriym, jblotus, and stof for their fixes and improvements in this release. Thanks also to Stan Lemon for the new proxy/decorator behavior, Rasmus Schultz for his semantic insights, and (as always) to Hari KT for his continued attention to detail.

    The full list of changes follows.

    • [BRK] Remove methods bindValue(), bindValues(), and getBindValues()

    • [BRK] query(), exec(), and prepare() no longer bind values; perform() and prepareWithValues() do

    • [FIX] setAttribute() needs to return a bool; thanks @mindplay-dk

    • [FIX] PDO::quote() now converts NULL to ''; this fix honors the normal PDO behavior.

    • [FIX] Method rollBack() now returns a boolean result

    • [ADD] Extract PdoInterface from ExtendedPdoInterface

    • [ADD] Add fetchObject*() to ExtendedPdoInterface

    • [ADD] Add methods perform() and prepareWithValues() to bind values as part of the call

    • [ADD] Add method fetchAffected() as an exec()-with-values replacement

    • [CHG] Constructor is now polymorphic; inject an existing PDO instance to be decorated, or pass PDO params

    • [ADD] Add method getPdo() to return the proxied/decorated instance

    Open source →
  28. 2.0.0-beta1 03 Jan 2014 pre-release
    Release notes
    • Initial release of 2.0.0-beta1.

    Version 2 of Aura.Sql is greatly reduced from version 1, providing only an ExtendedPDO class, a query profiler, and a connection locator. No query objects, data mappers, or schema discovery objects are included; these are available in separate Aura.Sql_* packages. This keeps the package tightly focused as an extension for PDO, rather than a more general SQL toolset.

    Open source →
  29. 1.3.1 31 May 2014
    Release notes

    Hygiene release.

    • Fix UnitOfWork test for PHP 5.5

    • Merge pull request #58 from MAXakaWIZARD/pr-select-query-reset-fix, fixes $from_key count when resetting select statement.

    • Merge pull request #56 from MAXakaWIZARD/pr-correct-join-order, implements correct join order for Query\Select

    • Keep a running count of FROM keys in Select, instead of counting each time

    • Remove commented-out code and update docblocks

    Open source →
  30. 1.3.0 17 Sep 2013
    Release notes
    • [NEW] Query\Sqlite(Select|Insert|Update|Delete) classes to support SQLite-specific behaviors

    • [NEW] Query\Pgsql(Select|Insert|Update|Delete) classes to support PostgreSQL-specific behaviors

    • [REF] Refactor existing limit/offset behaviors to Query\LimitTrait and Query\OffsetTrait

    • [REF] Refactor existing order-by behaviors to Query\OrderByTrait

    • [REF] Refactor query-string indenting and comma-separation behaviors to new methods

    • [ADD] Methods on each db-specific connection object to return db-specific query objects; e.g., Connection\Mysql::newMysqlSelect(), Connection\Pgsql::newPgsqlInsert(), etc.

    Many thanks to @MAXakaWIZARD for his work on the features in this release.

    Open source →
  31. 1.2.0 10 Sep 2013
    Release notes
    • [ADD] Profiler::getLastQuery() to get the last profiled query.

    • [CHG] AbstractConnection::fetchAll(), fetchAssoc(), fetchCol(), and fetchPairs() all now take a third param: a callable to apply to each row in the results.

    • [ADD] AbstractConnection::disconnect(), mostly to help with testing.

    • [NEW] Query\Mysql classes to support MySQL-specific functionality:

      • [NEW] Query\Mysql\Select with SQL_CALC_FOUND_ROWS and other mysql-specific flags.

      • [NEW] Query\Mysql\Insert with IGNORE and other mysql-specific flags.

      • [NEW] Query\Mysql\Update with IGNORE and other mysql-specific flags, as well as LIMIT functionality.

      • [NEW] Query\Mysql\Delete with LOW_PRIORITY and other mysql-specific flags, as well as LIMIT functionality.

    • [LIC] Update license copyright dates.

    • [TST] Add PHP 5.5 to Travis build.

    • [DOC] Update README.

    Open source →
  32. 1.1.0 09 May 2013
    Release notes
    • [ADD] AbstractConnection::setPdo() to inject a pre-existing PDO connection. Thanks, Stan Lemon, for the feature request.

    • [ADD] Add missing properties AbstractConnection::$profiler and AbstractConnection::$query_factory.

    • [CHG] Varios typo fixes by Pascal Borrelli and Henrique Moody.

    • [CHG] Gateway registry entries must be wrapped in a callable from now on.

    • [ADD] Method Column::__isset()

    Open source →
  33. 1.0.0 29 Nov 2012
    Release notes

    WARNING: This release has backwards compatiblity breaks.

    Breaks

    • [BRK] Rename "Adapter" to "Connection" throughout the package

    • [BRK] Rename "sql" to "connection" throughout the package

    Other Changes

    • [ADD] Methods Query\AbstractQuery::setBind(), addBind(), and getBind() to allow bind data to be carried along with the query object.

    • [ADD] Method Query\AbstractQuery::getConnection() to get the injected database connection.

    • [NEW] Classes Gateway, GatewayIterator, and GatewayLocator (table data gateway implementation)

    • [NEW] Class AbstractMapper (mapper implementation)

    • [NEW] Class UnitOfWork (unit-of-work implemetation)

    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