v2.6.0
This is a minor release of Doctrine DBAL that aggregates over 200 fixes
and improvements that we have tested, checked, reviewed and stabilised
over the last year.
This release includes all changes of the 2.5.x
series, as well as
feature additions and improvements that couldn't land in patch releases.
Backwards Compatibility Breaks
This release comes with few potential Backwards Compatibility (BC)
breaks that, while unlikely affecting consumers of the library, are
to be considered.
Please take some time to read the UPGRADE.md documentation.
The issues related to these BC breaks are listed below.
Dependency requirement changes
The dependency requirements for DBAL 2.6.0 onwards have also changed:
- HHVM is no longer officially supported
- PHP 7.1.0 is the minimum supported PHP version
- The PDO extension is now a required dependency
Deprecations
- The
json_array
type is now to be considered deprecated - The
Doctrine\DBAL\Schema\Table#renameColumn()
API is deprecated
and disabled - The
Doctrine\DBAL\Connection#getDatabasePlatform()
may
now trigger database connections, if a platform version
isn't provided upfront
New features
This release introduces a few major additions:
- PostgreSQL 9.4+ platform support
- MySQL 5.7.9 (GA) platform support
- A
JsonType
that maps to JSON column types when supported
by the underlying RDBMS DateIntervalType
DateTimeImmutableType
DateTimeTzImmutableType
DateImmutableType
TimeImmutableType
PDO::FETCH_OBJ
emulation formysqli
andoci8
statements- SSL root certificate configuration support for
pdo_pgsql
- SSL support for
mysqli
Improvements and Fixes
This release comes with a myriad of improvements and
bug-fixes that should improve both compatibility with
exotic database engines and overall performance.
We focused on stability and reliability of
existing features, and improved the overall consistency
of cross-platform behavior of the library.
A detailed list of fixes can be found below.
Total issues resolved: 224
BC Breaks:
- 2527: Normalize method signatures for
fetch()
andfetchAll()
, ensuring compatibility with thePDOStatement
signature thanks to @phansys - 2519:
ResultStatement#fetchAll()
must define 3 arguments in order to be compatible withPDOStatement#fetchAll()
thanks to @phansys - 2504: URL-decode URL-style DSN thanks to @c960657
- 990: DBAL-1057 Connection is not lazy anymore when platform detection is necessary
- 1072: DBAL-1130 #784 Connection is not lazy anymore, since platform detection was introduced - exposing the issue via broken test
Deprecations:
- 916: Fix return type of
Table#renameColumn()
and mark it as deprecated thanks to @aivus - 1276: DBAL-1318 #916 Fix return type of
Table#renameColumn()
and mark it as deprecated - 2782: Stop using the deprecated
json_array
type internally thanks to @lcobucci
New Features:
- 718: Identify retryable transaction errors and cause them to raise specific exception types thanks to @Tobion
- 798: Add
application_name
to PostgreSQL driver connection thanks to @davividal - 814: Allow
serverVersion
to be explicitly unspecified (null
) thanks to @BreiteSeite - 819: Added support for column inline comments in SQLite thanks to @hason
- 824: DBAL-1143 Added Postgres 9.4 platform thanks to @mbeccati
- 854: add
DateInterval
type thanks to @vbartusevicius - 892: DDC-3863 add a
json
type that doesn't have the flaws ofjson_array
thanks to @Taluu - 919: add
sslrootcert
connection option to thepdo_pgsql
driver thanks to @peterjmit - 1028: DBAL-1091 #755 Update
MysqliStatement
to emulatePDO::FETCH_OBJ
behavior - 1043: DBAL-1104 DBAL-1104 #766 Add support for object hydration in oci8 driver
- 1086: DBAL-1143 add JSONB type to PostgreSQL
- 1127: DBAL-1184 DBAL-1143 #824 Added Postgres 9.4 platform
- 1176: DBAL-1228 #854 add
DateInterval
type - 1280: DBAL-1321 #919 add
sslrootcert
connection option to thepdo_pgsql
driver - 1882: DBAL-662 Support
DateTimeImmutable
- 2266: Add native JSON type support for MySQL >=5.7.8 thanks to @ismailbaskin
- 2284: Added parameter
default_dbname
to pdo_pgsql driver, used to override the default database thanks to @kimhemsoe - 2306: Add "easy connect string" support for the Oci8Driver thanks to @bobvandevijver
- 2307: Add support for Easy Connect string as connection parameter in OracleDB thanks to @bobvandevijver
- 2450: Add immutable date types support thanks to @deeky666
- 2455: Use native JSON type on MySQL >=5.7 thanks to @rh389
- 2570: Allow secure connections using SSL on mysqli thanks to @pgrau
- 2688: Support
IS NULL
checking inConnection#delete()
andConnection#update()
generated criteria, allowing fornull
column searches thanks to @jnvsor
Bug Fixes:
- 713: Prevent result cache key collisions when sharing caches across different connections thanks to @vilartoni
- 784: Connection is not lazy anymore, since platform detection was introduced - exposing the issue via broken test thanks to @weaverryan
- 827: Fix
DISTINCT
queries withLIMIT
and noORDER
on SQLServer 2012 thanks to @billschaller - 871:
SqlConsoleCommand
should show results of queries containingRETURNING
thanks to @bountin - 918: Fix typo in
DBALException
message thanks to @chadrien - 923: DBAL-1302 Avoid rewrapping
Docrine\DBAL\Exception\DriverException
with nested drivers thanks to @mathroc - 924: Correcting reference to the
Connection#rollBack()
method - case sensitivity thanks to @rawkode - 1018: DBAL-1082:
SchemaTool
does not generate DDL for MySQLunsigned float
- 1019: DBAL-1083 DBAL-1082 #749 Fix
SchemaTool
, which does not generate DDL for MySQLunsigned float
- 1130: DBAL-1187 #827 Fix
DISTINCT
queries withLIMIT
and noORDER
on SQLServer 2012 - 1138: DBAL-1194 #832 Fix test failures on Windows due to differing newlines
- 1139: DBAL-1196 #834 Remove documentation for non-existing events from
Connection#rollBack()
docblock - 1281: DBAL-1322 Correct typo in driver exception message
- 1344: DBAL-1783 #924 Correcting reference to the
Connection#rollBack()
method - case sensitivity - 2250: Unit tests are failing on OracleDB thanks to @DeepDiver1975
- 2252:
ModifyLimitQueryTest::testModifyLimitQuerySubSelect()
fails on OracleDB thanks to @DeepDiver1975 - 2253: SchemaManagerFunctionalTestCase::testDropsDatabaseWithActiveConnections() fails on OracleDB thanks to @DeepDiver1975
- 2254: Correct
SchemaManagerFunctionalTestCase::testDropsDatabaseWithActiveConnections()
on OracleDB thanks to @DeepDiver1975 - 2255: Use shorter table names, as OracleDB allows max 30 characters thanks to @DeepDiver1975
- 2263: Fix failing unit tests on OracleDB thanks to @DeepDiver1975
- 2276: Fix test case on OracleDB thanks to @deeky666
- 2335: Correct case sensitivity of usages of the
Connection#rollBack()
method thanks to @kadala - 2314:
DateIntervalType
supports conversion of invalid values thanks to @MisatoTremor - 2316: Fix
DateInterval
database value truncation (string overflow) thanks to @vbartusevicius - 2372: Handle arbitrary whitespaces when parsing SQL in order to apply
LIMIT
for MS SQL Server thanks to @morozov - 2413: Ensure deterministic results in the
ModifyLimitQueryTest
, which may otherwise fail depending on database settings and provisioning thanks to @Deltachaos - 2427: Postgres SchemaManager is reading a default of
-1
as(-1)
for postgres 9.4 thanks to @DeepDiver1975 - 2565: Both PostgreSQL 9.5 and PostgreSQL 9.6 are currently failing on Travis thanks to @photodude
- 2592: Ensure the database name is always provided when trying to use pgsql in the test suite thanks to @mikaelkael
- 2594: Schema generator is not adding
COMMENT
to custom types thanks to @fkrauthan - 2595:
assertValidIdentifier()
is too restrictive against OracleDB schema object naming rules thanks to @IMP3ter - 2604: DBAL-2595 Fix retrieving last insert ID for FQN sequence name with OCI8 - allows
.
symbol in sequence names thanks to @deeky666 - 2614: DBAL-2427 Fix negative default value introspection on PostgreSQL 9.4 thanks to @deeky666
- 2631: Fix
CREATE
/DROP DATABASE
support on SQL Server thanks to @deeky666 - 2632: Fix
"application_name"
connection parameter tests for PostgreSQL < 9.2 thanks to @deeky666 - 2640: Fix drivers'
exec()
method to not execute queries via prepared statements thanks to @deeky666 - 2669: Add missing SSL parameters to the pdo_pgsql driver thanks to @fsok
- 2671: DBAL-990 Attempt platform detection even when the database name is not set thanks to @deeky666
- 2674: Correct
testListTableColumns
checked keys thanks to @mdwheele - 2692: Fix default isolation level for the MySqlPlatform thanks to @jnvsor
- 2701:
DB2SchemaManager#listTableNames()
does not callfilterAssetNames
thanks to @asgrim - 2702: Added missing filtering of table name assets in DB2SchemaManager thanks to @asgrim
- 2709: Adding PDO as hard dependency as per discussion in #808 thanks to @Ocramius
- 2733: Correct documented parameter and return types for
Connection#quote()
thanks to @lolli42 - 2745: Wrong
Connection#quote()
parameter hinting, incompatible withPDO::PARAM_*
constants thanks to @helsner - 2747: Correct
Connection#quote()
parameter hinting, now compatible withPDO::PARAM_*
constants thanks to @helsner
Improvements:
- 768: DBAL-1106 Improve schema introspection performance on Oracle thanks to @deeky666
- 779: DBAL-1123 Initialize database schema only once per PHPUnit run thanks to @deeky666
- 781: Call
detectDatabasePlatform
only once thanks to @rosier - 810: Remove redundant
Connection#connect()
calls thanks to @rosier - 829: Add PostgreSQL connection test with the new
charset
parameter thanks to @billschaller - 841: Documentation and code styling fixes thanks to @BenMorel
- 848: DBAL-1219 Add missing
IBMDB2
driver functional tests thanks to @deeky666 - 867: Add test for schema diffing on a table with a renamed foreign key column referencing a renamed table thanks to @billschaller
- 869: Make date and time types throw exception when invalid values are passed to
convertToDatabaseValue
thanks to @billschaller - 897: Various typo and wording fixes in the codebase thanks to @SpacePossum
- 899: add
requiresSQLCommentHint
inDateIntervalType
thanks to @vbartusevicius - 902: #869 cleanups and hardening of tests around date-related types thanks to @Ocramius
- 966: DBAL-1035 #718 Identify retryable transaction errors and cause them to raise specific exception type
- 1011: DBAL-1076: #745 Added
doModifyLimitQuery
for theSQLServer2012Platform
, which usesOFFSET... FETCH
instead ofLIMIT
- 1045: DBAL-1106 DBAL-1106 #768 Improve schema introspection performance on Oracle
- 1068: DBAL-1127 #781 Call
detectDatabasePlatform
only once - 1085: DBAL-1142 #796 Map
tsvector
type astext
in PostgreSQL Platform - 1089: DBAL-1146 #798 Add
application_name
to PostgreSQL driver connection - 1103: DBAL-1161 #810 Remove redundant
Connection#connect()
calls - 1109: DBAL-1167 #814 allow
serverVersion
to be explicitly unspecified (null
) - 1118: DBAL-1176 #819 Added support for column inline comments in SQLite
- 1134: DBAL-1190 #829 Add PostgreSQL connection test with the new
charset
parameter - 1155: DBAL-1209 #841 Documentation and code styling fixes
- 1166: DBAL-1219 DBAL-1219 #848 Add missing
IBMDB2
driver functional tests - 1199: DBAL-1249 #869 Make date and time types throw exception when invalid values are passed to
convertToDatabaseValue
- 1213: DBAL-1261 return callable result from
Doctrine\DBAL\Connection::transactional()
- 1238: DBAL-1284 #897 Various typo and wording fixes in the codebase
- 1242: DBAL-1288 #899 add
requiresSQLCommentHint
inDateIntervalType
- 1247: DBAL-1292 Drop PHP 5.3 support
- 1248: DBAL-1293 Make date and time types throw exception when invalid values are passed to
convertToDatabaseValue
- 1249: DBAL-1294 #869 #902 cleanups and hardening of tests around date-related types
- 2309: Remove useless ternary in the
DecimalType
thanks to @JHGitty - 2317: Add the
ReservedWordsCommand
-l
or--list
parameter to the usage hints thanks to @rquadling - 2349: Fluent methods in QueryBuilder are now documented as returning
self
thanks to @mrclay - 2363: Add test case scenario for
LIMIT
/OFFSET
when selecting from a sub-SELECT
thanks to @Deltachaos - 2419: Remove PHP 5.5 support thanks to @Ocramius
- 2422: Map custom exceptions for the "no default value" (1364) error in the MySQL drivers thanks to @MorrisJobke
- 2425: Explicitly use
CompositeExpression#count()
method rather thancount($this)
thanks to @Progdom - 2432: Removed nearly all
call_user_*
usages thanks to @kimhemsoe - 2437: Improve the phpdoc on
Connection
thanks to @mnapoli - 2485: Remove unused parameter from
ConversionException::conversionFailedSerialization()
thanks to @greg0ire - 2493: Reuse prepared statements in the SQL Server driver thanks to @morozov
- 2494: Use the same statement resource for repeated execution of the same statement on SQL Server thanks to @morozov
- 2495: Optimize and improve parameter conversion in OCI8Statement thanks to @morozov
- 2547: Replacing spaces in the pgsql DSN string with semicolons for consistency with pdo_pgsql thanks to @Chrisissorry
- 2603: DBAL-2594 Implicitly mark types as commented in all platforms thanks to @deeky666
- 2622: Remove dead code from
MasterSlaveConnection::connect()
thanks to @jnvsor - 2630: DBAL-2626 Add PHPUnit config for ContinuousPHP OracleDB testing thanks to @deeky666
- 2653: Merge MySQL 5.7.9 (GA) semantics into MySQL57Platform thanks to @deeky666
- 2657: Enhance phpdoc of
QueryBuilder::setParameter()
thanks to @UFOMelkor - 2658: Making the
DBALException
implementThrowable
thanks to @svycka - 2704: Add error as well as exception handling to Mysqli drivers thanks to @develancer
- 2724: Improve
Table#getColumns()
performance by reducing its runtime complexity thanks to @evgpisarchik - 2735: Mysqli is missing some driver connection options thanks to @leadboots5
- 2742: Use short array declarations in the
Driver
namespace thanks to @AlessandroMinoccheri - 2746: Using short array declarations in the
MasterSlaveConnection
namespace thanks to @AlessandroMinoccheri - 2768: Add all missing MariaDB keywords to the MySQL platform thanks to @roelvanduijnhoven
- 2774: Use short array declarations in the
Query
namespace thanks to @AlessandroMinoccheri - 2776: Use short array declarations in the
Sharding
namespace thanks to @AlessandroMinoccheri - 2778: Use short array declaration inside the
Tools
namespace thanks to @AlessandroMinoccheri - 2786: Map error code 1429 to
ConnectionException
in theAbstractMySQLDriver
thanks to @SpacePossum
Documentation Improvements:
- 761: Fixed typo in types documentation thanks to @BenMorel
- 834: Remove documentation for non-existing events from
Connection#rollBack()
docblock thanks to @slider - 901: Update docs dependencies script and readme to target Ubuntu 14.04 thanks to @billschaller
- 904: Fix
tearDown
of some functional test cases thanks to @deeky666 - 907: Corrected MySQL collation support documentation thanks to @mRoca
- 909: Fix typo in transactions documentation thanks to @xelan
- 915: Correcting 2 anchors in the docs that don't exist anymore thanks to @mikeSimonson
- 1034: DBAL-1098 #761 Fixed typo in types documentation
- 1245: DBAL-1290 #901 Update docs dependencies script and readme to target Ubuntu 14.04
- 1257: DBAL-1300 #907 Corrected MySQL collation support documentation
- 1260: DBAL-1303 #909 Fix typo in transactions documentation
- 1275: DBAL-1317 #915 Correcting 2 anchors in the docs that don't exist anymore
- 2271: Correct minor formatting glitches in the transactions documentation thanks to @jonpasquier
- 2290: Document exceptions for retryable transactions thanks to @deeky666
- 2293: Fixed some broken links in the types documentation thanks to @jeanCarloMachado
- 2322: Improve overall DBAL raised Events documentation thanks to @SenseException
- 2382: Remove arbitrary line number from github link in the caching documentation thanks to @jacobhenke
- 2453: Documentation for test suite runner references non-existing files thanks to @miholeus
- 2454: #2453 Update test runner parameters in the documentation thanks to @miholeus
- 2521: Reference global namespace classes via FQCN in the transactions documentation thanks to @frost-nzcr4
- 2599: Corrected styling around the
GUID
type in the types documentation thanks to @tolbon - 2623: Generic SQL Sharding Support - Documentation of the
wrapperClass
parameter is invalid thanks to @ivanbogomoloff - 2641: DBAL-2623 Fix Generic SQL Sharding Support documentation examples thanks to @deeky666
- 2664: Add oci8 persistent connection support to the configuration documentation thanks to @mathieubouchard
- 2703: Correct documentation examples for the Doctrine\DBAL\Id\TableGenerator thanks to @JustBlackBird
- 2736: Correcting references to
Driver\Connection
in the documentation thanks to @b0nd0 - 2740: Correct classes referenced in the
Driver
implementation details in the documentation thanks to @b0nd0 - 2760: Add documentation regarding transactional exceptions thanks to @dsantang
- 2761: Fix documentation format regarding retryable exceptions thanks to @dsantang
- 2770: Fix namespace separator in the exceptions in the transactional handling documentation thanks to @Tobion
Chore:
- 770: Moved
Doctrine\Tests
namespace to composerautoload-dev
thanks to @guilhermeblanco - 778: DBAL-1122 Cleanup PHPUnit test suite bootstrap thanks to @deeky666
- 787: Add left-over console file to the mapped composer binaries thanks to @t0xicCode
- 825: Add postgresql 9.4 to travis builds thanks to @billschaller
- 830:
README.md
nicer badges, cleanup, 2.3 dropped thanks to @TomasVotruba - 832: Fix test failures on Windows due to differing newlines thanks to @billschaller
- 837: Revert the addition of the wrong
bin
script tocomposer.json
thanks to @stof - 853: Remove HHVM-nightly builds thanks to @stof
- 876: Remove unused git submodules thanks to @Koc
- 880: Drop PHP 5.3 from Travis-CI build matrix thanks to @billschaller
- 884: Travis-CI - Switch to container-based infrastructure thanks to @TomasVotruba
- 888: Allow testing against
doctrine/common
2.6
thanks to @nicolas-grekas - 911: Fix test suite on windows: skip on missing extensions, correct path flags thanks to @Tobion
- 917: Remove GIT submodule entries and use
autoload-dev
for the test suite thanks to @Tobion - 992: DBAL-1059: #735 Bump branch alias to version
2.6.0-DEV
- 1006: DBAL-1071: #740 Add
2.5
build status toREADME.md
- 1031: DBAL-1094: #758 Cleanup travis database creation
- 1050: DBAL-1110 #770 Moved
Doctrine\Tests
namespace to composerautoload-dev
- 1063: DBAL-1122 #778 Cleanup PHPUnit test suite bootstrapper
- 1064: DBAL-1123 #779 Initialize database schema only once per PHPUnit run
- 1075: DBAL-1133 #787 Add left-over console file to the mapped composer binaries
- 1128: DBAL-1185 #825 Add postgresql 9.4 to travis builds
- 1135: DBAL-1191 #830
README.md
nicer badges, cleanup, 2.3 dropped - 1143: DBAL-1199 #837 Revert the addition of the wrong
bin
script tocomposer.json
- 1174: DBAL-1226 #853 Remove HHVM-nightly builds
- 1209: DBAL-1258 #876 Remove unused git submodules
- 1215: DBAL-1263 #880 Drop PHP 5.3 from Travis-CI build matrix
- 1219: DBAL-1267 #884 Travis-CI - Switch to container-based infrastructure
- 1226: DBAL-1273 #888 Allow testing against
doctrine/common
2.6
- 1252: DBAL-1297 #904 Fix
tearDown
of some functional test cases - 1277: DBAL-1319 #917 Remove GIT submodule entries and use
autoload-dev
for the test suite - 1282: DBAL-1323 Remove submodule entries and improve test setup
- 2274: Removed
2.4.x
build status fromREADME.md
thanks to @Ocramius - 2278: Allow PHP 7 failure on Travis-CI thanks to @deeky666
- 2282: Allow PHP 7 +
pdo_pgsql
failures on Travis-CI again thanks to @deeky666 - 2340: Fix SQL queries numbering in test failure output thanks to @guilliamxavier
- 2364: Display further contextual information on failed functional tests thanks to @Deltachaos
- 2435: Replace
getMock()
withcreateMock()
thanks to @deeky666 - 2488: Blacklist buggy phpunit-mock-objects v3.2.5 from the dev dependencies thanks to @greg0ire
- 2480: Exclude buggy phpunit-mock-objects v3.2.4 from the allowed dev dependencies thanks to @greg0ire
- 2550: Bump HHVM version to 3.15.2+ thanks to @photodude
- 2564: Add PostgreSQL 9.6 to the build pipeline thanks to @photodude
- 2590: Remove support for PHP 5.x thanks to @railto
- 2607: DBAL-2565 Remove fragile test that cannot be abstracted across all PostgreSQL versions thanks to @deeky666
- 2626: Test OracleDB abstractions in a continuous integration environment thanks to @photodude
- 2629: HHVM testing needs to be in PHP 7 mode thanks to @photodude
- 2633: Run SQL Azure tests conditionally thanks to @deeky666
- 2655: Simplify Travis-CI build matrix thanks to @photodude
- 2660: Revert PgSQL and MariaDB Travis-CI build matrix simplification thanks to @photodude
- 2732: Update
docs/en/_theme
submodule references thanks to @eibt - 2750: Require PHP 7.1 thanks to @lcobucci
- 2755: Ensure compatibility with different MySQL versions thanks to @lcobucci
- 2756: Add Scrutinizer-CI to the build pipeline thanks to @malukenho
- 2757: Add mysql version 5.6 and 5.7 to Travis-CI thanks to @epinxteren
- 2758: Generate code coverage via PHPUnit, pass it to Scrutinizer-CI thanks to @malukenho
- 2764: Add mysql versions 5.6 and 5.7 to Travis-CI thanks to @zghosts