Skip to content
Release [3.2.0](https://github.com/doctrine/dbal/milestone/91)

3.2.0
=====

- Total issues resolved: **12**
- Total pull requests resolved: **58**
- Total contributors: **19**

Platforms
---------

 - [5020: Fix hardcoded varchar default length](https://github.com/doctrine/dbal/pull/5020) thanks to @mvorisek
 - [4749: RFC: deprecate AbstractPlatform::getName()](https://github.com/doctrine/dbal/issues/4749) thanks to @greg0ire

Cache,Test Suite
----------------

 - [5008: Refactor query caching tests](https://github.com/doctrine/dbal/pull/5008) thanks to @morozov

Bug,Cache,Improvement
---------------------

 - [5003: Always cache the full result](https://github.com/doctrine/dbal/pull/5003) thanks to @morozov

Query Limit/Offset Modification
-------------------------------

 - [4999: Use sprintf('%d') like in DB2, SQLServer and Oracle to harden against wrong limit and offset](https://github.com/doctrine/dbal/pull/4999) thanks to @nickvergessen

Improvement,Strict Typing
-------------------------

 - [4986: Add return types to private and final methods](https://github.com/doctrine/dbal/pull/4986) thanks to @derrabus

Deprecation,Platforms,SQLite,Schema Management
----------------------------------------------

 - [4969: Declare SQLite as not supporting CREATE|DROP DATABASE](https://github.com/doctrine/dbal/pull/4969) thanks to @morozov

Improvement,Logging
-------------------

 - [4967: Introduce logging middleware](https://github.com/doctrine/dbal/pull/4967) thanks to @morozov

Improvement,oci8
----------------

 - [4957: Accept the underlying statement as an oci8 statement constructor argument](https://github.com/doctrine/dbal/pull/4957) thanks to @morozov

Test Suite
----------

 - [4951: Detect driver in tests based on configured driver name](https://github.com/doctrine/dbal/pull/4951) thanks to @morozov

Improvement,Prepared Statements
-------------------------------

 - [4950: Accept driver-level statement as a wrapper-level statement constructor argument](https://github.com/doctrine/dbal/pull/4950) thanks to @morozov

Connections,Improvement,ibm_db2,mysqli,oci8,sqlsrv
--------------------------------------------------

 - [4949: Accept connection object/resource as a driver connection constructor argument](https://github.com/doctrine/dbal/pull/4949) thanks to @morozov

Connections,Improvement,PDO
---------------------------

 - [4948: Accept PDO as a Connection constructor argument](https://github.com/doctrine/dbal/pull/4948) thanks to @morozov

Error Handling,IBM DB2,Improvement,MySQL,ibm_db2
------------------------------------------------

 - [4929: Basic exception handling for IBM DB2](https://github.com/doctrine/dbal/pull/4929) thanks to @morozov

Error Handling,Improvement,MySQL,SQL Server,Test Suite,pdo_sqlsrv,sqlsrv
------------------------------------------------------------------------

 - [4928: Basic exception handling for SQL Server](https://github.com/doctrine/dbal/pull/4928) thanks to @morozov

Improvement,pdo_pgsql
---------------------

 - [4925: Remove obsolete `define()` check](https://github.com/doctrine/dbal/pull/4925) thanks to @derrabus

mysqli
------

 - [4920: Remove redundant code in mysqli Result](https://github.com/doctrine/dbal/pull/4920) thanks to @kamil-tekiela
 - [4898: Use the driver API to begin a transaction on mysqli](https://github.com/doctrine/dbal/pull/4898) thanks to @morozov

Improvement,mysqli
------------------

 - [4918: Remove redundant assert](https://github.com/doctrine/dbal/pull/4918) thanks to @kamil-tekiela
 - [4910: Remove redundant reference assignment](https://github.com/doctrine/dbal/pull/4910) thanks to @kamil-tekiela
 - [4894: Refactor MySQLi statement to make it unaware of the connection](https://github.com/doctrine/dbal/pull/4894) thanks to @derrabus

Performance
-----------

 - [4899: Moved `array_merge` calls out of loops](https://github.com/doctrine/dbal/pull/4899) thanks to @simonberger

Deprecation,Error Handling,Improvement,Schema Management
--------------------------------------------------------

 - [4897: Deprecate AbstractSchemaManager::dropAndCreate() and ::tryMethod() methods](https://github.com/doctrine/dbal/pull/4897) thanks to @morozov

Static Analysis
---------------

 - [4891: Bump PHPStan level to 8](https://github.com/doctrine/dbal/pull/4891) thanks to @greg0ire

PHP,mysqli
----------

 - [4887: Remove `mysqli_report()` call](https://github.com/doctrine/dbal/pull/4887) thanks to @derrabus
 - [4869: mysqli::real_connect may be called with null $flags](https://github.com/doctrine/dbal/issues/4869) thanks to @mondrake

Oracle,PHP
----------

 - [4871: OracleSchemaManager::_getPortableTableColumnDefinition throws deprecations on PHP 8.1](https://github.com/doctrine/dbal/issues/4871) thanks to @mondrake

PostgreSQL,Test Suite
---------------------

 - [4857: Merge AbstractPostgreSQLPlatformTestCase into PostgreSQLPlatformTest](https://github.com/doctrine/dbal/pull/4857) thanks to @morozov

Documentation,IBM DB2,Improvement,MySQL,Oracle,Platforms,SQL Server,Test Suite
------------------------------------------------------------------------------

 - [4855: Test AbstractPlatform::getLengthExpression()](https://github.com/doctrine/dbal/pull/4855) thanks to @morozov

Improvement,SQL Server,Schema Introspection
-------------------------------------------

 - [4844: Get view definition for SQL Server](https://github.com/doctrine/dbal/pull/4844) thanks to @kitloong

Bug,Deprecation,Foreign Keys,Improvement,Indexes,MySQL,Oracle,Platforms,Schema,Schema Management
------------------------------------------------------------------------------------------------

 - [4839: Deprecate the Constraint interface](https://github.com/doctrine/dbal/pull/4839) thanks to @morozov

Deprecation,Schema
------------------

 - [4822: Deprecate schema methods related to explicit foreign key indexes](https://github.com/doctrine/dbal/pull/4822) thanks to @morozov
 - [4814: Deprecate AbstractAsset::getFullQualifiedName()](https://github.com/doctrine/dbal/pull/4814) thanks to @morozov
 - [4812: Deprecate Schema::getTableNames()](https://github.com/doctrine/dbal/pull/4812) thanks to @morozov
 - [4789: Deprecate features of Table::getColumns()](https://github.com/doctrine/dbal/pull/4789) thanks to @morozov

Deprecation,PostgreSQL,Schema,Schema Management
-----------------------------------------------

 - [4821: Deprecate AbstractSchemaManager::getSchemaSearchPaths()](https://github.com/doctrine/dbal/pull/4821) thanks to @morozov

IBM DB2,Type Mapping
--------------------

 - [4808: Make DB2Platform::initializeDoctrineTypeMappings() protected](https://github.com/doctrine/dbal/pull/4808) thanks to @morozov

Databases,IBM DB2,MySQL,Oracle,Platforms,PostgreSQL,SQL Server,SQLite,Schema,Sequences
--------------------------------------------------------------------------------------

 - [4807: Generalize platform SQL](https://github.com/doctrine/dbal/pull/4807) thanks to @morozov

Deprecation,SQLite
------------------

 - [4805: Deprecate AbstractPlatform::canEmulateSchemas()](https://github.com/doctrine/dbal/pull/4805) thanks to @morozov

Deprecation,Improvement,Oracle,SQL Server,SQLite
------------------------------------------------

 - [4802: Platform API cleanup](https://github.com/doctrine/dbal/pull/4802) thanks to @morozov

SQL Server,Schema Management
----------------------------

 - [4801: Require $table in SQLServerPlatform::getDropIndexSQL()](https://github.com/doctrine/dbal/pull/4801) thanks to @morozov

Deprecation,Schema Comparison
-----------------------------

 - [4785: Deprecate not passing $fromColumn to ColumnDiff](https://github.com/doctrine/dbal/pull/4785) thanks to @morozov

Cache,Foreign Keys,Indexes,Logging,Prepared Statements,Reserved Keywords,Test Suite,Tools
-----------------------------------------------------------------------------------------

 - [4756: Code cleanup](https://github.com/doctrine/dbal/pull/4756) thanks to @morozov

Deprecation,Platforms,PostgreSQL,SQL Server
-------------------------------------------

 - [4755: Deprecate AbstractPlatform::getName()](https://github.com/doctrine/dbal/pull/4755) thanks to @morozov

Deprecation,Platforms
---------------------

 - [4753: Deprecate AbstractPlatform::getNowExpression()](https://github.com/doctrine/dbal/pull/4753) thanks to @morozov
 - [4724: Deprecate redundant AbstractPlatform methods](https://github.com/doctrine/dbal/pull/4724) thanks to @morozov

Error Handling,PostgreSQL,SQLite,Schema Introspection
-----------------------------------------------------

 - [4752: Code cleanup](https://github.com/doctrine/dbal/pull/4752) thanks to @morozov

Connections,Deprecation,Drivers,Platform Detection
--------------------------------------------------

 - [4751: Deprecate VersionAwarePlatformDriver and ServerInfoAwareConnection](https://github.com/doctrine/dbal/pull/4751) thanks to @morozov

Improvement,MySQL,SQL Server,SQLite,Schema Comparison
-----------------------------------------------------

 - [4746: Platform-aware schema comparison ](https://github.com/doctrine/dbal/pull/4746) thanks to @morozov

Deprecation,Foreign Keys,Schema Comparison,Schema Definition
------------------------------------------------------------

 - [4743: Deprecate reference from foreign key to its referencing table](https://github.com/doctrine/dbal/pull/4743) thanks to @morozov

Connections,Platforms,Test Suite
--------------------------------

 - [4731: Fix tests in random order](https://github.com/doctrine/dbal/pull/4731) thanks to @morozov

Connections,Error Handling,Prepared Statements,Test Suite
---------------------------------------------------------

 - [4729: Test exception handling in wrapper Result](https://github.com/doctrine/dbal/pull/4729) thanks to @morozov

Platforms,Types
---------------

 - [4726: Revert GUID type deprecation](https://github.com/doctrine/dbal/pull/4726) thanks to @morozov

Deprecation,Improvement,Schema Comparison
-----------------------------------------

 - [4707: Introduce consistent Comparator API](https://github.com/doctrine/dbal/pull/4707) thanks to @trompette

Connections,Deprecation,PDO,Sequences
-------------------------------------

 - [4688: [GH-4687] Deprecate Connection::lastInsertId($name)](https://github.com/doctrine/dbal/pull/4688) thanks to @morozov

Improvement,PHP,mysqli,oci8,pdo_mysql,pdo_oci,pdo_pgsql
-------------------------------------------------------

 - [4685: Support for more drivers on PHP 8.1](https://github.com/doctrine/dbal/pull/4685) thanks to @morozov

Deprecation,Sequences
---------------------

 - [4681: Deprecate TableGenerator](https://github.com/doctrine/dbal/pull/4681) thanks to @morozov

 - [4624: Deprecate `doctrine/cache` in favor of `psr/cache`](https://github.com/doctrine/dbal/pull/4624) thanks to @derrabus

Events,Improvement,Transactions
-------------------------------

 - [4622: Add events for Transaction begin/commit/rollBack.](https://github.com/doctrine/dbal/pull/4622) thanks to @Warxcell and @mariusbalcytis

Deprecation
-----------

 - [4620: Use `psr/cache` for result caching](https://github.com/doctrine/dbal/pull/4620) thanks to @derrabus

Improvement,Test Suite,Transactions
-----------------------------------

 - [3425: Improve ConnectionTest by triggering real exceptions](https://github.com/doctrine/dbal/pull/3425) thanks to @grongor

Bug,MySQL,Schema Comparison
---------------------------

 - [2930: Comparator doesn't see changes in the length of TextType field](https://github.com/doctrine/dbal/issues/2930) thanks to @WhiteEagle88
 - [1125: DBAL-1182: No schema difference detected when changing length of a text field](https://github.com/doctrine/dbal/issues/1125) thanks to @doctrinebot

Bug,Missing Tests,MySQL,Schema Comparison,Schema Introspection
--------------------------------------------------------------

 - [2663: Comparator fails for BLOBS](https://github.com/doctrine/dbal/issues/2663) thanks to @thomashohn

Bug,Missing Tests,Schema,Schema Comparison,Schema Introspection,Type Mapping
----------------------------------------------------------------------------

 - [2566: Column altering in migration from TEXT to LONGTEXT may not apply.](https://github.com/doctrine/dbal/issues/2566) thanks to @janokary

Schema Comparison,Schema Definition,Types
-----------------------------------------

 - [2411: Comparator miss-detects custom columns as changed](https://github.com/doctrine/dbal/issues/2411) thanks to @DASPRiD

Columns,Missing Tests,MySQL,Schema Comparison,Type Mapping
----------------------------------------------------------

 - [2331: Can't convert JSON to LONGTEXT (or MEDIUMTEXT)](https://github.com/doctrine/dbal/issues/2331) thanks to @bryanjamesmiller

Bug,Cache
---------

 - [4178: DDC-2043: Extra cache operation in DBAL\Cache\ResultCacheStatement.php](https://github.com/doctrine/dbal/issues/4178) thanks to @doctrinebot