From 59d7e39bb8fbd97611bec8045ce8ebe10d15784e Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 31 Mar 2021 20:24:07 -0700 Subject: [PATCH 1/5] [GH-4515] Trigger deprecation in Connection::getSchemaManager() --- src/Connection.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Connection.php b/src/Connection.php index 101c0199f99..60c1687a1f1 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -21,6 +21,7 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\SQL\Parser; use Doctrine\DBAL\Types\Type; +use Doctrine\Deprecations\Deprecation; use Throwable; use Traversable; @@ -1544,6 +1545,12 @@ public function createSchemaManager(): AbstractSchemaManager */ public function getSchemaManager() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4515', + 'Connection::getSchemaManager() is deprecated, use Connection::createSchemaManager() instead.' + ); + if ($this->_schemaManager === null) { $this->_schemaManager = $this->createSchemaManager(); } From 140bea12a8716fb5ebc5e1c16bb6e2dc5df998c8 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 31 Mar 2021 20:24:13 -0700 Subject: [PATCH 2/5] [GH-4515] Trigger deprecation in Connection::getExpressionBuilder() --- src/Connection.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Connection.php b/src/Connection.php index 60c1687a1f1..f16d40efd40 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -70,7 +70,7 @@ class Connection protected $_eventManager; /** - * @deprecated Use {@link getExpressionBuilder()} instead. + * @deprecated Use {@link createExpressionBuilder()} instead. * * @var ExpressionBuilder */ @@ -297,6 +297,13 @@ public function createExpressionBuilder(): ExpressionBuilder */ public function getExpressionBuilder() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4515', + 'Connection::getExpressionBuilder() is deprecated,' + . ' use Connection::createExpressionBuilder() instead.' + ); + return $this->_expr; } From a602f2baf74df3d9b17ea8b29fca5fc33786d68d Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 31 Mar 2021 20:24:16 -0700 Subject: [PATCH 3/5] [GH-4510] Trigger deprecation in AbstractPlatform::getReservedKeywordsClass() implementations --- src/Platforms/AbstractPlatform.php | 7 +++++++ src/Platforms/DB2Platform.php | 8 ++++++++ src/Platforms/MariaDb1027Platform.php | 8 ++++++++ src/Platforms/MySQL57Platform.php | 8 ++++++++ src/Platforms/MySQL80Platform.php | 9 +++++++++ src/Platforms/MySQLPlatform.php | 8 ++++++++ src/Platforms/OraclePlatform.php | 8 ++++++++ src/Platforms/PostgreSQL100Platform.php | 8 ++++++++ src/Platforms/PostgreSQL94Platform.php | 8 ++++++++ src/Platforms/SQLServer2012Platform.php | 8 ++++++++ src/Platforms/SqlitePlatform.php | 8 ++++++++ 11 files changed, 88 insertions(+) diff --git a/src/Platforms/AbstractPlatform.php b/src/Platforms/AbstractPlatform.php index 736af53b702..1c9d63c2823 100644 --- a/src/Platforms/AbstractPlatform.php +++ b/src/Platforms/AbstractPlatform.php @@ -3529,6 +3529,13 @@ protected function createReservedKeywordsList(): KeywordList */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'AbstractPlatform::getReservedKeywordsClass() is deprecated,' + . ' use AbstractPlatform::createReservedKeywordsList() instead.' + ); + throw Exception::notSupported(__METHOD__); } diff --git a/src/Platforms/DB2Platform.php b/src/Platforms/DB2Platform.php index 61a45aa24f8..9d43a0f0c68 100644 --- a/src/Platforms/DB2Platform.php +++ b/src/Platforms/DB2Platform.php @@ -9,6 +9,7 @@ use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Types; +use Doctrine\Deprecations\Deprecation; use function array_merge; use function count; @@ -901,6 +902,13 @@ public function supportsSavepoints() */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'DB2Platform::getReservedKeywordsClass() is deprecated,' + . ' use DB2Platform::createReservedKeywordsList() instead.' + ); + return Keywords\DB2Keywords::class; } diff --git a/src/Platforms/MariaDb1027Platform.php b/src/Platforms/MariaDb1027Platform.php index 3ba3b8b04b0..9fa84e98d85 100644 --- a/src/Platforms/MariaDb1027Platform.php +++ b/src/Platforms/MariaDb1027Platform.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Platforms; use Doctrine\DBAL\Types\Types; +use Doctrine\Deprecations\Deprecation; /** * Provides the behavior, features and SQL dialect of the MariaDB 10.2 (10.2.7 GA) database platform. @@ -26,6 +27,13 @@ public function getJsonTypeDeclarationSQL(array $column): string */ protected function getReservedKeywordsClass(): string { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'MariaDb1027Platform::getReservedKeywordsClass() is deprecated,' + . ' use MariaDb1027Platform::createReservedKeywordsList() instead.' + ); + return Keywords\MariaDb102Keywords::class; } diff --git a/src/Platforms/MySQL57Platform.php b/src/Platforms/MySQL57Platform.php index 4d8cf9ca1c6..f29204cf458 100644 --- a/src/Platforms/MySQL57Platform.php +++ b/src/Platforms/MySQL57Platform.php @@ -6,6 +6,7 @@ use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\SQL\Parser; use Doctrine\DBAL\Types\Types; +use Doctrine\Deprecations\Deprecation; /** * Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform. @@ -64,6 +65,13 @@ protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'MySQL57Platform::getReservedKeywordsClass() is deprecated,' + . ' use MySQL57Platform::createReservedKeywordsList() instead.' + ); + return Keywords\MySQL57Keywords::class; } diff --git a/src/Platforms/MySQL80Platform.php b/src/Platforms/MySQL80Platform.php index 258ed7dd9c8..808e9344939 100644 --- a/src/Platforms/MySQL80Platform.php +++ b/src/Platforms/MySQL80Platform.php @@ -2,6 +2,8 @@ namespace Doctrine\DBAL\Platforms; +use Doctrine\Deprecations\Deprecation; + /** * Provides the behavior, features and SQL dialect of the MySQL 8.0 (8.0 GA) database platform. */ @@ -14,6 +16,13 @@ class MySQL80Platform extends MySQL57Platform */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'MySQL80Platform::getReservedKeywordsClass() is deprecated,' + . ' use MySQL80Platform::createReservedKeywordsList() instead.' + ); + return Keywords\MySQL80Keywords::class; } } diff --git a/src/Platforms/MySQLPlatform.php b/src/Platforms/MySQLPlatform.php index 743c926304f..a8b8756077a 100644 --- a/src/Platforms/MySQLPlatform.php +++ b/src/Platforms/MySQLPlatform.php @@ -11,6 +11,7 @@ use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\TextType; +use Doctrine\Deprecations\Deprecation; use InvalidArgumentException; use function array_diff_key; @@ -1110,6 +1111,13 @@ public function getBinaryMaxLength() */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'MySQLPlatform::getReservedKeywordsClass() is deprecated,' + . ' use MySQLPlatform::createReservedKeywordsList() instead.' + ); + return Keywords\MySQLKeywords::class; } diff --git a/src/Platforms/OraclePlatform.php b/src/Platforms/OraclePlatform.php index 52327c84361..77b573444c0 100644 --- a/src/Platforms/OraclePlatform.php +++ b/src/Platforms/OraclePlatform.php @@ -11,6 +11,7 @@ use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\Types\BinaryType; +use Doctrine\Deprecations\Deprecation; use InvalidArgumentException; use function array_merge; @@ -1165,6 +1166,13 @@ public function releaseSavePoint($savepoint) */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'OraclePlatform::getReservedKeywordsClass() is deprecated,' + . ' use OraclePlatform::createReservedKeywordsList() instead.' + ); + return Keywords\OracleKeywords::class; } diff --git a/src/Platforms/PostgreSQL100Platform.php b/src/Platforms/PostgreSQL100Platform.php index 33589754855..c9ca509d0dd 100644 --- a/src/Platforms/PostgreSQL100Platform.php +++ b/src/Platforms/PostgreSQL100Platform.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Platforms; use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords; +use Doctrine\Deprecations\Deprecation; /** * Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform. @@ -16,6 +17,13 @@ class PostgreSQL100Platform extends PostgreSQL94Platform */ protected function getReservedKeywordsClass(): string { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'PostgreSQL100Platform::getReservedKeywordsClass() is deprecated,' + . ' use PostgreSQL100Platform::createReservedKeywordsList() instead.' + ); + return PostgreSQL100Keywords::class; } diff --git a/src/Platforms/PostgreSQL94Platform.php b/src/Platforms/PostgreSQL94Platform.php index e67bf746280..9649c079701 100644 --- a/src/Platforms/PostgreSQL94Platform.php +++ b/src/Platforms/PostgreSQL94Platform.php @@ -14,6 +14,7 @@ use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\IntegerType; use Doctrine\DBAL\Types\Type; +use Doctrine\Deprecations\Deprecation; use UnexpectedValueException; use function array_diff; @@ -1181,6 +1182,13 @@ public function hasNativeJsonType() */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'PostgreSQL94Platform::getReservedKeywordsClass() is deprecated,' + . ' use PostgreSQL94Platform::createReservedKeywordsList() instead.' + ); + return Keywords\PostgreSQL94Keywords::class; } diff --git a/src/Platforms/SQLServer2012Platform.php b/src/Platforms/SQLServer2012Platform.php index 5fcdf8d1fe6..6ae96143836 100644 --- a/src/Platforms/SQLServer2012Platform.php +++ b/src/Platforms/SQLServer2012Platform.php @@ -12,6 +12,7 @@ use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\Deprecations\Deprecation; use InvalidArgumentException; use function array_merge; @@ -1561,6 +1562,13 @@ public function getForUpdateSQL() */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'QLServer2012Platform::getReservedKeywordsClass() is deprecated,' + . ' use QLServer2012Platform::createReservedKeywordsList() instead.' + ); + return Keywords\SQLServer2012Keywords::class; } diff --git a/src/Platforms/SqlitePlatform.php b/src/Platforms/SqlitePlatform.php index 672496cc3d8..90defce40ba 100644 --- a/src/Platforms/SqlitePlatform.php +++ b/src/Platforms/SqlitePlatform.php @@ -11,6 +11,7 @@ use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\Types; +use Doctrine\Deprecations\Deprecation; use function array_merge; use function array_unique; @@ -689,6 +690,13 @@ protected function initializeDoctrineTypeMappings() */ protected function getReservedKeywordsClass() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4510', + 'SqlitePlatform::getReservedKeywordsClass() is deprecated,' + . ' use SqlitePlatform::createReservedKeywordsList() instead.' + ); + return Keywords\SQLiteKeywords::class; } From e5e31e14a3e93afb24eaa8d9f63e248a5418c387 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 31 Mar 2021 20:24:19 -0700 Subject: [PATCH 4/5] [GH-4503] Trigger deprecation in schema- and namespace-related APIs --- src/Platforms/AbstractPlatform.php | 7 +++++++ src/Platforms/PostgreSQL94Platform.php | 7 +++++++ src/Platforms/SQLServer2012Platform.php | 7 +++++++ src/Schema/AbstractSchemaManager.php | 21 +++++++++++++++++++++ src/Schema/PostgreSQLSchemaManager.php | 17 ++++++++++++++++- src/Schema/SQLServerSchemaManager.php | 10 +++++++++- 6 files changed, 67 insertions(+), 2 deletions(-) diff --git a/src/Platforms/AbstractPlatform.php b/src/Platforms/AbstractPlatform.php index 1c9d63c2823..b9147c1e98d 100644 --- a/src/Platforms/AbstractPlatform.php +++ b/src/Platforms/AbstractPlatform.php @@ -2758,6 +2758,13 @@ public function getListDatabasesSQL() */ public function getListNamespacesSQL() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'AbstractPlatform::getListNamespacesSQL() is deprecated,' + . ' use AbstractSchemaManager::listSchemaNames() instead.' + ); + throw Exception::notSupported(__METHOD__); } diff --git a/src/Platforms/PostgreSQL94Platform.php b/src/Platforms/PostgreSQL94Platform.php index 9649c079701..7de6c66006e 100644 --- a/src/Platforms/PostgreSQL94Platform.php +++ b/src/Platforms/PostgreSQL94Platform.php @@ -233,6 +233,13 @@ public function getListDatabasesSQL() */ public function getListNamespacesSQL() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'PostgreSQL94Platform::getListNamespacesSQL() is deprecated,' + . ' use PostgreSQLSchemaManager::listSchemaNames() instead.' + ); + return "SELECT schema_name AS nspname FROM information_schema.schemata WHERE schema_name NOT LIKE 'pg\_%' diff --git a/src/Platforms/SQLServer2012Platform.php b/src/Platforms/SQLServer2012Platform.php index 6ae96143836..3d83719bfd8 100644 --- a/src/Platforms/SQLServer2012Platform.php +++ b/src/Platforms/SQLServer2012Platform.php @@ -1166,6 +1166,13 @@ public function getListDatabasesSQL() */ public function getListNamespacesSQL() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'SQLServer2012Platform::getListNamespacesSQL() is deprecated,' + . ' use SQLServerSchemaManager::listSchemaNames() instead.' + ); + return "SELECT name FROM sys.schemas WHERE name NOT IN('guest', 'INFORMATION_SCHEMA', 'sys')"; } diff --git a/src/Schema/AbstractSchemaManager.php b/src/Schema/AbstractSchemaManager.php index ba5ee47bb74..83b757ac807 100644 --- a/src/Schema/AbstractSchemaManager.php +++ b/src/Schema/AbstractSchemaManager.php @@ -117,6 +117,13 @@ public function listDatabases() */ public function listNamespaceNames() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'AbstractSchemaManager::listNamespaceNames() is deprecated,' + . ' use AbstractSchemaManager::listSchemaNames() instead.' + ); + $sql = $this->_platform->getListNamespacesSQL(); $namespaces = $this->_conn->fetchAllAssociative($sql); @@ -735,6 +742,13 @@ protected function _getPortableDatabasesList($databases) */ protected function getPortableNamespacesList(array $namespaces) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'AbstractSchemaManager::getPortableNamespacesList() is deprecated,' + . ' use AbstractSchemaManager::listSchemaNames() instead.' + ); + $namespacesList = []; foreach ($namespaces as $namespace) { @@ -765,6 +779,13 @@ protected function _getPortableDatabaseDefinition($database) */ protected function getPortableNamespaceDefinition(array $namespace) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'AbstractSchemaManager::getPortableNamespaceDefinition() is deprecated,' + . ' use AbstractSchemaManager::listSchemaNames() instead.' + ); + return $namespace; } diff --git a/src/Schema/PostgreSQLSchemaManager.php b/src/Schema/PostgreSQLSchemaManager.php index d2ad067dc72..808b629a6df 100644 --- a/src/Schema/PostgreSQLSchemaManager.php +++ b/src/Schema/PostgreSQLSchemaManager.php @@ -6,6 +6,7 @@ use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Types; +use Doctrine\Deprecations\Deprecation; use function array_change_key_case; use function array_filter; @@ -46,6 +47,13 @@ class PostgreSQLSchemaManager extends AbstractSchemaManager */ public function getSchemaNames() { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'PostgreSQLSchemaManager::getSchemaNames() is deprecated,' + . ' use PostgreSQLSchemaManager::listSchemaNames() instead.' + ); + return $this->listNamespaceNames(); } @@ -287,10 +295,17 @@ protected function _getPortableSequencesList($sequences) /** * {@inheritdoc} * - * @deprecated Use {@link PostgreSQLSchemaManager::listSchemaNames()} instead. + * @deprecated Use {@link listSchemaNames()} instead. */ protected function getPortableNamespaceDefinition(array $namespace) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'PostgreSQLSchemaManager::getPortableNamespaceDefinition() is deprecated,' + . ' use PostgreSQLSchemaManager::listSchemaNames() instead.' + ); + return $namespace['nspname']; } diff --git a/src/Schema/SQLServerSchemaManager.php b/src/Schema/SQLServerSchemaManager.php index eedaf293e60..00b45996229 100644 --- a/src/Schema/SQLServerSchemaManager.php +++ b/src/Schema/SQLServerSchemaManager.php @@ -5,6 +5,7 @@ use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Types\Type; +use Doctrine\Deprecations\Deprecation; use PDOException; use function assert; @@ -214,10 +215,17 @@ protected function _getPortableDatabaseDefinition($database) /** * {@inheritdoc} * - * @deprecated Use {@link SQLServerSchemaManager::listSchemaNames()} instead. + * @deprecated Use {@link listSchemaNames()} instead. */ protected function getPortableNamespaceDefinition(array $namespace) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4503', + 'SQLServerSchemaManager::getPortableNamespaceDefinition() is deprecated,' + . ' use SQLServerSchemaManager::listSchemaNames() instead.' + ); + return $namespace['name']; } From 1ccf9efd1688abbca1c007c17a81ea507823b7fc Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 31 Mar 2021 20:24:23 -0700 Subject: [PATCH 5/5] [GH-4533] Trigger deprecation when $driverOptions is passed to Statement::bindParam() --- src/Driver/PDO/SQLSrv/Statement.php | 11 +++++++++++ src/Driver/PDO/Statement.php | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/Driver/PDO/SQLSrv/Statement.php b/src/Driver/PDO/SQLSrv/Statement.php index b39b6682abc..d2da1625c48 100644 --- a/src/Driver/PDO/SQLSrv/Statement.php +++ b/src/Driver/PDO/SQLSrv/Statement.php @@ -6,8 +6,11 @@ use Doctrine\DBAL\Driver\Result; use Doctrine\DBAL\Driver\Statement as StatementInterface; use Doctrine\DBAL\ParameterType; +use Doctrine\Deprecations\Deprecation; use PDO; +use function func_num_args; + final class Statement implements StatementInterface { /** @var PDOStatement */ @@ -32,6 +35,14 @@ public function __construct(PDOStatement $statement) */ public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) { + if (func_num_args() > 4) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4533', + 'The $driverOptions argument of Statement::bindParam() is deprecated.' + ); + } + switch ($type) { case ParameterType::LARGE_OBJECT: case ParameterType::BINARY: diff --git a/src/Driver/PDO/Statement.php b/src/Driver/PDO/Statement.php index 6f73be3ce21..1461239e64b 100644 --- a/src/Driver/PDO/Statement.php +++ b/src/Driver/PDO/Statement.php @@ -7,12 +7,14 @@ use Doctrine\DBAL\Driver\Result as ResultInterface; use Doctrine\DBAL\Driver\Statement as StatementInterface; use Doctrine\DBAL\ParameterType; +use Doctrine\Deprecations\Deprecation; use PDO; use PDOException; use PDOStatement; use function array_slice; use function func_get_args; +use function func_num_args; final class Statement implements StatementInterface { @@ -64,6 +66,14 @@ public function bindValue($param, $value, $type = ParameterType::STRING) */ public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) { + if (func_num_args() > 4) { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/4533', + 'The $driverOptions argument of Statement::bindParam() is deprecated.' + ); + } + $type = $this->convertParamType($type); try {