Skip to content

v0.9.0

Latest

Choose a tag to compare

@niden niden released this 30 Jul 19:52
ca1a825

Changed

  • composer test-coverage and test-coverage-html now run the unit, mariadb, mysql, and pgsql suites and merge the results, so coverage reflects every driver instead of the sqlite path alone. #26
  • composer test-coverage and test-coverage-html now require live MariaDB, MySQL, and PostgreSQL servers. composer test is unchanged and still runs without them. #26

Added

  • MariaDB driver. Set driver=mariadb and configure DATA_MARIADB_HOST, DATA_MARIADB_PORT, DATA_MARIADB_NAME, DATA_MARIADB_USER, DATA_MARIADB_PASS, and DATA_MARIADB_CHARSET. #26
  • MariaDB and MySQL are configured independently and can point at different servers. #26
  • getDatabaseDsn('mariadb') returns a mysql:-prefixed DSN, since MariaDB connects through pdo_mysql. No new PHP extension is required. #26
  • mariadb test suite, run with vendor/bin/talon run mariadb. Backed by resources/phpunit.mariadb.xml and resources/schema/mariadb.sql. #26
  • mariadb:11.4 service in docker-compose.yml, and the matching service in both CI jobs. #26
  • phpunit/phpcov (^9) as a dev dependency, used to merge the per-suite coverage into tests/_output/coverage.xml. #26
  • Phalcon\Talon\Database\Dialect, an enum resolving a PDO connection to Mysql, Pgsql, or Sqlite, with per-dialect identifier quoting. #27
  • DatabaseTrait::getDialect(), returning the connection's Dialect. Use it to choose SQL syntax; use getDriver() to tell MariaDB from MySQL. #27

Fixed

  • Connection::select() now matches a NULL criterion with IS NULL instead of col = :col, which matched nothing. assertNotInDatabase('t', ['x' => null]) previously passed regardless of the data. #27
  • Connection::select() now quotes table and column identifiers per dialect, so reserved words such as order and key work. #27
  • DATA_POSTGRES_SCHEMA is now applied to the connection as SET search_path. It was previously read into the options and ignored. #27

Removed

  • resources/schema/mariadb.sql, a byte-identical copy of mysql.sql. DatabaseIntegrationTest now loads the schema named by each suite's dump_file rather than deriving the path from the driver name. #27