Skip to content

2.0.0

Compare
Choose a tag to compare
@trowski trowski released this 04 Apr 14:44

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