Releases: doctrine/dbal
Release 2.10.2
Release 2.10.2
- Total issues resolved: 4
- Total pull requests resolved: 19
- Total contributors: 10
Bug Fixes
- 3937: Column comment incorrectly introspected on SQLite thanks to @morozov
- 3894: Make sure that the $types array has the same keys $params thanks to @morozov
- 3893: Ensure the constructor arguments are passed to custom classes thanks to @duncan3dc
- 3843: Fix unquoted stmt fragments backslash escaping thanks to @morozov
- 3832: Fix JOIN with no condition bug thanks to @BenMorel
- 3821: [pg] fix getting table information if search_path contains escaped schema name thanks to @linniksa
- 3790: fixed unqualified table name of fk constraints when using schemas thanks to @stlrnz and @Alarich
Static Analysis Improvements
- 3964: Mark every exception as immutable thanks to @greg0ire
- 3961: Stop relying on the master version of Psalm thanks to @greg0ire
- 3955: Remove baseline thanks to @greg0ire
- 3951: Setup static analysis with Psalm thanks to @greg0ire
- 3799: Upgrade to PHPStan v0.12 thanks to @lcobucci
CI Improvements
- 3884: Use Docker consistently thanks to @greg0ire
- 3478: Improve readiness probe stability for containerized databases on CI thanks to @morozov
- 3883: Fix broken build thanks to @greg0ire
Documentation Improvements
- 3896: Updated documentation for QueryBuilder::execute() return value type thanks to @morozov
- 3886: Update readme thanks to @greg0ire
- 3842: Fixed the QueryBuilder::setMaxResults() signature to accept NULL thanks to @morozov
- 3834: Fix docblock typos in DriverManager docs thanks to @CHItA
- 3812: Fix DebugStack#queries docblock type thanks to @ostrolucky
Test Suite Improvements
Release v2.10.1
This release fixes regressions introduced in release v2.10.0, implements some CI/testing improvements and introduces updates in the documentation.
- Total issues resolved: 2
- Total pull requests resolved: 9
- Total contributors: 9
Regressions:
- 3738: Fix breaks named parameters in Oracle thanks to @eisberg and @matesko
CI improvements and maintenance:
- 3784: Use PHP 7.4 instead of a snapshot on Travis thanks to @andreybolonin
- 3778: [GH-3777] Don't remove composer lock travis on stable 2.10 branch thanks to @beberlei
- 3753: Allow build failures for unstable dependencies thanks to @morozov
- 3720: Switched from PHPBrew-based configuration to the Docker-based thanks to @morozov
Test suite improvements:
Documentation updates:
-
3793: Remove superfluous Configuration instance thanks to @mhitza
-
3739: Update deprecation messages to refer to DBAL thanks to @alcaeus
-
3723: Fix annotations thanks to @enumag and @Pnoexz
Release v2.10.0
Release v2.10.0
This is a minor release of Doctrine DBAL that aggregates over 70 fixes and improvements developed by 25 contributors over the last year.
This release focuses on internal code quality improvement and deprecating the functionality identified for removal in the next major release.
Note that PHP 7.2 is now the minimum supported PHP version.
Backwards Compatibility Breaks
This release introduces a minor BC break. Default column values are no longer handled as SQL expressions. They are converted to SQL literals (e.g. escaped). The previous behavior was not portable and was never by design.
Clients must now specify default values in their initial form, not in the form of an SQL literal (e.g. escaped).
Before:
$column->setDefault('Foo\\\\Bar\\\\Baz');
After:
$column->setDefault('Foo\\Bar\\Baz');
Deprecations
- The usage of the
getDriver()
,getDatabasePlatform()
andgetSchemaManager()
methods of theConnectionEventArgs
class has been deprecated. - The usage of the
getDatabasePlatform()
method of theSchemaColumnDefinitionEventArgs
class has been deprecated. - The usage of the
getHost()
,getPort()
,getUsername()
andgetPassword()
methods of theConnection
class has been deprecated. - Passing multiple SQL statements as an array to
SchemaAlterTableAddColumnEventArgs::addSql()
and the same method in otherSchemaEventArgs
-based classes is deprecated. - Calling
AbstractSchemaManager::tablesExist()
with a string argument is deprecated. - Calling
OracleSchemaManager::createDatabase()
without an argument or by passingNULL
is deprecated. - Unused schema manager methods are deprecated.
AbstractSchemaManager::_getPortableFunctionsList()
,AbstractSchemaManager::_getPortableFunctionDefinition()
,OracleSchemaManager::_getPortableFunctionDefinition()
,SqliteSchemaManager::_getPortableTableIndexDefinition()
.
- The usage of
NULL
to indicate empty$username
or$password
when callingDoctrine\DBAL\Driver::connect()
is deprecated. - Method
Doctrine\DBAL\Platforms::_getAlterTableIndexForeignKeySQL()
has been deprecated as no longer used. - Property
Doctrine\DBAL\Driver\OCI8\OCI8Statement::$_PARAM
has been deprecated as not used. - Method
Doctrine\DBAL\Driver::getName()
is deprecated. - The usage of user-provided
PDO
instance is deprecated. Type::*
constants are deprecated.- The
Doctrine\DBAL\Driver\SQLSrv\SQLSrvStatement::LAST_INSERT_ID_SQL
constant has been deprecated. - The constants in
Doctrine\DBAL\SQLParserUtils
have been deprecated. - The
Doctrine\DBAL\Logging\LoggerChain::addLogger
method has been deprecated.
Please see the details in the UPGRADE.md documentation.
New Features and Improvements
- 3674: Add missing MySQL 8.0 reserved keywords thanks to @loilo
- 3512: Support for comments on table in all databases thanks to @moufmouf
- 3418: Add column charset for MySql thanks to @altertable
MySQL-related changes:
- 3668: Quote collation on MySQL thanks to @staudenmeir
- 3374: Clean up
MySqlPlatform::getListTableIndexesSQL()
fields thanks to @BenMorel - 3311: Ensuring correct
ALTER TABLE
statement for creation of anAUTO INCREMENT
column as newPRIMARY KEY
thanks to @arnegroskurth
Driver level changes:
- 3677: Relax statement type declaration thanks to @greg0ire
- 3521: Maintain platform parameter in connection params thanks to @jwage and @Perf
- 3588: Add commit result bool thanks to @otazniksk
Schema management:
Types improvements:
- 3356: Extract constants for built-in types from Type to Types thanks to @Majkl578
- 3354: Extract type factory and registry from Type into TypeRegistry thanks to @Majkl578
Compatibility with Symfony 5:
- 3706: add missing exit codes to ensure Symfony 5 compatibility thanks to @dmaicher
- 3563: Allow Symfony 5 thanks to @nicolas-grekas
Query Builder:
Logging:
Code quality improvements:
- 3667: Phpstan fix backport thanks to @morozov
- 3663: Updated PHPStan to v0.11.15 thanks to @morozov
- 3604: Updated Jetbrains PhpStorm stubs to 2019.1 thanks to @morozov
- 3549: Removed the assertion which doesn't work with a user-provided PDO connection thanks to @morozov
- 3489: Update doctrine coding standard from 5.0 to 6.0 thanks to @amaabdou
- 3481: Updated PHPStan to v0.11.3 thanks to @morozov
- 3443: PHPStan Level 7 thanks to @morozov
- 3442: PHPStan Level 6 thanks to @morozov
- 3436: PHPStan Level 5 thanks to @morozov
- 3435: PHPStan Level 4 thanks to @morozov
- 3432: Updated PHPStan to v0.11 thanks to @morozov
Test suite improvements:
- 3705: Don't skip a test for sqlite thanks to @Federkun
- 3689: Updated PHPUnit to 8.4.1 thanks to @morozov
- 3664: Refactor usage of MockBuilder's deprecated setMethods() thanks to @baspeeters
- 3643: Bumped PHPUnit requrement to ^8.3.3, removed dependency on symfony/phpunit-bridge thanks to @morozov
- 3609: Reworked the mocks generated by Prophecy using PHPUnit thanks to @morozov
- 3608: Added a unit test for Doctrine\DBAL\Logging\LoggerChain thanks to @morozov
- 3600: Updated PHPUnit to 8.2.1 thanks to @morozov
- 3575: Enforced parameter and return value types in test classes thanks to @morozov
- 3566: Upgraded to PHPUnit 8.1.6 and reworked the remaining driver exception mock thanks to @morozov
- 3555: Removed the rest of mock classes thanks to @morozov
- 3546: Reworked driver exception tests thanks to @morozov
- 3530: Improve ExceptionTest::testConnectionExceptionSqLite thanks to @jwage
- 3474: Remove more hard-coded mock classes thanks to @morozov
- 3470: Replaced MockPlatform with the ones generated by PHPUnit thanks to @morozov
- 3468: Marked some test classes abstract thanks to @morozov
- 3446: Upgraded PHPUnit to 8.0 thanks to @morozov
Documentation improvements:
- 3616: Fix typo in docblock thanks to @rdarcy1
- 3559: add .github/FUNDING.yml thanks to @jwage
- 3556: Removed 2.8 from README thanks to @morozov
- 3514: Expand list of keywords in composer.json thanks to @Majkl578
- 3504: fix #3479 (typos in example-code in QueryBuilder) thanks to @DavidBruchmann
- 3503: Fix the branch alias for master thanks to @stof
- 3463: fixed a typo in PoolingShardConnection phpdoc thanks to @adapik
- 3408: Removed unused build files thanks to @morozov
- 3404: Link to Slack instead of Gitter thanks to @greg0ire
- 3376: Bump version to 2.10.0-DEV thanks to @morozov
CI improvements:
- 3688: Temporarily disable the usage of PHPUnit 8.4 due to a regression thanks to @morozov
- 3654: fix Appveyor builds thanks to @mmucklo
- 3644: Using command line options to configure MySQL 8 instead of mounting a config file thanks to @morozov
- 3509: Enabled the build against IBM DB2 on PHP 7.3 on Travis CI thanks to @morozov
- [3528: Rewo...
Release v2.9.3
Release v2.9.3
This release fixes regressions introduced in previous releases and other bugs.
- Total issues resolved: 5
- Total pull requests resolved: 14
- Total contributors: 9
Regressions
-
3686: Fixed query result caching when
FetchMode::COLUMN
is used thanks to @morozov and @Junker -
3456: Compare type class when comparing columns. thanks to @garret-gunter and @cs278
Other bugs
-
3679: fix begin trasaction after reconnect thanks to @kalinin-k-a
-
3547: Default column expressions do not work on SQL Server thanks to @morozov
-
3420: Index length can be a
string
: ensure that it is an integer when read by theMySqlSchemaManager
thanks to @leofeyer
CI improvements and maintenance
-
3702: Updated SQL Server extensions to fix build failures on PHP 7.4 thanks to @morozov
-
3662: Marked connection exception test incomplete on MySQL 8 thanks to @morozov
-
3622: Switched from ibmcom/db2express-c to ibmcom/db2 thanks to @morozov
-
3465: Replaced MySQL 5.7 installed from a PPA with an official Docker image thanks to @morozov
-
3454: CI: Test against PHP 7.4snapshot instead of nightly (8.0) thanks to @Majkl578
-
3452: Fixed AppVeyor build configuration and the issue on SQL Server thanks to @morozov and @Majkl578
-
3447: Replaced custom docker image for PostgreSQL with the official one thanks to @morozov
-
3407: CI: Test against MySQL 8.0 on Travis thanks to @morozov
PHP 7.4 support
- 3642: Fixed test failures on PHP 7.4 thanks to @morozov
Release v2.9.2
Release v2.9.2
This release fixes regressions introduced in v2.9.1.
- Total issues resolved: 2
MySQL, Schema Introspection:
- 3410: MySqlSchemaManager::parseCreateOptions() must be of the type string, null given thanks to @jarnovanleeuwen and @morozov
MySQL, Schema Comparison:
Release v2.9.1
Release v2.9.1
This release fixes regressions introduced in v2.9.0 and issues specific to the SQL Anywhere platform.
- Total issues resolved: 11
MySQL, Schema Introspection:
- 3393: Fixed parsing MySQL create table flags (options without a value) thanks to @morozov and @AdrianSherwood
- 3398: BC Break in 2.9.0 for MySQL Tables containing partitions thanks to @bcremer
SQL Anywhere:
- 3375: [SQL Anywhere] Fix bound parameter references in PHP 7 thanks to @deeky666
- 3378: [SQL Anywhere] Fix query limit values "0" and "null" thanks to @deeky666
- 3385: [SQL Anywhere] Fix fetching empty values via fetchAll() thanks to @deeky666
- 3386: [SQL Anywhere] Fix view schema introspection test thanks to @deeky666
Schema Comparison:
- 3382: Reverted strict comparison back to loose because of a new regression thanks to @morozov and @Majkl578
Connections:
Cache:
Documentation:
Release v2.9.0
Release v2.9.0
This is a minor release of Doctrine DBAL that aggregates over 40 fixes and improvements developed by 18 contributors over the last 5 months.
This release includes all changes of the 2.8.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.
Deprecations
- The usage of
NULL
to specify the absence of an offset inLIMIT
ed queries is deprecated. Use0
instead. - It's not recommended to rely on the default length specified by implementations of
Type
. These values are not used by the library and will be removed. - It's not recommended to rely on the string representation of
Type
objects. - Regular-expression based asset filters are deprecated in favor of callback-based as more extensible.
- Calling
Statement::fetchColumn()
with an invalid column index is deprecated. - The
dbal:import
CLI command is deprecated. Please use other database client applications for import.
Please see details in the UPGRADE.md documentation.
New Features
- Added support for MariaDB 10.3.
- Added support for Windows authentication for SQL Server.
- Added support for column length in index definitions on MySQL.
Improvements and Fixes
- Implemented handling BLOB objects represented as streams in the MySQL (
mysqli
) driver. - Implemented handling BLOB objects represented as streams in the IBM DB2 driver.
- DBAL is now continuously tested with the PDO driver for Oracle.
- Implemented handling of URLs in master-slave and pooling-shard connection configuration.
- The codebase is now fully compatible with the Doctrine Coding Standard v5.0.
Total issues resolved: 45
Deprecations:
- 3244: Deprecated dbal:import CLI command thanks to @morozov
- 3253: Deprecated usage of the NULL offset in LIMITed queries thanks to @morozov
- 3256: Deprecate Doctrine\DBAL\Types\Type::getDefaultLength() thanks to @Majkl578
- 3258: Deprecate Doctrine\DBAL\Types\Type::__toString() thanks to @Majkl578
- 3316: Deprecated regex-based asset filters thanks to @morozov
- 3359: Removed DataAccessTest::testFetchColumnNonExistingIndex() since it covers a bug in PDO thanks to @morozov
New Features:
- 2412: Add mysql specific indexes with lengths thanks to @bburnichon
- 3278: Add support for MariaDB 10.3 thanks to @javiereguiluz
- 3283: MariaDB improvements, support 10.3 thanks to @sidz
- 3333: Allow windows (userless/passwordless) authentication for SQL Server thanks to @odinsey
Bug Fixes:
- 3355: Implemented comparison of default values as strings regardless of their PHP types thanks to @morozov and @Majkl578
Improvements:
- 3201: Fix support for URL to account for master-slave and pooling-shard connections thanks to @stof
- 3217: Fix that MysqliStatement cannot handle streams thanks to @mpdude
- 3235: Use PSR-4 autoloader thanks to @Majkl578
- 3254: Throw ConversionException when unserialization fail for array and object types thanks to @seferov
- 3259: Update export ignores thanks to @Majkl578
- 3309: Implemented handling BLOBs represented as stream resources for IBM DB2 thanks to @morozov and @mpdude
- 3331: Fetch all should use the driver statement's fetchAll method thanks to @michaelcullum
Documentation Improvements:
- 3223: GitHub template grammar/spelling fixes thanks to @GawainLynch
- 3232: Removed NOW() from QueryBuilder usage examples thanks to @morozov
- 3239: 2.8 in README & branch alias to 2.9 thanks to @Majkl578
- 3269: Fixed type hints in DockBlocks thanks to @marforon
- 3275: Add .doctrine-project.json to root of the project. thanks to @jwage
- 3276: Update homepage thanks to @Majkl578
- 3280: Use behaviuor instead of behavior thanks to @BackEndTea
- 3285: Remove old comment from MysqliStatement thanks to @mpdude
- 3318: Removed link to www.doctrine-project.org from doc blocks thanks to @morozov
- 3319: remove ClassLoader thanks to @garak
- 3337: Fix of links in documentation thanks to @SenseException
- 3350: Remove pdo_sqlsrv from known vendor issues list thanks to @ostrolucky
- 3357: Fix typo thanks to @BenMorel
- 3370: Removed 2.7 from README thanks to @morozov
Code Quality Improvements:
- 3252: Replaced call_user_func_array() of a fixed method with the usage of variadic arguments thanks to @morozov
- 3306: Fixed coding standard violations in the codebase thanks to @morozov
- 3303: Updated doctrine/coding-standard to 5.0, thanks to @morozov
- 3317: Implemented proper escaping of string literals in platforms and schema managers thanks to @morozov
- 3363: Remove redundant implements thanks to @BenMorel
Continuous Integration Improvements:
- 3307: Test against the latest stable sqlsrv extension thanks to @morozov
- 3320: Trying to fix failing DB builds thanks to @morozov
- 3325: Updated PHPUnit to 7.4 thanks to @morozov
- 3339: ContinuousPHP configuration for PDO Oracle driver thanks to @morozov
- 3365: Reorganize Travis build matrix thanks to @BenMorel
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: