Releases: doctrine/dbal
Release v2.8.1
Release v2.8.1
This release backports the bug fixes implemented in newer DBAL versions.
- Total issues resolved: 7
PostgreSQL:
- 3158: postgres: correctly produce alter table sql comment to update column definition thanks to @bendavies
- 3226: Ignore case when matching ARRAY thanks to @ohvitorino
- 3268: Force Sequence::$initialValue type thanks to @vpArth
Oracle:
- 3297: Do not generate SID or SERVICE_NAME when dbname or service name is not specified thanks to @morozov and @lcp0578
- 3330: Fixed quoting of string literals containing backslash thanks to @morozov
SQL Anywhere:
Continuous Integration:
Release v2.8.0
Release v2.8.0
This is a minor release of Doctrine DBAL that aggregates over 30 fixes and improvements developed over the last 3 months.
This release includes all changes of the 2.7.x series, as well as feature additions and improvements that couldn’t land in patch releases.
Backwards Compatibility Breaks
This doesn't contain any intentional Backwards Compatibility (BC) breaks.
Dependency Changes
- The dependency on doctrine/common is removed. DBAL now depends on doctrine/cache and doctrine/event-manager instead.
Please see details in the UPGRADE.md documentation.
Deprecations
- The usage of binary fields whose length exceeds the maximum field size on a given platform is deprecated. Please use binary fields of a size which fits all target platforms, or use blob explicitly instead.
- The usage of DB-generated UUIDs is deprecated. Their format is inconsistent across supported platforms and therefore the feature is not portable. Use a PHP library (e.g. ramsey/uuid) to generate UUIDs on the application side.
New features
- Initial support of MySQL 8.
- Initial support of PostgreSQL 11.
- Ability to evaluate arbitrary SQL expressions via
AbstractPlatform::getDummySelectSQL()
.
Improvements and Fixes
- Improved support of binary fields on Oracle and IBM DB2.
- Improved SQL Server configuration capabilities via both
sqlsrv
andpdo_sqlsrv
. - Improved handling of
AUTOINCREMENT
ed primary keys in SQLite. - Integration tests are run against IBM DB2 on Travis CI.
- Code coverage is collected for the Oracle platform on continuousphp.
Total issues resolved: 33
Deprecations:
- 3187: Deprecate usage of binary fields whose length exceeds maximum thanks to @morozov
- 3188: Deprecated usage of binary fields whose length exceeds the platform maximum thanks to @morozov
- 3192: Added more information to the deprecation notice thanks to @morozov
- 3212: Deprecated usage of DB-generated UUIDs thanks to @morozov
New Features:
- 3109: Allow to specify arbitrary SQL expression in AbstractPlatform::getDummySelectSQL() thanks to @morozov
- 3128: Add MySQL 8 reserved keywords thanks to @mlocati
- 3160: Test against Postgres 11 thanks to @Majkl578
Bug Fixes:
- 3149: Introduced binary binding type to support binary parameters on Oracle thanks to @morozov
- 3178: Fix incorrect exception thrown from SQLAnywhere16Platform thanks to @Majkl578
- 3044: Functional test for allowing dynamic intervals in date sub/add thanks to @AshleyDawson
Improvements:
- 3033: Added support for available DSN parameters for the PDOSqlsrv driver thanks to @aashmelev
- 3141: allow creating PRIMARY KEY AUTOINCREMENT fields for sqlite (unit tests) thanks to @TimoBakx
- 3143: initialize sql array into platform files thanks to @AlessandroMinoccheri
- 3157: When building a limit query, zero offset without a limit should be ignored thanks to @morozov
- 3180: Import simplified version of Common\Util\Debug for var dumping purposes thanks to @Majkl578
Documentation Improvements:
- 3117: Added badges for the develop branch in README thanks to @morozov
- 3125: Upgrading docs thanks to @jwage
- 3144: added improvement type into pull request template thanks to @AlessandroMinoccheri
Code Quality Improvements:
- 3025: Added PHPStan, apply changes for level 3 thanks to @Majkl578
- 3200: Php Inspections (EA Ultimate): minor code tweaks thanks to @kalessil
- 3204: Fix typo in AbstractPlatform thanks to @Majkl578
- 3205: Ignore OCI-* classes in static analysis (no stubs) thanks to @Majkl578
Continuous Integration Improvements:
- 3049: Test failures caused by invalid database connection result in fatal error thanks to @Majkl578
- 3102: Use newer PHPUnit to prevent crashes on failures thanks to @Majkl578
- 3112: Removed hard-coded configuration filenames from the test runner thanks to @morozov
- 3133: Travis DB2 thanks to @Majkl578, @morozov
- 3135: AppVeyor tweaks, retry coverage upload on failure thanks to @Majkl578
- 3137: Workaround for the inability to use a post-PHPUnit script on ContinuousPHP thanks to @morozov
- 3151: MSSQL DLL 5.2.0 has been released. thanks to @photodude
Dependencies
- 3173: Fix composer branch aliases thanks to @Majkl578
- 3176: Eliminate dependency on doctrine/common thanks to @Majkl578
- 3181: Remove dependency on doctrine/common thanks to @Majkl578
- 3193: DBAL 2.8 needs Common 2.9 thanks to @Majkl578
Release v2.7.2
Release v2.7.2
This release backports the bug fixes implemented in newer DBAL versions.
Total issues resolved: 7
Platforms:
Schema Comparison:
- 3086: Postgres, Oracle and SQL Server Sequence increment_by & min_value as int thanks to @simPod
- 3210: Unnecessary alter sequence queries generated on Oracle db during schema update thanks to @bobvandevijver
Performance:
- 3114: Portability Statement still fetches all data in iterator mode thanks to @morozov
- 3115: Replaced ArrayIterator with StatementIterator in Portability\Connection thanks to @morozov
Documentation:
v2.7.1
Release v2.7.1
This release fixes unintentional BC breaks:
- It was impossible to use deprecated fetch modes with PDO-based drivers.
- An unsupported option passed to the
Column
object prevented subsequent options from being applied. - Date interval values stored prior to upgrade to
v2.7.0
were reported as invalid.
Total issues resolved: 10
Backwards Compatibility Fixes:
- 3082: Custom PDO fetch modes and 2.7.0 thanks to @corphi
- 3088: Fix #3082: Add BC for PDO-only fetch modes thanks to @corphi
- 3089: Don't skip column options. thanks to @andytruong
- 3093: When updating to version v2.7 type DateInterval throws errors thanks to @fnagel
- 3097: Fix compatibility for pre-2.7 DateIntervalType format thanks to @Majkl578
Documentation Improvements:
- 3083: Document the correct way of configuring a MariaDB database with serverVersion thanks to @tristanbes
- 3084: README: Add 2.7, drop 2.5 thanks to @Majkl578
Continuous Integration Improvements:
v2.7.0
This is a minor release of Doctrine DBAL that aggregates over 80 fixes and improvements developed over the last 8 months.
This release includes all changes of the 2.6.x
series, as well as feature additions and improvements that couldn't land in patch releases.
Backwards Compatibility Breaks
This release comes with one potential Backwards Compatibility (BC) break that is to be considered during upgrade.
Please see the details below.
Dependency requirement changes
There are no changes in requirements to runtime dependencies.
Deprecations
- Direct usage of
PDO::
constants in calls to DBAL API is deprecated. - Calls to
\PDOStatement
methods on a\Doctrine\DBAL\Driver\PDOStatement
instance are deprecated. - A series of enum-like constants are deprecated.
- Setting unsupported options on a schema column object is deprecated.
Please see details in the UPGRADE.md documentation.
New features
This release introduces the following major additions:
- MariaDB 10.2 platform support
- PostgreSQL 10 platform support
Improvements and Fixes
This release comes with a few bug fixes and a significant set of improvements in continuous integration processes, code style and documentation:
- The code is continuously tested on all supported versions of SQL Server on Windows and Linux.
- The code is tested with lowest compatible versions of dependencies.
- New improved code style requirements have been introduced.
- The codebase has been cleaned up from the fragments required to support the older PHP versions and uses the full power of the PHP 7.1.
- All pull requests are validated for compliance with the coding standards before getting accepted.
- Handling of platform-specific features has been improved.
A detailed list of fixes can be found below.
Total issues resolved: 81
BC Breaks:
Deprecations:
- 2846: Ensure column options map to an existing method thanks to @greg0ire
- 2996: Forward compatibility with 3.x thanks to @morozov
- 2998: Extract some constants into TransactionIsolationLevel, TrimMode and DateIntervalUnit thanks to @Majkl578
New Features:
- 2825: MariaDB 10.2 initial support thanks to @belgattitude
- 2893: PostgreSQL 10 support thanks to @simPod
Bug Fixes:
- 2819: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: Invalid platform version "5.5.5-10.1.25-MariaDB thanks to @stfast
- 2868: Doctrine\DBAL\Exception\InvalidFieldNameException when working with DB schema on PostgreSQL 10 thanks to @skobkin
- 2988: renameColumn will changed default from NULL to 'NULL' thanks to @kingshark8848
Improvements:
- 2551: Implement the column collation for Mysql thanks to @mikeSimonson
- 2578: DateIntervalType (negative support) thanks to @galeaspablo
- 2588: Inherit charset from master connection if not set explicitly thanks to @Deltachaos
- 2718: Add iterators for non pdo drivers. thanks to @jenkoian
- 2616: CI testing of MSSQL on windows with AppVeyor thanks to @photodude
- 2617: Testing of MSSQL on Windows with AppVeyor thanks to @photodude
- 2835: Stop relying on Type::__toString thanks to @greg0ire
- 2851: Test default value declaration for the date type thanks to @greg0ire
- 2919: Add tests for column collation to prove it works thanks to @Tobion
- 2952: Enabled testFetchLongBlob() for PDO SQL Server driver thanks to @morozov
- 2954: The IBM DB2 Statement driver suppresses errors triggered by db2_execute thanks to @morozov
- 2955: Removed error suppression in IBM DB2 Statement thanks to @morozov
- 3009: PHPUnit 7 thanks to @carusogabriel
- 3013: Escape LIKE metacharacters thanks to @greg0ire
- 3019: Allow dynamic intervals in DATE_ADD & DATE_SUB for SQLite thanks to @fogs
- 3020: Improve handling of schemas in SQL Server >= 2008 thanks to @stlrnz
- 3031: Connection parameters are cached hashed thanks to @fullbl
Documentation Improvements:
- 2793: Fix articles of words sounding with a consonant (SQL => ESS-kew-ELL) thanks to @afoeder
- 2799: Fix Shard Manager docs with more accurate docblocks in
SQLAzureShardManager
andPoolingShardManager
thanks to @tolbon - 2813: fixed return type into OCI8Statement thanks to @AlessandroMinoccheri
- 2814: Incorrect documentation example for
QueryBuilder#set()
thanks to @Dormilich - 2818: #2814 removing incorrect
QueryBuilder#set()
documentation, which was showing wrong password hashing and value binding practices (combo!) thanks to @Dormilich - 2827: use intended semantics thanks to @greg0ire
- 2840: Proofread types doc thanks to @greg0ire
- 2874: Tenant documentation typos thanks to @phil-davis
- 2875: Doc typos and grammar thanks to @phil-davis
- 2864: Removed the "OCI8: SQL Queries with Question Marks" section thanks to @morozov
- 2935: Improve deprecation wording in
Doctrine\DBAL\Schema\Column#setOptions()
thanks to @greg0ire - 2940: Clean up note on query builder setParameter documentation thanks to @jnvsor
- 3027: Documentation: Warn against using object fields in MySQL and MariaDB thanks to @Jasu
- 3068: typo in known vendor issues documentation thanks to @gdc676463
- 3069: fix typo in known vendor issues documentation thanks to @gdc676463
Continuous Integration Improvements:
- 2801: added badges for continuousphp and other badges for 2.6 thanks to @ppaulis
- 2849: Update build to use stages (adding PHPCS to check for CS violations) thanks to @lcobucci
- 2920: Improve build configuration thanks to @lcobucci
- 2936: Incremental check for coding standards in pull requests thanks to @morozov
- 2946: Attempt to run PostgeSQL 10 on Travis thanks to @Majkl578
- 2956: Travis: Test against lowest and dev dependencies thanks to @Majkl578
- 2961: Code style check fails on develop thanks to @morozov
- 2962: Fixed code style check failures for pull request against non-master branches thanks to @morozov
- 3050: Test SQL Server 17 on Travis thanks to @Majkl578
- 3056: Set Appveyor to use PHP 7.2 thanks to @photodude
- 3062: Added badges for AppVeyor thanks to @morozov
Code Style Improvements:
- 2789: Use short array declarations thanks to @AlessandroMinoccheri
- 2797: Typing final class DriverManager thanks to @tolbon
- 2798: Fix PSR2 rules : "the static declaration should come after visibility" thanks to @tolbon
- 2800: Fix inconsistent/missing return statements thanks to @tolbon
- 2809: Missing @throws declarations in Connection thanks to @bestform
- 2810: add @throws declarations to docs in Connection thanks to @bestform
- 2856: use newer PHP syntax thanks to @AlessandroMinoccheri
- 2857: use newer PHP syntax thanks to @AlessandroMinoccheri
- 2858: Style improvements thanks to @greg0ire
- [2869: fixed typo into security documentation](https://github.com/doctrine/dbal/pull...
v2.6.3
This release fixes the generation of default values of immutable date/datetime
times, default values of PostgreSQL's SERIAL types, and the required arguments
for SSL connections using MySQLi.
Also includes a fix for a BC-break related to json types comparison.
Total issues resolved: 11
- 2815: mysqli ssl_key and ssl_cert should not be mandatory thanks to @gauauu
- 2816: #2815 don't require
ssl_key
andssl_cert
to usessl_ca
thanks to @gauauu - 2596: Schema diff keeps thinking custom mapping types have changed thanks to @vicdelfant
- 2905: Fixes custom type comment regex thanks to @jeremy-smith-maco
- 2679: Fix: Doctrine custom types now accepts anything but ')' thanks to @PedroTroller
- 2907: Don't Set a Default Value on PostgreSQL SERIAL Fields thanks to @chrisguitarguy
- 2906: Cannot Generate [BIG]SERIAL Columns Without a Default or NOT NULL thanks to @chrisguitarguy
- 2859: DateTimeImmutable error with default value CURRENT_TIMESTAMP thanks to @tok-amsiq
- 2861: Default value declaration for immutable types thanks to @tok-amsiq
- 2880: Symfony 3 - Postgresql JSON type always appear in diff thanks to @PapsOu
- 2855: Fix BC-break regarding JsonArrayType thanks to @lcobucci
v2.6.2
This release fixes an incorrect optimisation in
Doctrine\DBAL\Query\Expression\CompositeExpression
which
could have led to dropping query expression components.
Also, DBAL was ignoring some important platform settings
when determining which cache keys to use when looking for
result caches: that could have led to sharing caches for
results produced by different DB connections.
Total issues resolved: 2
v2.6.1
This release fixes an unintentional BC break that
prevented using DateTimeImmutable
interfaces
in the pre-existing date-related types.
Users are still encouraged to migrate to the newly
introduced immutable date types.
Total issues resolved: 2
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 @vbartusevi...
v2.5.13
This release fixes a number of issues around the PostgreSQL,
OracleDB and MySQL platforms database introspection.
Connection DSN generation fixes were applied for the
SQLAnywhere driver.
Corrections on how record fetching mode have been applied to
the DB2 driver.
Fixes were applied to the handling of cursors and result
caching with pdo_sqlsrv.
Total issues resolved: 16
- 889: #1234 On OracleDB, a "Table has no primary key" error is raised when the index and the constraint name don't match thanks to @nitso
- 1131: DBAL-1188: OracleDB: List table columns are returned in the wrong order thanks to @doctrinebot
- 1234: DBAL-1280: "Table has no primary key" when generating entities for Oracle tables thanks to @doctrinebot
- 2405: SQLAnywhere corrections for DSN generation and persistent connections thanks to @andipohl
- 2647: DBAL-2644: Fix
fetchAll(PDO::FETCH_COLUMN)
on DB2 with Portability wrapper thanks to @morozov - 2650: Fix result cache and PDO connection test on
pdo_sqlsrv
thanks to @deeky666 - 2651: Fix closing statement cursor on
pdo_sqlsrv
if not executed yet thanks to @deeky666 - 2654: Make functional sqlanywhere driver tests conditional thanks to @deeky666
- 2670: Slash before
_
in postgresqlLIKE
condition with anypg_
prefix to prevent confusion with the wildcard character thanks to @blackbjorn - 2673: #1131 On OracleDB,
getListTableColumnsSQL
returns columns ordered by position instead of by name thanks to @mdwheele - 2686: #889 On OracleDB, primary key is considered missing if
index_name != constraint_name
thanks to @SkydiveMarius - 2696: MySQL: Fix primary key alteration when adding new columns thanks to @drieschel
- 2714:
Sequence::isAutoIncrementsFor()
is not normalising PK column, and is unable to distinguish different casing thanks to @dhensby - 2715: #2714
Sequence::isAutoIncrementsFor()
is now case-insensitive thanks to @dhensby - 2720:
SQLParserUtils::getPlaceholderPositions()
fails if there are quoted strings containing only backslashes thanks to @mondrake - 2730: Corrected duplicate
COMMENT
part in DDL statement thanks to @mondrake