Releases: doctrine/dbal
Release 3.0.0
Release 3.0.0
This is a major release of Doctrine DBAL that focuses on API improvements and removal of deprecated APIs.
Major release highlights
- Integration with PDO has been reworked. The
php_pdo
extension is no longer a hard dependency of thedoctrine/dbal
package. The PDO API is not longer the standard for DBAL APIs. - The wrapper-level connection and statement classes no longer implement the corresponding driver-level interfaces.
- Instead of being available in certain states of the
Statement
class, the statement result is explicitly returned as a separate value. - A new dedicated API has been introduced for unique constraints.
- The prepared statement portability layer has been reworked on top of the newly introduced Driver Middleware API.
- The logic of conversion of driver-specific error codes and exceptions has been extracted into the Exception Converter API.
- The SQL parser has been completely reworked to allow for better compatibility with the SQL syntax.
- The following database platforms are no longer supported:
- Drizzle,
- MariaDB 10.0 and older,
- Microsoft Azure,
- PostgreSQL 9.3 and older,
- SQL Anywhere,
- SQL Server 2008 and older.
- The following drivers are no longer supported:
pdo_ibm
,sasql
.
- Passing a PDO instance initialized outside of the DBAL is no longer supported.
- The support for UUID generation on the database side has been dropped.
- The
MasterSlaveConnection
class has been renamed toPrimaryReplicaConnection
. - The
executeUpdate()
method has been renamed toexecuteStatement()
. - All driver classes and driver-level connection and statement classes are now consistently named and declared as
final
. - All PDO-based drivers have been moved under the
PDO
namespace. - The
Doctrine\DBAL\DBALException
andDoctrine\DBAL\Driver\DriverException
have been renamed toDoctrine\DBAL\Exception
andDoctrine\DBAL\Driver\Exception
respectively.
- Total issues resolved: 26
- Total pull requests resolved: 99
- Total contributors: 13
PHP 8 support
- 4207: Update locked composer/package-versions-deprecated for compatibility with PHP 8.0 thanks to @morozov
- 4203: Remove --ignore-platform-reqs from PHP 8.0 builds thanks to @morozov
- 4197: The test suite fails on PHP 8 due to introduction of the match keyword thanks to @morozov
- 4171: Inconsistent naming of method arguments thanks to @morozov
- 4028: Allow php 8 thanks to @greg0ire
- 3814: Added builds against PHP nightly on Travis thanks to @morozov
- 3802: OCI8StatementTest fails on PHP 8 thanks to @morozov
API improvements
- 4429: Throw exception on invalid LockMode thanks to @morozov and @BenMorel
- 4397: Port the SQL parser from PDO thanks to @morozov and @shurik005
- 4317: Reintroduce parts of Legacy API for some more time thanks to @beberlei
- 4293: Add Result::fetchAllKeyValue() and ::iterateKeyValue() thanks to @morozov
- 4159: Do not implement driver-level interfaces by wrapper-level classes thanks to @morozov
- 4157: Rework the portability layer to act as a middleware thanks to @morozov
- 4149: Replace DefaultExceptionConverter with driver-specific implementations thanks to @morozov
- 4136: Move the logic of driver exception conversion into a separate interface thanks to @morozov
- 4129: Remove ExceptionConverterDriver thanks to @morozov
- 4081: Simplify Driver::connect() signature thanks to @morozov
- 4045: Extract Result from the Statement interface thanks to @morozov
- 4035: Moved rowCount() from Statement to ResultStatement thanks to @morozov
- 4007: Replace the concept of statement fetch modes with the explicit API thanks to @morozov
- 4039: Refactor portability statement into a functional composition thanks to @morozov
- 3980: Segregated support of unique index and unique constraint thanks to @guilhermeblanco
- 3943: Do not require hostname for non-persistent MySQL connection and require for persistent thanks to @morozov
- 3548: Remove user provided PDO functionality thanks to @morozov
- 3080: [DBAL-3079] Reworked the usage of PDO in PDOConnection from inheritance to composition thanks to @morozov
- 2958: Remove hard dependency on PDO thanks to @morozov
Legacy platform and driver removal
- 4077: Remove SQL Anywhere platform and driver thanks to @morozov
- 3756: Dropped SQL Server 2008 support thanks to @morozov
- 3602: Remove support for sharding and the Azure platform thanks to @morozov
- 3584: Remove LoggerChain::addLogger thanks to @ostrolucky
- 3477: Drop db support for PostgreSQL 9.3 and MariaDB 10.0 thanks to @SenseException
- 3055: Drop support for legacy platforms thanks to @Majkl578 and @morozov
- 3040: Drop Drizzle support thanks to @BenMorel
Deprecated API removal
- 4294: Remove Abstraction\Result thanks to @morozov
- 4278: Remove deprecated APIs thanks to @morozov
- 4234: Remove deprecated APIs thanks to @morozov
- 4217: Remove the Synchronizer package thanks to @morozov
- 4167: Remove deprecated methods from the wrapper Connection thanks to @morozov
- 4153: Remove deprecated components thanks to @morozov
- 4128: Remove PingableConnection thanks to @morozov
- 4125: Remove deprecated driver classes thanks to @morozov
- 4115: Remove ServerInfoAwareConnection#requiresQueryForServerVersion() as an implementation detail thanks to @morozov
- 4113: Remove DriverException::getErrorCode() thanks to @morozov
- 4083: Remove MasterSlaveConnection thanks to @greg0ire
- 4082: Backport removal of deprecated APIs from develop thanks to @morozov
- 4064: Remove platform-specific portability mode constants thanks to @morozov
- 4059: Remove deprecations for ConnectionHelper thanks to @dmaicher
- 4030: Backport removal of some deprecated APIs thanks to @morozov
- 3934: Removed EchoSQLLogger thanks to @morozov
- 3808: Removed the OCI8Connection::getExecuteMode() method thanks to @morozov
- 3606: Removed Driver::getDatabase() in favor of Connection::getDatabase() thanks to @morozov
- 3579: Remove deprecated stuff for 3.0 thanks to @jwage
- 3553: Removed Driver::getName() thanks to @morozov
- 3518: Remove @deprecated stuff thanks to @Majkl578
- 3257: Remove Doctrine\DBAL\Types\Type::__toString() thanks to @Majkl578
- 3211: Removed support for DB-generated UUIDs thanks to @morozov
- 3070: Dropped support of fetching objects and non-zero column thanks to @morozov
- 2967: Drop Doctrine\DBAL\Version in favor of Ocramius\PackageVersions thanks to @Majkl578
Other breaking changes
Release 2.12.1
Release 2.12.1
- Total issues resolved: 2
- Total pull requests resolved: 11
- Total contributors: 7
Bug fixes
- 4414: ResultCacheStatement::fetchAllAssociative does not store results in cache thanks to @morozov and @dFayet
- 4400: LockMode::NONE should not set WITH (NOLOCK) thanks to @BenMorel
Deprecations
- 4411: Deprecate inappropriate usage of prepared statement parameters thanks to @morozov
- 4407: Deprecate colon prefix for prepared statement parameters thanks to @morozov
PHP 8
- 4396: Fix php8 mysql mariadb thanks to @greg0ire
- 4398: Update PHP_CodeSniffer to 3.5.8 thanks to @morozov
Packaging
- 4416: Update .gitattributes thanks to @bytestream
Static Analysis
Documentation
- 4424: Mark SQLParserUtils internal thanks to @morozov
- 4390: Fix headline in the upgrade docs thanks to @jdreesen
- 4356: Testing Guidelines thanks to @morozov
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