Releases: readdle/fqdb
PHP8.1: Fixed compatibility issues with \JsonSerializable
Weaken symfony/event-dispatcher dependecy in favor of symfony/event-dispatcher-contracts
Weakened dependency "symfony/event-dispatcher" in favor of "symfony/event-dispatcher-contracts".
POTENTIAL BC: If you're using "symfony/event-dispatcher" as a dispatcher, please install it manually composer require symfony/event-dispatcher
Some compatibility with PHP 8.1
No actual behavior changes since 4.0.3
3.1.0
Update symfony/dispatcher to >=4.3 <5.0
For more details see https://symfony.com/blog/new-in-symfony-4-3-simpler-event-dispatching
Introduced transaction and query executing events
New events are introduced:
- DeleteStatementPrepared
- UpdateStatementPrepared
- TransactionBegan
- TransactionCommitted
- TransactionRolledBack
Also set|getBeforeUpdateHandler and set|getBeforeDeleteHandler are removed and could be replaced via events.
HHVM was removed from trevis, cause of it is no longer supported by composer
composer/composer#8127
Introduced Ability to use Custom Connectors
// New instantiate method of FQDB
// example: mysql:host=127.0.0.1;dbname=database;charset=utf8mb4
$fqdb = FQDBProvider::dbWithDSN($dsn, $user, $password);
// to use a custom connector you can register it before instantiating the FQDB
\Readdle\Database\FQDB::registerConnector(\Readdle\Database\ConnectorInterface $connector);
$fqdb = new \Readdle\Database\FQDB($optionSupportedByYourConnector);
New method has been implemented
queryTableGenerator
method has been implemented.
Usage example:
$result = $fqdb->queryTableGenerator("SELECT * FROM users");
New method has been implemented
queryHash
method has been implemented
Usage example:
$result = $fqdb->queryHash("SELECT id, status FROM users");
//$result output (where key is id
, and value is status
)
[
'23' => 'active',
'2' => 'suspended'
]
FQDB 2.0
- Returning only array when calling functions which are working with collections:
BC:
<v2.0:
/**
* @return array|false
*/
public function queryTable($sql, $options);
public function queryVector($sql, $options);
public function queryObjArray($sql, $options);
v2.0:
/**
* @return array
*/
public function queryTable($sql, $options);
public function queryVector($sql, $options);
public function queryObjArray($sql, $options);
parse .my.cnf improvements
- FQDBProvider::parseMyCnf() now parses host and database parameters