Releases: friends-of-reactphp/mysql
v0.6.0
-
Feature: Improve Promise v3 support and use template types.
(#183 and #178 by @clue) -
Feature / BC break: Update default charset encoding to
utf8mb4
for full UTF-8 support.
(#165 by @clue)This feature updates the MySQL client to use
utf8mb4
as the default charset
encoding for full UTF-8 support instead of the legacyutf8mb3
charset encoding.
For legacy reasons you can still change this to use a different ASCII-compatible
charset encoding like this:$factory->createConnection('localhost?charset=utf8mb4');
-
Feature: Reduce default idle time to 1ms.
(#182 by @clue)The idle time defines the time the client is willing to keep the underlying
connection alive before automatically closing it. The default idle time was
previously 60s and can be configured for more specific requirements like this:$factory->createConnection('localhost?idle=10.0');
-
Improve test suite, update to use reactphp/async and report failed assertions.
(#164 and #170 by @clue, #163 by @dinooo13 and #181 by @SimonFrings)
v0.5.7
-
Feature: Mark passwords and URIs as
#[\SensitiveParameter]
(PHP 8.2+).
(#162 by @clue) -
Feature: Forward compatibility with upcoming Promise v3.
(#157 by @clue) -
Feature / Fix: Improve protocol parser, emit parser errors and close invalid connections.
(#158 and #159 by @clue) -
Improve test suite, fix legacy HHVM build by downgrading Composer.
(#160 by @clue)
v0.5.6
-
Feature: Support optional
charset
parameter for full UTF-8 support (utf8mb4
).
(#135 by @clue)$db = $factory->createLazyConnection('localhost?charset=utf8mb4');
-
Feature: Improve error reporting, include MySQL URI and socket error codes in all connection errors.
(#141 by @clue and #138 by @SimonFrings)For most common use cases this means that simply reporting the
Exception
message should give the most relevant details for any connection issues:$db->query($sql)->then(function (React\MySQL\QueryResult $result) { // … }, function (Exception $e) { echo 'Error:' . $e->getMessage() . PHP_EOL; });
-
Feature: Provide limited support for
NO_BACKSLASH_ESCAPES
SQL mode.
(#139 by @clue) -
Update project dependencies, simplify socket usage, and improve documentation.
(#136 and #137 by @SimonFrings) -
Improve test suite and add
.gitattributes
to exclude dev files from exports.
Run tests on PHPUnit 9 and PHP 8 and clean up test suite.
(#142 and #143 by @SimonFrings)
v0.5.5
-
Feature: Simplify usage by supporting new default loop.
(#134 by @clue)// old (still supported) $factory = new React\MySQL\Factory($loop); // new (using default loop) $factory = new React\MySQL\Factory();
-
Improve test setup, use GitHub actions for continuous integration (CI) and fix minor typo.
(#132 by @SimonFrings and #129 by @mmoreram)
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
A major feature release with a significant API improvement!
This update does not involve any BC breaks, but we figured the new API provides
significant features that warrant a major version bump. Existing code will
continue to work without changes, but you're highly recommended to consider
using the new lazy connections as detailed below.
-
Feature: Add new
createLazyConnection()
method to only connect on demand and
implement "idle" timeout to close underlying connection when unused.
(#87 and #88 by @clue)// new $connection = $factory->createLazyConnection($url); $connection->query(…);
This method immediately returns a "virtual" connection implementing the
ConnectionInterface
that can be used to
interface with your MySQL database. Internally, it lazily creates the
underlying database connection only on demand once the first request is
invoked on this instance and will queue all outstanding requests until
the underlying connection is ready. Additionally, it will only keep this
underlying connection in an "idle" state for 60s by default and will
automatically end the underlying connection when it is no longer needed.From a consumer side this means that you can start sending queries to the
database right away while the underlying connection may still be
outstanding. Because creating this underlying connection may take some
time, it will enqueue all oustanding commands and will ensure that all
commands will be executed in correct order once the connection is ready.
In other words, this "virtual" connection behaves just like a "real"
connection as described in theConnectionInterface
and frees you from
having to deal with its async resolution.
v0.4.1
-
Feature: Support cancellation of pending connection attempts.
(#84 by @clue) -
Feature: Add
warningCount
toQueryResult
.
(#82 by @legionth) -
Feature: Add exception message for invalid MySQL URI.
(#80 by @CharlotteDunois) -
Fix: Fix parsing error message during handshake (Too many connections).
(#83 by @clue)