Releases: doctrine/dbal
2.12.0
Release 2.12.0
2.12.0
- Total issues resolved: 1
- Total pull requests resolved: 7
- Total contributors: 5
Documentation,Static Analysis
CI
- 4374: Reduce number of build jobs thanks to @greg0ire
- 4365: Fail on extension / tool installation failure thanks to @greg0ire
Bug,Static Analysis
- 4373: Psalm fails on release commits thanks to @morozov
Documentation,Error Handling
CI,PHP
- 4361: Test all extensions with PHP8 thanks to @greg0ire
PHP
- 4347: [2.12] PHP 8 compatibility thanks to @derrabus
Release 2.11.3
Release 2.11.3
- Total issues resolved: 1
- Total pull requests resolved: 1
- Total contributors: 2
Regression in PostgreSQL Schema Manager
- 4364: Move the logic out of the assertion thanks to @morozov and @andreybolonin
Release 2.11.2
Release 2.11.2
- Total issues resolved: 5
- Total pull requests resolved: 16
- Total contributors: 10
Backward compatibility fixes
- 4330: Fix regression in QueryBuilder::and|orWhere() thanks to @BenMorel
- 4308: #4295 Keep master, slaves, keepReplica params in MasterSlaveConnection thanks to @kralos
Upgrade path improvements
- 4341: Add Statement::fetchAllIndexedAssociative() and ::iterateIndexedAssociative() thanks to @morozov and @ZaneCEO
- 4338: Add Statement::fetchAllKeyValue() and ::iterateKeyValue() thanks to @morozov
- 4289: Add a fetch mode methods for "PDO::FETCH_KEY_PAIR" thanks to @tswcode
Bug fixes
- 4315: Fix handling existing SQL Server column comment when other properties change thanks to @trusek
- 3400: Wrong column comment setting command in migrations of SQL Server thanks to @msyfurukawa
Documentation improvements
Test suite improvements
- 4321: Update PHPUnit to 9.4 thanks to @morozov
Static analysis improvements
- 4353: Update Psalm to 3.17.2 and lock the version used with GitHub Actions thanks to @morozov
- 4348: Bump Psalm level to 3 thanks to @morozov
- 4346: Minor CS improvement - use ::class for TestCase::expectException input thanks to @mvorisek
- 4332: Static analysis improvements thanks to @morozov
- 4319: Bump Psalm level to 4 thanks to @morozov
Continuous integration improvements
- 4310: Migrate jobs away from Travis to Github Actions thanks to @greg0ire
- 4344: Static analysis workflow thanks to @greg0ire
- 4340: Modernize existing ga thanks to @greg0ire
- 4309: Use cache action v2 thanks to @greg0ire
Release 2.11.1
Release 2.11.1
- Total issues resolved: 2
- Total pull requests resolved: 8
- Total contributors: 6
Backward compatibility fixes
- 4287: Restore PDOStatement::quote() for backward compatibility thanks to @morozov and @Shahelm
- 4286: Fix BC break: QueryBuilder::andWhere() etc. should ignore empty strings thanks to @BenMorel and @infabo
Bug fixes
Deprecations
- 4291: Deprecate Abstraction\Result thanks to @morozov
Documentation fixes and improvements
- 4296: Increase indent in definition lists thanks to @greg0ire
- 4299: Link to contributing guide thanks to @greg0ire
- 4285: Fix phpdoc on deprecated functions thanks to @qdequippe
Test suite improvements
Release 2.11.0
Release 2.11.0
This release focuses on deprecating the functionality identified for removal in the next major release and adds a few improvements.
Changes in fetching data from prepared statements
The previous API was inherited from PDO and allowed to specify the fetch mode by passing ones of the FetchMode
constants to the fetch*()
methods of the Statement
interface. Now, there is a dedicated method for each of the modes.
Added ASCII parameter binding
For those database platforms that support columns of the ASCII character set (currently, SQL Server), it is now possible to bind the corresponding prepared statement parameters using the ASCII
parameter type and avoid unnecessary value conversion.
Note that PHP 7.3 is now the minimum supported PHP version.
- Total issues resolved: 7
- Total pull requests resolved: 55
- Total contributors: 8
Deprecations
- 4253: Deprecate DBAL\DBALException in favor of DBAL\Exception thanks to @morozov
- 4230: Deprecate the functionality of dropping client connections when dropping a database thanks to @morozov
- 4229: Deprecate more AbstractPlatform methods thanks to @morozov
- 4213: Deprecate the Synchronizer package thanks to @morozov
- 4175: Additional deprecation note for PrimaryReplicaConnection::query() thanks to @morozov
- 4165: Deprecated usage of wrapper components as implementations of driver-level interfaces thanks to @morozov
- 4163: Deprecate duplicate and ambiguous wrapper connection methods thanks to @morozov
- 4144: Deprecate classes in Driver\PDO* namespaces thanks to @morozov
- 4139: Mark connection constructors internal thanks to @morozov
- 4137: Deprecate driver exception conversion APIs thanks to @morozov
- 4134: Deprecate some DBALException factory methods thanks to @morozov
- 4133: Fix more issues introduced by the deprecation of driver classes thanks to @morozov
- 4132: Deprecate AbstractPlatform::fixSchemaElementName() thanks to @morozov
- 4131: Restore the PortWithoutHost exception parent class thanks to @morozov
- 4118: Deprecate ExceptionConverterDriver thanks to @morozov
- 4117: Fixes for the recently introduced driver-level deprecations thanks to @morozov
- 4114: Deprecate ServerInfoAwareConnection#requiresQueryForServerVersion() as an implementation detail thanks to @morozov
- 4112: Deprecate DriverException::getErrorCode() thanks to @morozov
- 4110: Mark non-interface OCI8 driver methods internal thanks to @morozov
- 4100: Deprecate inconsistently and ambiguously named driver-level classes thanks to @morozov
- 4086: Mark Connection::getParams() internal thanks to @morozov
- 4068: Deprecate Driver::getDatabase() thanks to @morozov
- 4061: Deprecated platform-specific portability mode constants thanks to @morozov
- 4054: [GH-4052] Deprecate MasterSlaveConnection and rename to PrimaryReplicaConnection thanks to @beberlei and @albe
- 4049: Replace forward-compatible ResultStatement interfaces with Result thanks to @morozov
- 4020: Deprecated Connection::project(), Statement::errorCode() and errorInfo() thanks to @morozov
- 4017: Improve help of dbal:run-sql command thanks to @ostrolucky
- 3935: Deprecate EchoSQLLogger thanks to @morozov
- 3905: Deprecate the usage of the legacy platforms and drivers thanks to @morozov
- 3864: CompositeExpression and()/or() factory methods thanks to @BenMorel
- 3861: Deprecated the usage of the Version class thanks to @morozov
- 3853: Deprecate calling QueryBuilder methods with an array argument thanks to @BenMorel and @morozov
- 3851: Rename andX() / orX() methods thanks to @BenMorel
- 3850: Prepare CompositeExpression for immutability thanks to @BenMorel
Improvements in Prepared Statements
- 4274: Support ASCII parameter binding thanks to @gjdanis
- 4048: Make caching layer not rely on closeCursor() thanks to @morozov
- 4037: Introduce Statement::fetchFirstColumn() thanks to @morozov
- 4034: Additional changes based on the discussion in #4007 thanks to @morozov
- 4019: Deprecated the concept of the fetch mode thanks to @morozov
Driver Improvements
- 4085: The IBM DB2 driver Exception class must implement the DriverException interface thanks to @morozov
Improvements in CLI Tools
Improvements in QueryBuilder
Error Handling Improvements
- 4145: Add TypeRegistry constructor thanks to @morozov
Static Analysis Improvements
- 4123: Remove the no longer needed error suppressions thanks to @morozov
- 4092: Remove Connection::$isConnected thanks to @morozov
Other Changes
- 4271: Add explanation about implicit indexes thanks to @greg0ire
- 4251: Setup automatic release workflow thanks to @greg0ire
- 4215: Remove test group configuration leftovers thanks to @morozov
- 4201: Update PHPUnit to 9.3 thanks to @morozov
- 4196: The test suite uses the deprecated at() matcher thanks to @morozov
- 4080: Update PHPUnit to 9.2 thanks to @morozov
- 4079: Forward compatibility with PHPUnit 9.3 thanks to @morozov
- 4078: Bump PHP requirement to 7.3 as of DBAL 2.11.0 thanks to @morozov
- 4050: Update doctrine/coding-standard to 8.0 thanks to @morozov
- 3924: Actualize the content of the .gitattributes file thanks to @morozov
- 3923: Removed performance tests thanks to @morozov
Release 2.10.4
Release 2.10.4
- Total issues resolved: 2
- Total pull requests resolved: 3
- Total contributors: 3
Regressions
- 4255: Revert full support for foreign key constraints for SQLite thanks to @morozov and @taylorotwell
Bug fixes
CI improvements
Release 2.10.3
Release 2.10.3
- Total issues resolved: 3
- Total pull requests resolved: 42
- Total contributors: 9
Bug Fixes
- 4238: Fix errors with case sensitive collation on mssql: not existing procedures and tables (sp_RENAME, SysObjects, SysColumns) thanks to @redgnar
- 4231: Mark testDropsDatabaseWithActiveConnections() as incomplete on OraclePlatform thanks to @morozov
- 4162: Remove parameters and types unset after statement execution thanks to @morozov
- 4148: Remove workaround in PDOSqlsrv\Connection::quote() thanks to @morozov
- 4074: Fix handling host and port configuration in sqlsrv and pdo_sqlsrv drivers thanks to @morozov
- 4066: Fix DSN detection in the IBM DB2 driver thanks to @morozov
- 3994: Use proper check in acceptForeignKey() thanks to @greg0ire
- 3991: Extend RetryableException from Throwable interface thanks to @mitelg
- 3762: Add full support for foreign key constraints for SQLite thanks to @beberlei
Other Code Improvements
Static Analysis Improvements
- 4235: Update PHPStan to 0.12.40 thanks to @morozov
- 4222: Upgrade Psalm to its latest version thanks to @greg0ire
- 4116: Update PHPStan to 0.12.31 thanks to @morozov
- 4099: Update PHPStan to 0.12.30 thanks to @morozov
- 4094: Bump Psalm level to 5 thanks to @morozov
- 3977: Psalm 6 thanks to @greg0ire
- 3974: Remove unneeded and risky stubs parsing thanks to @greg0ire
- 3969: Psalm 7 thanks to @greg0ire
CI Improvements
- 4239: Cleanup Travis scripts and configuration thanks to @morozov
- 4184: Trigger Github workflow for merges thanks to @greg0ire
- 4181: Fetch parent commits thanks to @greg0ire
- 4176: Add GitHub Actions builds for oci8 and pdo_oci drivers thanks to @morozov
- 4009: Coveralls integration thanks to @greg0ire
- 3998: move PHPStan to GitHub Actions thanks to @bendavies
- 3979: Move phpcs from Travis to GitHub Actions thanks to @bendavies
- 3978: Use composer install in the Psalm job thanks to @greg0ire
Documentation Improvements
- 4185: Fix badges thanks to @morozov
- 4126: Use relative names in inline {@link} annotations where possible thanks to @morozov
- 4027: @link in convertException gives 404 thanks to @tomasnorre
- 4008: Fix character for mysql driver example thanks to @alexpts
Test Suite Improvements
- 4209: Test MySQLi connection via TLS on Travis thanks to @morozov
- 4127: Rework extension detection in tests thanks to @morozov
- 4067: Simplify test suite configuration thanks to @morozov
- 4053: Report coverage unconditionally on Travis thanks to @greg0ire
- 4047: Integrate with Codecov thanks to @greg0ire
- 3148: Ignore code coverage of private constructors of static classes thanks to @morozov
Code Style Improvements
- 4150: Update doctrine/coding-standard to 8.1 thanks to @morozov
- 4120: Update Slevomat Coding Standard to 6.3.10 thanks to @morozov
- 4031: Ignore all violations of the LowercasePHPFunctions sniff in SQLSrvStatement thanks to @morozov
- 3989: Remove useless rules thanks to @greg0ire
- 3983: Bump cs libs thanks to @greg0ire
- 3287: Do not suppress warnings in PHP_CodeSniffer reports thanks to @morozov
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...