Amphp Mysql Versions Save

An async MySQL client for PHP, optimizing database interactions with efficient non-blocking capabilities. Perfect for responsive, high-performance applications.

v2.1.2

2 years ago
  • Fixed a bug when decoding a JSON field (#113)

v2.1.1

3 years ago
  • Fixed error handling of initial packet from server (#101)
  • Fixed handling of mysql_native_password authentication with MySQL 8.x (#105)

v2.1.0

3 years ago
  • Added compatibility with MySQL 8 change in default authentication, specifically caching_sha2_password.
  • Added compatibility with amphp/[email protected].
  • Made dependency on amphp/file optional.

v2.0.0

4 years ago

This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.

  • PHP 7.1+ now required.
  • Duplicate parameter names in prepared statements now require only a single value in the parameter array passed to execute. e.g.: SELECT * FROM test WHERE classId > :id AND nodeId < :id will only require one value set for id instead of an array of values: $statement->execute(['id' => 10]). This behavior mirrors amphp/postgres and the PDO extension. (#90)
  • ConnectionConfig constructor now takes a ConnectContext as the second argument instead of ClientTlsContext. TLS (and other connection) options can be specified using the ConnectContext object.
  • ConnectionConfig::getTlsContext() and ConnectionConfig::withTlsContext() have been replaced with ConnectionConfig::getConnectContext() and ConnectionConfig::withConnectContext().
  • Added CancellableConnector that allows a CancellationToken to be used to cancel the connection request.
  • TimeoutConnector removed. Specify a connection timeout using ConnectContext::withTimeout() as part of ConnectionConfig or with a TimeoutCancellationToken with CancellableConnector.
  • Statement::bindParam() now declares void as a return type.
  • Fixed result value when the column type is JSON and the data was inserted using a cast (#88).

Changes since v2.0.0-RC1:

  • Fixed connection processor state after error (#91)
  • Connection exception now attached as previous exception to pending operations (#92)
  • Fixed connecting using a file path

v1.2.1

4 years ago
  • Fixed port being ignored in ConnectionConfig::getConnectionString() (#93)

v2.0.0-rc1

4 years ago

This release provides compatibility with amphp/socket v1.0. Most users of this library should be able to upgrade from 1.x to 2.0 with few to no changes. Please check the list of changes below for those that may affect your code.

  • PHP 7.1+ now required.
  • Duplicate parameter names in prepared statements now require only a single value in the parameter array passed to execute. e.g.: SELECT * FROM test WHERE classId > :id AND nodeId < :id will only require one value set for id instead of an array of values: $statement->execute(['id' => 10]). This behavior mirrors amphp/postgres and the PDO extension. (#90)
  • ConnectionConfig constructor now takes a ConnectContext as the second argument instead of ClientTlsContext. TLS (and other connection) options can be specified using the ConnectContext object.
  • ConnectionConfig::getTlsContext() and ConnectionConfig::withTlsContext() have been replaced with ConnectionConfig::getConnectContext() and ConnectionConfig::withConnectContext().
  • Added CancellableConnector that allows a CancellationToken to be used to cancel the connection request.
  • TimeoutConnector removed. Specify a connection timeout using ConnectContext::withTimeout() as part of ConnectionConfig or with a TimeoutCancellationToken with CancellableConnector.
  • Statement::bindParam() now declares void as a return type.
  • Fixed result value when the column type is JSON and the data was inserted using a cast (#88).

v1.2.0

4 years ago
  • Added support for LOCAL DATA INFILE (#86)
  • Fixed releasing the connection before all results were consumed if multiple queries were executed.
  • Fixed an error occurring with MariaDB where the connection is killed when there is no pending query (#84)
  • Fixed the alias map for connection strings that allows alternative key names in connection strings.
  • Removed a circular reference when destructing of unbuffered result sets that would sometimes delay destruction.

v1.1.0

5 years ago
  • Added an optional ClientConnectContext parameter to Connection::connect().
  • Fixed an issue when using this library with amphp/postgres that caused the same Connector object to be returned by the connector() function in both libraries.

v1.0.0

5 years ago

The interface structure of this library changed significantly, however most consumers of this library should be able to upgrade from v0.3.x by only updating the code initializing a connection or pool to use an instance of ConnectionConfig instead of a connection string. Using a connection or pool to perform queries has remained unchanged since v0.3.x, with the exception that transactions are now started with Link::beginTransaction() instead of Link::transaction().

  • The fetch-type parameter has been removed from ResultSet::getCurrent(). All rows are always returned as associate arrays.
  • Common interfaces such as Statement and Pool that are shared with amphp/postgres are now in a separate library, amphp/sql.
  • ConnectionConfig is now built with a list of parameters instead of a connection string. Use ConnectionConfig::fromString() to use a connection string.
  • The Operation interface has been dropped in favor of decorators. This interface was internally used to automatically free resources on destruction.

Please review the interfaces in amphp/sql to ensure no other interface changes or method renames may affect your code.

v0.3.1

6 years ago
  • Fixed an issue when a pool reached maximum size but a connection creation request was still pending, another subsequent request would enter an infinite loop waiting for a connection to become available.