@dg dg released this Mar 23, 2018 · 22 commits to master since this release

Assets 2

Please make a donation at https://nette.org/make-donation?to=dibi

New features

  • requires PHP 7.1
  • added declare(strict_types=1)
  • added PHP 7.1 scalar and return type hints
  • added JSON support [Closes #269]
  • added Dibi\Expression and shortcut Connection::expression() (should be used instead of arrays in queries) [Closes #264]
  • used safe casting to int
  • Translator: %i %f throws exception when value is not numeric
  • Dibi\Exception: Previous exception can now be passed to constructor (#275)
  • PdoDriver: improved detection of query result [Closes #279]
  • PdoDriver: returns OracleReflector, PostgreReflector, SqlsrvReflector
  • added interface IConnection (#274)
  • added Result::getColumnCount()


  • deprecated insertId() (use getInsertId), affectedRows() (use getAffectedRows) and DateTime::modifyClone() (use modify)
  • extension methods are deprecated
  • Connection::__construct() parameter config should be array

Changes, BC breaks

  • Connection::query() and Fluent::execute() always return Result, not the number of affected rows
  • fetch(), fetchSingle(), getAffectedRows(), getInsertId() return NULL instead of FALSE on error
  • removed support for old class names without namespaces (it also applies to v3.2)
  • installable only via Composer, removed minified version
  • automatically decodes JSON columns see
  • DateTime extends DateTimeImmutable instead of DateTime
  • also note, that support for microseconds (since Dibi 3.1) can lead to BC break, see this
  • all drivers divided into Driver, ResultDriver and Reflector
  • reflection: removed Column::isUnsigned()
  • removed support for obsolete FirePHP browser plugin and MSSQL driver (there is a new SQLSRV driver)
  • Sqlite3Driver: removed support for charset conversion
  • OracleDriver: by default uses native date format
  • removed dibi::$defaultDriver
  • removed Dibi\IDriver::connect()