Releases: amphp/mysql
2.1.2
2.1.1
2.1.0
1.2.1
2.0.0
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 forid
instead of an array of values:$statement->execute(['id' => 10])
. This behavior mirrorsamphp/postgres
and the PDO extension. (#90) ConnectionConfig
constructor now takes aConnectContext
as the second argument instead ofClientTlsContext
. TLS (and other connection) options can be specified using theConnectContext
object.ConnectionConfig::getTlsContext()
andConnectionConfig::withTlsContext()
have been replaced withConnectionConfig::getConnectContext()
andConnectionConfig::withConnectContext()
.- Added
CancellableConnector
that allows aCancellationToken
to be used to cancel the connection request. TimeoutConnector
removed. Specify a connection timeout usingConnectContext::withTimeout()
as part ofConnectionConfig
or with aTimeoutCancellationToken
withCancellableConnector
.Statement::bindParam()
now declaresvoid
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
:
2.0.0 RC1
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 forid
instead of an array of values:$statement->execute(['id' => 10])
. This behavior mirrorsamphp/postgres
and the PDO extension. (#90) ConnectionConfig
constructor now takes aConnectContext
as the second argument instead ofClientTlsContext
. TLS (and other connection) options can be specified using theConnectContext
object.ConnectionConfig::getTlsContext()
andConnectionConfig::withTlsContext()
have been replaced withConnectionConfig::getConnectContext()
andConnectionConfig::withConnectContext()
.- Added
CancellableConnector
that allows aCancellationToken
to be used to cancel the connection request. TimeoutConnector
removed. Specify a connection timeout usingConnectContext::withTimeout()
as part ofConnectionConfig
or with aTimeoutCancellationToken
withCancellableConnector
.Statement::bindParam()
now declaresvoid
as a return type.- Fixed result value when the column type is JSON and the data was inserted using a cast (#88).
1.2.0
- 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.
1.1.0
- Added an optional
ClientConnectContext
parameter toConnection::connect()
. - Fixed an issue when using this library with
amphp/postgres
that caused the sameConnector
object to be returned by theconnector()
function in both libraries.
1.0.0
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
andPool
that are shared withamphp/postgres
are now in a separate library,amphp/sql
. ConnectionConfig
is now built with a list of parameters instead of a connection string. UseConnectionConfig::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.