diff --git a/composer.json b/composer.json
index 5f1ea1604..f5d0a7515 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
"cweagans/composer-patches": "^1.7",
"deepdiver/zipstreamer": "^2.0.3",
"deepdiver1975/tarstreamer": "^2.1.0",
- "doctrine/dbal": "^3.7.0",
+ "doctrine/dbal": "^4.0.4",
"egulias/email-validator": "^4.0.2",
"fusonic/opengraph": "^2.3.0",
"giggsey/libphonenumber-for-php-lite": "^8.13.12",
diff --git a/composer.lock b/composer.lock
index a61a52d2a..75f61be2f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4d14ded14d6eb8487843f729ca5ae46a",
+ "content-hash": "0b41b98db06481530488b64109503731",
"packages": [
{
"name": "aws/aws-crt-php",
@@ -430,142 +430,44 @@
},
"time": "2023-06-16T08:01:55+00:00"
},
- {
- "name": "doctrine/cache",
- "version": "2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/cache.git",
- "reference": "1ca8f21980e770095a31456042471a57bc4c68fb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb",
- "reference": "1ca8f21980e770095a31456042471a57bc4c68fb",
- "shasum": ""
- },
- "require": {
- "php": "~7.1 || ^8.0"
- },
- "conflict": {
- "doctrine/common": ">2.2,<2.4"
- },
- "require-dev": {
- "cache/integration-tests": "dev-master",
- "doctrine/coding-standard": "^9",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "psr/cache": "^1.0 || ^2.0 || ^3.0",
- "symfony/cache": "^4.4 || ^5.4 || ^6",
- "symfony/var-exporter": "^4.4 || ^5.4 || ^6"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
- }
- ],
- "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.",
- "homepage": "https://www.doctrine-project.org/projects/cache.html",
- "keywords": [
- "abstraction",
- "apcu",
- "cache",
- "caching",
- "couchdb",
- "memcached",
- "php",
- "redis",
- "xcache"
- ],
- "support": {
- "issues": "https://github.com/doctrine/cache/issues",
- "source": "https://github.com/doctrine/cache/tree/2.2.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
- "type": "tidelift"
- }
- ],
- "time": "2022-05-20T20:07:39+00:00"
- },
{
"name": "doctrine/dbal",
- "version": "3.8.3",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c"
+ "reference": "50fda19f80724b55ff770bb4ff352407008e63c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/db922ba9436b7b18a23d1653a0b41ff2369ca41c",
- "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/50fda19f80724b55ff770bb4ff352407008e63c5",
+ "reference": "50fda19f80724b55ff770bb4ff352407008e63c5",
"shasum": ""
},
"require": {
- "composer-runtime-api": "^2",
- "doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
- "doctrine/event-manager": "^1|^2",
- "php": "^7.4 || ^8.0",
+ "php": "^8.1",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
- "jetbrains/phpstorm-stubs": "2023.1",
- "phpstan/phpstan": "1.10.58",
- "phpstan/phpstan-strict-rules": "^1.5",
- "phpunit/phpunit": "9.6.16",
- "psalm/plugin-phpunit": "0.18.4",
+ "jetbrains/phpstorm-stubs": "2023.2",
+ "phpstan/phpstan": "1.11.5",
+ "phpstan/phpstan-phpunit": "1.4.0",
+ "phpstan/phpstan-strict-rules": "^1.6",
+ "phpunit/phpunit": "10.5.22",
+ "psalm/plugin-phpunit": "0.19.0",
"slevomat/coding-standard": "8.13.1",
- "squizlabs/php_codesniffer": "3.9.0",
- "symfony/cache": "^5.4|^6.0|^7.0",
- "symfony/console": "^4.4|^5.4|^6.0|^7.0",
- "vimeo/psalm": "4.30.0"
+ "squizlabs/php_codesniffer": "3.10.1",
+ "symfony/cache": "^6.3.8|^7.0",
+ "symfony/console": "^5.4|^6.3|^7.0",
+ "vimeo/psalm": "5.24.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
- "bin": [
- "bin/doctrine-dbal"
- ],
"type": "library",
"autoload": {
"psr-4": {
@@ -618,7 +520,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.8.3"
+ "source": "https://github.com/doctrine/dbal/tree/4.0.4"
},
"funding": [
{
@@ -634,7 +536,7 @@
"type": "tidelift"
}
],
- "time": "2024-03-03T15:55:06+00:00"
+ "time": "2024-06-19T11:57:23+00:00"
},
{
"name": "doctrine/deprecations",
@@ -683,98 +585,6 @@
},
"time": "2024-01-30T19:34:25+00:00"
},
- {
- "name": "doctrine/event-manager",
- "version": "1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/event-manager.git",
- "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520",
- "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520",
- "shasum": ""
- },
- "require": {
- "doctrine/deprecations": "^0.5.3 || ^1",
- "php": "^7.1 || ^8.0"
- },
- "conflict": {
- "doctrine/common": "<2.9"
- },
- "require-dev": {
- "doctrine/coding-standard": "^9 || ^10",
- "phpstan/phpstan": "~1.4.10 || ^1.8.8",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.24"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Common\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
- },
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com"
- }
- ],
- "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.",
- "homepage": "https://www.doctrine-project.org/projects/event-manager.html",
- "keywords": [
- "event",
- "event dispatcher",
- "event manager",
- "event system",
- "events"
- ],
- "support": {
- "issues": "https://github.com/doctrine/event-manager/issues",
- "source": "https://github.com/doctrine/event-manager/tree/1.2.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager",
- "type": "tidelift"
- }
- ],
- "time": "2022-10-12T20:51:15+00:00"
- },
{
"name": "doctrine/lexer",
"version": "3.0.1",
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 009ccaa7d..b58ae4a95 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -1211,22 +1211,6 @@
'Cose\\Key\\OkpKey' => $vendorDir . '/web-auth/cose-lib/src/Key/OkpKey.php',
'Cose\\Key\\RsaKey' => $vendorDir . '/web-auth/cose-lib/src/Key/RsaKey.php',
'Cose\\Key\\SymmetricKey' => $vendorDir . '/web-auth/cose-lib/src/Key/SymmetricKey.php',
- 'Doctrine\\Common\\Cache\\Cache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php',
- 'Doctrine\\Common\\Cache\\CacheProvider' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php',
- 'Doctrine\\Common\\Cache\\ClearableCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php',
- 'Doctrine\\Common\\Cache\\FlushableCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php',
- 'Doctrine\\Common\\Cache\\MultiDeleteCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php',
- 'Doctrine\\Common\\Cache\\MultiGetCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php',
- 'Doctrine\\Common\\Cache\\MultiOperationCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiOperationCache.php',
- 'Doctrine\\Common\\Cache\\MultiPutCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php',
- 'Doctrine\\Common\\Cache\\Psr6\\CacheAdapter' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php',
- 'Doctrine\\Common\\Cache\\Psr6\\CacheItem' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php',
- 'Doctrine\\Common\\Cache\\Psr6\\DoctrineProvider' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php',
- 'Doctrine\\Common\\Cache\\Psr6\\InvalidArgument' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php',
- 'Doctrine\\Common\\Cache\\Psr6\\TypedCacheItem' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php',
- 'Doctrine\\Common\\EventArgs' => $vendorDir . '/doctrine/event-manager/src/EventArgs.php',
- 'Doctrine\\Common\\EventManager' => $vendorDir . '/doctrine/event-manager/src/EventManager.php',
- 'Doctrine\\Common\\EventSubscriber' => $vendorDir . '/doctrine/event-manager/src/EventSubscriber.php',
'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/src/AbstractLexer.php',
'Doctrine\\Common\\Lexer\\Token' => $vendorDir . '/doctrine/lexer/src/Token.php',
'Doctrine\\DBAL\\ArrayParameterType' => $vendorDir . '/doctrine/dbal/src/ArrayParameterType.php',
@@ -1235,11 +1219,14 @@
'Doctrine\\DBAL\\ArrayParameters\\Exception\\MissingPositionalParameter' => $vendorDir . '/doctrine/dbal/src/ArrayParameters/Exception/MissingPositionalParameter.php',
'Doctrine\\DBAL\\Cache\\ArrayResult' => $vendorDir . '/doctrine/dbal/src/Cache/ArrayResult.php',
'Doctrine\\DBAL\\Cache\\CacheException' => $vendorDir . '/doctrine/dbal/src/Cache/CacheException.php',
+ 'Doctrine\\DBAL\\Cache\\Exception\\NoCacheKey' => $vendorDir . '/doctrine/dbal/src/Cache/Exception/NoCacheKey.php',
+ 'Doctrine\\DBAL\\Cache\\Exception\\NoResultDriverConfigured' => $vendorDir . '/doctrine/dbal/src/Cache/Exception/NoResultDriverConfigured.php',
'Doctrine\\DBAL\\Cache\\QueryCacheProfile' => $vendorDir . '/doctrine/dbal/src/Cache/QueryCacheProfile.php',
'Doctrine\\DBAL\\ColumnCase' => $vendorDir . '/doctrine/dbal/src/ColumnCase.php',
'Doctrine\\DBAL\\Configuration' => $vendorDir . '/doctrine/dbal/src/Configuration.php',
'Doctrine\\DBAL\\Connection' => $vendorDir . '/doctrine/dbal/src/Connection.php',
'Doctrine\\DBAL\\ConnectionException' => $vendorDir . '/doctrine/dbal/src/ConnectionException.php',
+ 'Doctrine\\DBAL\\Connection\\StaticServerVersionProvider' => $vendorDir . '/doctrine/dbal/src/Connection/StaticServerVersionProvider.php',
'Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection' => $vendorDir . '/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php',
'Doctrine\\DBAL\\Driver' => $vendorDir . '/doctrine/dbal/src/Driver.php',
'Doctrine\\DBAL\\DriverManager' => $vendorDir . '/doctrine/dbal/src/DriverManager.php',
@@ -1250,7 +1237,6 @@
'Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter' => $vendorDir . '/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php',
'Doctrine\\DBAL\\Driver\\API\\SQLSrv\\ExceptionConverter' => $vendorDir . '/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php',
'Doctrine\\DBAL\\Driver\\API\\SQLite\\ExceptionConverter' => $vendorDir . '/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php',
- 'Doctrine\\DBAL\\Driver\\API\\SQLite\\UserDefinedFunctions' => $vendorDir . '/doctrine/dbal/src/Driver/API/SQLite/UserDefinedFunctions.php',
'Doctrine\\DBAL\\Driver\\AbstractDB2Driver' => $vendorDir . '/doctrine/dbal/src/Driver/AbstractDB2Driver.php',
'Doctrine\\DBAL\\Driver\\AbstractException' => $vendorDir . '/doctrine/dbal/src/Driver/AbstractException.php',
'Doctrine\\DBAL\\Driver\\AbstractMySQLDriver' => $vendorDir . '/doctrine/dbal/src/Driver/AbstractMySQLDriver.php',
@@ -1263,7 +1249,8 @@
'Doctrine\\DBAL\\Driver\\AbstractSQLiteDriver\\Middleware\\EnableForeignKeys' => $vendorDir . '/doctrine/dbal/src/Driver/AbstractSQLiteDriver/Middleware/EnableForeignKeys.php',
'Doctrine\\DBAL\\Driver\\Connection' => $vendorDir . '/doctrine/dbal/src/Driver/Connection.php',
'Doctrine\\DBAL\\Driver\\Exception' => $vendorDir . '/doctrine/dbal/src/Driver/Exception.php',
- 'Doctrine\\DBAL\\Driver\\Exception\\UnknownParameterType' => $vendorDir . '/doctrine/dbal/src/Driver/Exception/UnknownParameterType.php',
+ 'Doctrine\\DBAL\\Driver\\Exception\\IdentityColumnsNotSupported' => $vendorDir . '/doctrine/dbal/src/Driver/Exception/IdentityColumnsNotSupported.php',
+ 'Doctrine\\DBAL\\Driver\\Exception\\NoIdentityValue' => $vendorDir . '/doctrine/dbal/src/Driver/Exception/NoIdentityValue.php',
'Doctrine\\DBAL\\Driver\\FetchUtils' => $vendorDir . '/doctrine/dbal/src/Driver/FetchUtils.php',
'Doctrine\\DBAL\\Driver\\IBMDB2\\Connection' => $vendorDir . '/doctrine/dbal/src/Driver/IBMDB2/Connection.php',
'Doctrine\\DBAL\\Driver\\IBMDB2\\DataSourceName' => $vendorDir . '/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php',
@@ -1305,7 +1292,6 @@
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\Error' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/Exception/Error.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\InvalidConfiguration' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/Exception/InvalidConfiguration.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\NonTerminatedStringLiteral' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/Exception/NonTerminatedStringLiteral.php',
- 'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\SequenceDoesNotExist' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/Exception/SequenceDoesNotExist.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\UnknownParameterIndex' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/Exception/UnknownParameterIndex.php',
'Doctrine\\DBAL\\Driver\\OCI8\\ExecutionMode' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/ExecutionMode.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Middleware\\InitializeSession' => $vendorDir . '/doctrine/dbal/src/Driver/OCI8/Middleware/InitializeSession.php',
@@ -1315,8 +1301,6 @@
'Doctrine\\DBAL\\Driver\\PDO\\Exception' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/Exception.php',
'Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php',
'Doctrine\\DBAL\\Driver\\PDO\\OCI\\Driver' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/OCI/Driver.php',
- 'Doctrine\\DBAL\\Driver\\PDO\\PDOException' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/PDOException.php',
- 'Doctrine\\DBAL\\Driver\\PDO\\ParameterTypeMap' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/ParameterTypeMap.php',
'Doctrine\\DBAL\\Driver\\PDO\\PgSQL\\Driver' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php',
'Doctrine\\DBAL\\Driver\\PDO\\Result' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/Result.php',
'Doctrine\\DBAL\\Driver\\PDO\\SQLSrv\\Connection' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php',
@@ -1343,29 +1327,9 @@
'Doctrine\\DBAL\\Driver\\SQLite3\\Exception' => $vendorDir . '/doctrine/dbal/src/Driver/SQLite3/Exception.php',
'Doctrine\\DBAL\\Driver\\SQLite3\\Result' => $vendorDir . '/doctrine/dbal/src/Driver/SQLite3/Result.php',
'Doctrine\\DBAL\\Driver\\SQLite3\\Statement' => $vendorDir . '/doctrine/dbal/src/Driver/SQLite3/Statement.php',
- 'Doctrine\\DBAL\\Driver\\ServerInfoAwareConnection' => $vendorDir . '/doctrine/dbal/src/Driver/ServerInfoAwareConnection.php',
'Doctrine\\DBAL\\Driver\\Statement' => $vendorDir . '/doctrine/dbal/src/Driver/Statement.php',
- 'Doctrine\\DBAL\\Event\\ConnectionEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/ConnectionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\Listeners\\OracleSessionInit' => $vendorDir . '/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php',
- 'Doctrine\\DBAL\\Event\\Listeners\\SQLSessionInit' => $vendorDir . '/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php',
- 'Doctrine\\DBAL\\Event\\Listeners\\SQLiteSessionInit' => $vendorDir . '/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableAddColumnEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableChangeColumnEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableRemoveColumnEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableRenameColumnEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaColumnDefinitionEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaCreateTableColumnEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaCreateTableEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaDropTableEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaIndexDefinitionEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionBeginEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/TransactionBeginEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionCommitEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/TransactionCommitEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/TransactionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionRollBackEventArgs' => $vendorDir . '/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php',
- 'Doctrine\\DBAL\\Events' => $vendorDir . '/doctrine/dbal/src/Events.php',
'Doctrine\\DBAL\\Exception' => $vendorDir . '/doctrine/dbal/src/Exception.php',
+ 'Doctrine\\DBAL\\Exception\\CommitFailedRollbackOnly' => $vendorDir . '/doctrine/dbal/src/Exception/CommitFailedRollbackOnly.php',
'Doctrine\\DBAL\\Exception\\ConnectionException' => $vendorDir . '/doctrine/dbal/src/Exception/ConnectionException.php',
'Doctrine\\DBAL\\Exception\\ConnectionLost' => $vendorDir . '/doctrine/dbal/src/Exception/ConnectionLost.php',
'Doctrine\\DBAL\\Exception\\ConstraintViolationException' => $vendorDir . '/doctrine/dbal/src/Exception/ConstraintViolationException.php',
@@ -1375,78 +1339,77 @@
'Doctrine\\DBAL\\Exception\\DatabaseRequired' => $vendorDir . '/doctrine/dbal/src/Exception/DatabaseRequired.php',
'Doctrine\\DBAL\\Exception\\DeadlockException' => $vendorDir . '/doctrine/dbal/src/Exception/DeadlockException.php',
'Doctrine\\DBAL\\Exception\\DriverException' => $vendorDir . '/doctrine/dbal/src/Exception/DriverException.php',
+ 'Doctrine\\DBAL\\Exception\\DriverRequired' => $vendorDir . '/doctrine/dbal/src/Exception/DriverRequired.php',
'Doctrine\\DBAL\\Exception\\ForeignKeyConstraintViolationException' => $vendorDir . '/doctrine/dbal/src/Exception/ForeignKeyConstraintViolationException.php',
'Doctrine\\DBAL\\Exception\\InvalidArgumentException' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidArgumentException.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnDeclaration' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidColumnDeclaration.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidColumnType.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType\\ColumnLengthRequired' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidColumnType/ColumnLengthRequired.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType\\ColumnPrecisionRequired' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidColumnType/ColumnPrecisionRequired.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType\\ColumnScaleRequired' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidColumnType/ColumnScaleRequired.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidDriverClass' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidDriverClass.php',
'Doctrine\\DBAL\\Exception\\InvalidFieldNameException' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidFieldNameException.php',
- 'Doctrine\\DBAL\\Exception\\InvalidLockMode' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidLockMode.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidWrapperClass' => $vendorDir . '/doctrine/dbal/src/Exception/InvalidWrapperClass.php',
'Doctrine\\DBAL\\Exception\\LockWaitTimeoutException' => $vendorDir . '/doctrine/dbal/src/Exception/LockWaitTimeoutException.php',
'Doctrine\\DBAL\\Exception\\MalformedDsnException' => $vendorDir . '/doctrine/dbal/src/Exception/MalformedDsnException.php',
+ 'Doctrine\\DBAL\\Exception\\NoActiveTransaction' => $vendorDir . '/doctrine/dbal/src/Exception/NoActiveTransaction.php',
'Doctrine\\DBAL\\Exception\\NoKeyValue' => $vendorDir . '/doctrine/dbal/src/Exception/NoKeyValue.php',
'Doctrine\\DBAL\\Exception\\NonUniqueFieldNameException' => $vendorDir . '/doctrine/dbal/src/Exception/NonUniqueFieldNameException.php',
'Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException' => $vendorDir . '/doctrine/dbal/src/Exception/NotNullConstraintViolationException.php',
'Doctrine\\DBAL\\Exception\\ReadOnlyException' => $vendorDir . '/doctrine/dbal/src/Exception/ReadOnlyException.php',
'Doctrine\\DBAL\\Exception\\RetryableException' => $vendorDir . '/doctrine/dbal/src/Exception/RetryableException.php',
+ 'Doctrine\\DBAL\\Exception\\SavepointsNotSupported' => $vendorDir . '/doctrine/dbal/src/Exception/SavepointsNotSupported.php',
'Doctrine\\DBAL\\Exception\\SchemaDoesNotExist' => $vendorDir . '/doctrine/dbal/src/Exception/SchemaDoesNotExist.php',
'Doctrine\\DBAL\\Exception\\ServerException' => $vendorDir . '/doctrine/dbal/src/Exception/ServerException.php',
'Doctrine\\DBAL\\Exception\\SyntaxErrorException' => $vendorDir . '/doctrine/dbal/src/Exception/SyntaxErrorException.php',
'Doctrine\\DBAL\\Exception\\TableExistsException' => $vendorDir . '/doctrine/dbal/src/Exception/TableExistsException.php',
'Doctrine\\DBAL\\Exception\\TableNotFoundException' => $vendorDir . '/doctrine/dbal/src/Exception/TableNotFoundException.php',
'Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException' => $vendorDir . '/doctrine/dbal/src/Exception/UniqueConstraintViolationException.php',
+ 'Doctrine\\DBAL\\Exception\\UnknownDriver' => $vendorDir . '/doctrine/dbal/src/Exception/UnknownDriver.php',
'Doctrine\\DBAL\\ExpandArrayParameters' => $vendorDir . '/doctrine/dbal/src/ExpandArrayParameters.php',
- 'Doctrine\\DBAL\\FetchMode' => $vendorDir . '/doctrine/dbal/src/FetchMode.php',
- 'Doctrine\\DBAL\\Id\\TableGenerator' => $vendorDir . '/doctrine/dbal/src/Id/TableGenerator.php',
- 'Doctrine\\DBAL\\Id\\TableGeneratorSchemaVisitor' => $vendorDir . '/doctrine/dbal/src/Id/TableGeneratorSchemaVisitor.php',
'Doctrine\\DBAL\\LockMode' => $vendorDir . '/doctrine/dbal/src/LockMode.php',
'Doctrine\\DBAL\\Logging\\Connection' => $vendorDir . '/doctrine/dbal/src/Logging/Connection.php',
- 'Doctrine\\DBAL\\Logging\\DebugStack' => $vendorDir . '/doctrine/dbal/src/Logging/DebugStack.php',
'Doctrine\\DBAL\\Logging\\Driver' => $vendorDir . '/doctrine/dbal/src/Logging/Driver.php',
- 'Doctrine\\DBAL\\Logging\\LoggerChain' => $vendorDir . '/doctrine/dbal/src/Logging/LoggerChain.php',
'Doctrine\\DBAL\\Logging\\Middleware' => $vendorDir . '/doctrine/dbal/src/Logging/Middleware.php',
- 'Doctrine\\DBAL\\Logging\\SQLLogger' => $vendorDir . '/doctrine/dbal/src/Logging/SQLLogger.php',
'Doctrine\\DBAL\\Logging\\Statement' => $vendorDir . '/doctrine/dbal/src/Logging/Statement.php',
'Doctrine\\DBAL\\ParameterType' => $vendorDir . '/doctrine/dbal/src/ParameterType.php',
'Doctrine\\DBAL\\Platforms\\AbstractMySQLPlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/AbstractMySQLPlatform.php',
'Doctrine\\DBAL\\Platforms\\AbstractPlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/AbstractPlatform.php',
- 'Doctrine\\DBAL\\Platforms\\DB2111Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/DB2111Platform.php',
'Doctrine\\DBAL\\Platforms\\DB2Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/DB2Platform.php',
'Doctrine\\DBAL\\Platforms\\DateIntervalUnit' => $vendorDir . '/doctrine/dbal/src/Platforms/DateIntervalUnit.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\InvalidPlatformVersion' => $vendorDir . '/doctrine/dbal/src/Platforms/Exception/InvalidPlatformVersion.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\NoColumnsSpecifiedForTable' => $vendorDir . '/doctrine/dbal/src/Platforms/Exception/NoColumnsSpecifiedForTable.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\NotSupported' => $vendorDir . '/doctrine/dbal/src/Platforms/Exception/NotSupported.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\PlatformException' => $vendorDir . '/doctrine/dbal/src/Platforms/Exception/PlatformException.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\DB2Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/DB2Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\KeywordList' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/KeywordList.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\MariaDBKeywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MariaDBKeywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\MariaDb102Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MariaDb102Keywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\MySQL57Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MySQL57Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\MySQL80Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MySQL80Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\MySQLKeywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MySQLKeywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\OracleKeywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/OracleKeywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQL100Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/PostgreSQL100Keywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQL94Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/PostgreSQL94Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQLKeywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/PostgreSQLKeywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\ReservedKeywordsValidator' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/ReservedKeywordsValidator.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\SQLServer2012Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/SQLServer2012Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\SQLServerKeywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/SQLServerKeywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\SQLiteKeywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/SQLiteKeywords.php',
+ 'Doctrine\\DBAL\\Platforms\\MariaDB1052Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDB1052Platform.php',
+ 'Doctrine\\DBAL\\Platforms\\MariaDB1060Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDB1060Platform.php',
'Doctrine\\DBAL\\Platforms\\MariaDBPlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDBPlatform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1027Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDb1027Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1043Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDb1043Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1052Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDb1052Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1060Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDb1060Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MySQL57Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL57Platform.php',
'Doctrine\\DBAL\\Platforms\\MySQL80Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL80Platform.php',
'Doctrine\\DBAL\\Platforms\\MySQLPlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQLPlatform.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\CharsetMetadataProvider' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\CharsetMetadataProvider\\CachingCharsetMetadataProvider' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/CachingCharsetMetadataProvider.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\CharsetMetadataProvider\\ConnectionCharsetMetadataProvider' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\CollationMetadataProvider' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\CollationMetadataProvider\\CachingCollationMetadataProvider' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/CachingCollationMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\CollationMetadataProvider\\ConnectionCollationMetadataProvider' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/ConnectionCollationMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\Comparator' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/Comparator.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\DefaultTableOptions' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL/DefaultTableOptions.php',
'Doctrine\\DBAL\\Platforms\\OraclePlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/OraclePlatform.php',
- 'Doctrine\\DBAL\\Platforms\\PostgreSQL100Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/PostgreSQL100Platform.php',
- 'Doctrine\\DBAL\\Platforms\\PostgreSQL94Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/PostgreSQL94Platform.php',
'Doctrine\\DBAL\\Platforms\\PostgreSQLPlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/PostgreSQLPlatform.php',
- 'Doctrine\\DBAL\\Platforms\\SQLServer2012Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/SQLServer2012Platform.php',
'Doctrine\\DBAL\\Platforms\\SQLServerPlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/SQLServerPlatform.php',
'Doctrine\\DBAL\\Platforms\\SQLServer\\Comparator' => $vendorDir . '/doctrine/dbal/src/Platforms/SQLServer/Comparator.php',
'Doctrine\\DBAL\\Platforms\\SQLServer\\SQL\\Builder\\SQLServerSelectSQLBuilder' => $vendorDir . '/doctrine/dbal/src/Platforms/SQLServer/SQL/Builder/SQLServerSelectSQLBuilder.php',
+ 'Doctrine\\DBAL\\Platforms\\SQLitePlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/SQLitePlatform.php',
'Doctrine\\DBAL\\Platforms\\SQLite\\Comparator' => $vendorDir . '/doctrine/dbal/src/Platforms/SQLite/Comparator.php',
- 'Doctrine\\DBAL\\Platforms\\SqlitePlatform' => $vendorDir . '/doctrine/dbal/src/Platforms/SqlitePlatform.php',
'Doctrine\\DBAL\\Platforms\\TrimMode' => $vendorDir . '/doctrine/dbal/src/Platforms/TrimMode.php',
'Doctrine\\DBAL\\Portability\\Connection' => $vendorDir . '/doctrine/dbal/src/Portability/Connection.php',
'Doctrine\\DBAL\\Portability\\Converter' => $vendorDir . '/doctrine/dbal/src/Portability/Converter.php',
@@ -1456,13 +1419,18 @@
'Doctrine\\DBAL\\Portability\\Result' => $vendorDir . '/doctrine/dbal/src/Portability/Result.php',
'Doctrine\\DBAL\\Portability\\Statement' => $vendorDir . '/doctrine/dbal/src/Portability/Statement.php',
'Doctrine\\DBAL\\Query' => $vendorDir . '/doctrine/dbal/src/Query.php',
+ 'Doctrine\\DBAL\\Query\\Exception\\NonUniqueAlias' => $vendorDir . '/doctrine/dbal/src/Query/Exception/NonUniqueAlias.php',
+ 'Doctrine\\DBAL\\Query\\Exception\\UnknownAlias' => $vendorDir . '/doctrine/dbal/src/Query/Exception/UnknownAlias.php',
'Doctrine\\DBAL\\Query\\Expression\\CompositeExpression' => $vendorDir . '/doctrine/dbal/src/Query/Expression/CompositeExpression.php',
'Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder' => $vendorDir . '/doctrine/dbal/src/Query/Expression/ExpressionBuilder.php',
'Doctrine\\DBAL\\Query\\ForUpdate' => $vendorDir . '/doctrine/dbal/src/Query/ForUpdate.php',
'Doctrine\\DBAL\\Query\\ForUpdate\\ConflictResolutionMode' => $vendorDir . '/doctrine/dbal/src/Query/ForUpdate/ConflictResolutionMode.php',
+ 'Doctrine\\DBAL\\Query\\From' => $vendorDir . '/doctrine/dbal/src/Query/From.php',
+ 'Doctrine\\DBAL\\Query\\Join' => $vendorDir . '/doctrine/dbal/src/Query/Join.php',
'Doctrine\\DBAL\\Query\\Limit' => $vendorDir . '/doctrine/dbal/src/Query/Limit.php',
'Doctrine\\DBAL\\Query\\QueryBuilder' => $vendorDir . '/doctrine/dbal/src/Query/QueryBuilder.php',
'Doctrine\\DBAL\\Query\\QueryException' => $vendorDir . '/doctrine/dbal/src/Query/QueryException.php',
+ 'Doctrine\\DBAL\\Query\\QueryType' => $vendorDir . '/doctrine/dbal/src/Query/QueryType.php',
'Doctrine\\DBAL\\Query\\SelectQuery' => $vendorDir . '/doctrine/dbal/src/Query/SelectQuery.php',
'Doctrine\\DBAL\\Result' => $vendorDir . '/doctrine/dbal/src/Result.php',
'Doctrine\\DBAL\\SQL\\Builder\\CreateSchemaObjectsSQLBuilder' => $vendorDir . '/doctrine/dbal/src/SQL/Builder/CreateSchemaObjectsSQLBuilder.php',
@@ -1478,7 +1446,6 @@
'Doctrine\\DBAL\\Schema\\Column' => $vendorDir . '/doctrine/dbal/src/Schema/Column.php',
'Doctrine\\DBAL\\Schema\\ColumnDiff' => $vendorDir . '/doctrine/dbal/src/Schema/ColumnDiff.php',
'Doctrine\\DBAL\\Schema\\Comparator' => $vendorDir . '/doctrine/dbal/src/Schema/Comparator.php',
- 'Doctrine\\DBAL\\Schema\\Constraint' => $vendorDir . '/doctrine/dbal/src/Schema/Constraint.php',
'Doctrine\\DBAL\\Schema\\DB2SchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/DB2SchemaManager.php',
'Doctrine\\DBAL\\Schema\\DefaultSchemaManagerFactory' => $vendorDir . '/doctrine/dbal/src/Schema/DefaultSchemaManagerFactory.php',
'Doctrine\\DBAL\\Schema\\Exception\\ColumnAlreadyExists' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php',
@@ -1488,7 +1455,6 @@
'Doctrine\\DBAL\\Schema\\Exception\\IndexDoesNotExist' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/IndexDoesNotExist.php',
'Doctrine\\DBAL\\Schema\\Exception\\IndexNameInvalid' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/IndexNameInvalid.php',
'Doctrine\\DBAL\\Schema\\Exception\\InvalidTableName' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/InvalidTableName.php',
- 'Doctrine\\DBAL\\Schema\\Exception\\NamedForeignKeyRequired' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/NamedForeignKeyRequired.php',
'Doctrine\\DBAL\\Schema\\Exception\\NamespaceAlreadyExists' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/NamespaceAlreadyExists.php',
'Doctrine\\DBAL\\Schema\\Exception\\SequenceAlreadyExists' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/SequenceAlreadyExists.php',
'Doctrine\\DBAL\\Schema\\Exception\\SequenceDoesNotExist' => $vendorDir . '/doctrine/dbal/src/Schema/Exception/SequenceDoesNotExist.php',
@@ -1499,40 +1465,29 @@
'Doctrine\\DBAL\\Schema\\ForeignKeyConstraint' => $vendorDir . '/doctrine/dbal/src/Schema/ForeignKeyConstraint.php',
'Doctrine\\DBAL\\Schema\\Identifier' => $vendorDir . '/doctrine/dbal/src/Schema/Identifier.php',
'Doctrine\\DBAL\\Schema\\Index' => $vendorDir . '/doctrine/dbal/src/Schema/Index.php',
- 'Doctrine\\DBAL\\Schema\\LegacySchemaManagerFactory' => $vendorDir . '/doctrine/dbal/src/Schema/LegacySchemaManagerFactory.php',
'Doctrine\\DBAL\\Schema\\MySQLSchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/MySQLSchemaManager.php',
'Doctrine\\DBAL\\Schema\\OracleSchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/OracleSchemaManager.php',
'Doctrine\\DBAL\\Schema\\PostgreSQLSchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php',
'Doctrine\\DBAL\\Schema\\SQLServerSchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/SQLServerSchemaManager.php',
+ 'Doctrine\\DBAL\\Schema\\SQLiteSchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/SQLiteSchemaManager.php',
'Doctrine\\DBAL\\Schema\\Schema' => $vendorDir . '/doctrine/dbal/src/Schema/Schema.php',
'Doctrine\\DBAL\\Schema\\SchemaConfig' => $vendorDir . '/doctrine/dbal/src/Schema/SchemaConfig.php',
'Doctrine\\DBAL\\Schema\\SchemaDiff' => $vendorDir . '/doctrine/dbal/src/Schema/SchemaDiff.php',
'Doctrine\\DBAL\\Schema\\SchemaException' => $vendorDir . '/doctrine/dbal/src/Schema/SchemaException.php',
'Doctrine\\DBAL\\Schema\\SchemaManagerFactory' => $vendorDir . '/doctrine/dbal/src/Schema/SchemaManagerFactory.php',
'Doctrine\\DBAL\\Schema\\Sequence' => $vendorDir . '/doctrine/dbal/src/Schema/Sequence.php',
- 'Doctrine\\DBAL\\Schema\\SqliteSchemaManager' => $vendorDir . '/doctrine/dbal/src/Schema/SqliteSchemaManager.php',
'Doctrine\\DBAL\\Schema\\Table' => $vendorDir . '/doctrine/dbal/src/Schema/Table.php',
'Doctrine\\DBAL\\Schema\\TableDiff' => $vendorDir . '/doctrine/dbal/src/Schema/TableDiff.php',
'Doctrine\\DBAL\\Schema\\UniqueConstraint' => $vendorDir . '/doctrine/dbal/src/Schema/UniqueConstraint.php',
'Doctrine\\DBAL\\Schema\\View' => $vendorDir . '/doctrine/dbal/src/Schema/View.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\AbstractVisitor' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/AbstractVisitor.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\CreateSchemaSqlCollector' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/CreateSchemaSqlCollector.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\DropSchemaSqlCollector' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/DropSchemaSqlCollector.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\Graphviz' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/Graphviz.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\NamespaceVisitor' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/NamespaceVisitor.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\RemoveNamespacedAssets' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/RemoveNamespacedAssets.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\Visitor' => $vendorDir . '/doctrine/dbal/src/Schema/Visitor/Visitor.php',
+ 'Doctrine\\DBAL\\ServerVersionProvider' => $vendorDir . '/doctrine/dbal/src/ServerVersionProvider.php',
'Doctrine\\DBAL\\Statement' => $vendorDir . '/doctrine/dbal/src/Statement.php',
- 'Doctrine\\DBAL\\Tools\\Console\\Command\\CommandCompatibility' => $vendorDir . '/doctrine/dbal/src/Tools/Console/Command/CommandCompatibility.php',
- 'Doctrine\\DBAL\\Tools\\Console\\Command\\ReservedWordsCommand' => $vendorDir . '/doctrine/dbal/src/Tools/Console/Command/ReservedWordsCommand.php',
'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand' => $vendorDir . '/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php',
'Doctrine\\DBAL\\Tools\\Console\\ConnectionNotFound' => $vendorDir . '/doctrine/dbal/src/Tools/Console/ConnectionNotFound.php',
'Doctrine\\DBAL\\Tools\\Console\\ConnectionProvider' => $vendorDir . '/doctrine/dbal/src/Tools/Console/ConnectionProvider.php',
'Doctrine\\DBAL\\Tools\\Console\\ConnectionProvider\\SingleConnectionProvider' => $vendorDir . '/doctrine/dbal/src/Tools/Console/ConnectionProvider/SingleConnectionProvider.php',
- 'Doctrine\\DBAL\\Tools\\Console\\ConsoleRunner' => $vendorDir . '/doctrine/dbal/src/Tools/Console/ConsoleRunner.php',
'Doctrine\\DBAL\\Tools\\DsnParser' => $vendorDir . '/doctrine/dbal/src/Tools/DsnParser.php',
'Doctrine\\DBAL\\TransactionIsolationLevel' => $vendorDir . '/doctrine/dbal/src/TransactionIsolationLevel.php',
- 'Doctrine\\DBAL\\Types\\ArrayType' => $vendorDir . '/doctrine/dbal/src/Types/ArrayType.php',
'Doctrine\\DBAL\\Types\\AsciiStringType' => $vendorDir . '/doctrine/dbal/src/Types/AsciiStringType.php',
'Doctrine\\DBAL\\Types\\BigIntType' => $vendorDir . '/doctrine/dbal/src/Types/BigIntType.php',
'Doctrine\\DBAL\\Types\\BinaryType' => $vendorDir . '/doctrine/dbal/src/Types/BinaryType.php',
@@ -1547,13 +1502,24 @@
'Doctrine\\DBAL\\Types\\DateTimeTzType' => $vendorDir . '/doctrine/dbal/src/Types/DateTimeTzType.php',
'Doctrine\\DBAL\\Types\\DateType' => $vendorDir . '/doctrine/dbal/src/Types/DateType.php',
'Doctrine\\DBAL\\Types\\DecimalType' => $vendorDir . '/doctrine/dbal/src/Types/DecimalType.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\InvalidFormat' => $vendorDir . '/doctrine/dbal/src/Types/Exception/InvalidFormat.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\InvalidType' => $vendorDir . '/doctrine/dbal/src/Types/Exception/InvalidType.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\SerializationFailed' => $vendorDir . '/doctrine/dbal/src/Types/Exception/SerializationFailed.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypeAlreadyRegistered' => $vendorDir . '/doctrine/dbal/src/Types/Exception/TypeAlreadyRegistered.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypeNotFound' => $vendorDir . '/doctrine/dbal/src/Types/Exception/TypeNotFound.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypeNotRegistered' => $vendorDir . '/doctrine/dbal/src/Types/Exception/TypeNotRegistered.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypesAlreadyExists' => $vendorDir . '/doctrine/dbal/src/Types/Exception/TypesAlreadyExists.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypesException' => $vendorDir . '/doctrine/dbal/src/Types/Exception/TypesException.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\UnknownColumnType' => $vendorDir . '/doctrine/dbal/src/Types/Exception/UnknownColumnType.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\ValueNotConvertible' => $vendorDir . '/doctrine/dbal/src/Types/Exception/ValueNotConvertible.php',
'Doctrine\\DBAL\\Types\\FloatType' => $vendorDir . '/doctrine/dbal/src/Types/FloatType.php',
'Doctrine\\DBAL\\Types\\GuidType' => $vendorDir . '/doctrine/dbal/src/Types/GuidType.php',
'Doctrine\\DBAL\\Types\\IntegerType' => $vendorDir . '/doctrine/dbal/src/Types/IntegerType.php',
'Doctrine\\DBAL\\Types\\JsonType' => $vendorDir . '/doctrine/dbal/src/Types/JsonType.php',
- 'Doctrine\\DBAL\\Types\\ObjectType' => $vendorDir . '/doctrine/dbal/src/Types/ObjectType.php',
+ 'Doctrine\\DBAL\\Types\\PhpDateMappingType' => $vendorDir . '/doctrine/dbal/src/Types/PhpDateMappingType.php',
'Doctrine\\DBAL\\Types\\PhpDateTimeMappingType' => $vendorDir . '/doctrine/dbal/src/Types/PhpDateTimeMappingType.php',
'Doctrine\\DBAL\\Types\\PhpIntegerMappingType' => $vendorDir . '/doctrine/dbal/src/Types/PhpIntegerMappingType.php',
+ 'Doctrine\\DBAL\\Types\\PhpTimeMappingType' => $vendorDir . '/doctrine/dbal/src/Types/PhpTimeMappingType.php',
'Doctrine\\DBAL\\Types\\SimpleArrayType' => $vendorDir . '/doctrine/dbal/src/Types/SimpleArrayType.php',
'Doctrine\\DBAL\\Types\\SmallIntType' => $vendorDir . '/doctrine/dbal/src/Types/SmallIntType.php',
'Doctrine\\DBAL\\Types\\StringType' => $vendorDir . '/doctrine/dbal/src/Types/StringType.php',
@@ -1565,7 +1531,6 @@
'Doctrine\\DBAL\\Types\\Types' => $vendorDir . '/doctrine/dbal/src/Types/Types.php',
'Doctrine\\DBAL\\Types\\VarDateTimeImmutableType' => $vendorDir . '/doctrine/dbal/src/Types/VarDateTimeImmutableType.php',
'Doctrine\\DBAL\\Types\\VarDateTimeType' => $vendorDir . '/doctrine/dbal/src/Types/VarDateTimeType.php',
- 'Doctrine\\DBAL\\VersionAwarePlatformDriver' => $vendorDir . '/doctrine/dbal/src/VersionAwarePlatformDriver.php',
'Doctrine\\Deprecations\\Deprecation' => $vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php',
'Doctrine\\Deprecations\\PHPUnit\\VerifyDeprecations' => $vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php',
'Egulias\\EmailValidator\\EmailLexer' => $vendorDir . '/egulias/email-validator/src/EmailLexer.php',
diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php
index a9e39f853..8164ab64b 100644
--- a/composer/autoload_psr4.php
+++ b/composer/autoload_psr4.php
@@ -82,8 +82,6 @@
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'),
'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/src'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'),
- 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'),
- 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/src'),
'Cose\\' => array($vendorDir . '/web-auth/cose-lib/src'),
'CBOR\\' => array($vendorDir . '/spomky-labs/cbor-php/src'),
'Brick\\Math\\' => array($vendorDir . '/brick/math/src'),
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 914532b1a..9a5620978 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -175,8 +175,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\Deprecations\\' => 22,
'Doctrine\\DBAL\\' => 14,
'Doctrine\\Common\\Lexer\\' => 22,
- 'Doctrine\\Common\\Cache\\' => 22,
- 'Doctrine\\Common\\' => 16,
),
'C' =>
array (
@@ -499,14 +497,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
array (
0 => __DIR__ . '/..' . '/doctrine/lexer/src',
),
- 'Doctrine\\Common\\Cache\\' =>
- array (
- 0 => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache',
- ),
- 'Doctrine\\Common\\' =>
- array (
- 0 => __DIR__ . '/..' . '/doctrine/event-manager/src',
- ),
'Cose\\' =>
array (
0 => __DIR__ . '/..' . '/web-auth/cose-lib/src',
@@ -1755,22 +1745,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Cose\\Key\\OkpKey' => __DIR__ . '/..' . '/web-auth/cose-lib/src/Key/OkpKey.php',
'Cose\\Key\\RsaKey' => __DIR__ . '/..' . '/web-auth/cose-lib/src/Key/RsaKey.php',
'Cose\\Key\\SymmetricKey' => __DIR__ . '/..' . '/web-auth/cose-lib/src/Key/SymmetricKey.php',
- 'Doctrine\\Common\\Cache\\Cache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php',
- 'Doctrine\\Common\\Cache\\CacheProvider' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php',
- 'Doctrine\\Common\\Cache\\ClearableCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php',
- 'Doctrine\\Common\\Cache\\FlushableCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php',
- 'Doctrine\\Common\\Cache\\MultiDeleteCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php',
- 'Doctrine\\Common\\Cache\\MultiGetCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php',
- 'Doctrine\\Common\\Cache\\MultiOperationCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiOperationCache.php',
- 'Doctrine\\Common\\Cache\\MultiPutCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php',
- 'Doctrine\\Common\\Cache\\Psr6\\CacheAdapter' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php',
- 'Doctrine\\Common\\Cache\\Psr6\\CacheItem' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php',
- 'Doctrine\\Common\\Cache\\Psr6\\DoctrineProvider' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php',
- 'Doctrine\\Common\\Cache\\Psr6\\InvalidArgument' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php',
- 'Doctrine\\Common\\Cache\\Psr6\\TypedCacheItem' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php',
- 'Doctrine\\Common\\EventArgs' => __DIR__ . '/..' . '/doctrine/event-manager/src/EventArgs.php',
- 'Doctrine\\Common\\EventManager' => __DIR__ . '/..' . '/doctrine/event-manager/src/EventManager.php',
- 'Doctrine\\Common\\EventSubscriber' => __DIR__ . '/..' . '/doctrine/event-manager/src/EventSubscriber.php',
'Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/..' . '/doctrine/lexer/src/AbstractLexer.php',
'Doctrine\\Common\\Lexer\\Token' => __DIR__ . '/..' . '/doctrine/lexer/src/Token.php',
'Doctrine\\DBAL\\ArrayParameterType' => __DIR__ . '/..' . '/doctrine/dbal/src/ArrayParameterType.php',
@@ -1779,11 +1753,14 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\ArrayParameters\\Exception\\MissingPositionalParameter' => __DIR__ . '/..' . '/doctrine/dbal/src/ArrayParameters/Exception/MissingPositionalParameter.php',
'Doctrine\\DBAL\\Cache\\ArrayResult' => __DIR__ . '/..' . '/doctrine/dbal/src/Cache/ArrayResult.php',
'Doctrine\\DBAL\\Cache\\CacheException' => __DIR__ . '/..' . '/doctrine/dbal/src/Cache/CacheException.php',
+ 'Doctrine\\DBAL\\Cache\\Exception\\NoCacheKey' => __DIR__ . '/..' . '/doctrine/dbal/src/Cache/Exception/NoCacheKey.php',
+ 'Doctrine\\DBAL\\Cache\\Exception\\NoResultDriverConfigured' => __DIR__ . '/..' . '/doctrine/dbal/src/Cache/Exception/NoResultDriverConfigured.php',
'Doctrine\\DBAL\\Cache\\QueryCacheProfile' => __DIR__ . '/..' . '/doctrine/dbal/src/Cache/QueryCacheProfile.php',
'Doctrine\\DBAL\\ColumnCase' => __DIR__ . '/..' . '/doctrine/dbal/src/ColumnCase.php',
'Doctrine\\DBAL\\Configuration' => __DIR__ . '/..' . '/doctrine/dbal/src/Configuration.php',
'Doctrine\\DBAL\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/src/Connection.php',
'Doctrine\\DBAL\\ConnectionException' => __DIR__ . '/..' . '/doctrine/dbal/src/ConnectionException.php',
+ 'Doctrine\\DBAL\\Connection\\StaticServerVersionProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Connection/StaticServerVersionProvider.php',
'Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection' => __DIR__ . '/..' . '/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php',
'Doctrine\\DBAL\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver.php',
'Doctrine\\DBAL\\DriverManager' => __DIR__ . '/..' . '/doctrine/dbal/src/DriverManager.php',
@@ -1794,7 +1771,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php',
'Doctrine\\DBAL\\Driver\\API\\SQLSrv\\ExceptionConverter' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php',
'Doctrine\\DBAL\\Driver\\API\\SQLite\\ExceptionConverter' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php',
- 'Doctrine\\DBAL\\Driver\\API\\SQLite\\UserDefinedFunctions' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/API/SQLite/UserDefinedFunctions.php',
'Doctrine\\DBAL\\Driver\\AbstractDB2Driver' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/AbstractDB2Driver.php',
'Doctrine\\DBAL\\Driver\\AbstractException' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/AbstractException.php',
'Doctrine\\DBAL\\Driver\\AbstractMySQLDriver' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/AbstractMySQLDriver.php',
@@ -1807,7 +1783,8 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Driver\\AbstractSQLiteDriver\\Middleware\\EnableForeignKeys' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/AbstractSQLiteDriver/Middleware/EnableForeignKeys.php',
'Doctrine\\DBAL\\Driver\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/Connection.php',
'Doctrine\\DBAL\\Driver\\Exception' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/Exception.php',
- 'Doctrine\\DBAL\\Driver\\Exception\\UnknownParameterType' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/Exception/UnknownParameterType.php',
+ 'Doctrine\\DBAL\\Driver\\Exception\\IdentityColumnsNotSupported' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/Exception/IdentityColumnsNotSupported.php',
+ 'Doctrine\\DBAL\\Driver\\Exception\\NoIdentityValue' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/Exception/NoIdentityValue.php',
'Doctrine\\DBAL\\Driver\\FetchUtils' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/FetchUtils.php',
'Doctrine\\DBAL\\Driver\\IBMDB2\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/IBMDB2/Connection.php',
'Doctrine\\DBAL\\Driver\\IBMDB2\\DataSourceName' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php',
@@ -1849,7 +1826,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\Error' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/Exception/Error.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\InvalidConfiguration' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/Exception/InvalidConfiguration.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\NonTerminatedStringLiteral' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/Exception/NonTerminatedStringLiteral.php',
- 'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\SequenceDoesNotExist' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/Exception/SequenceDoesNotExist.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Exception\\UnknownParameterIndex' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/Exception/UnknownParameterIndex.php',
'Doctrine\\DBAL\\Driver\\OCI8\\ExecutionMode' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/ExecutionMode.php',
'Doctrine\\DBAL\\Driver\\OCI8\\Middleware\\InitializeSession' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/OCI8/Middleware/InitializeSession.php',
@@ -1859,8 +1835,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Driver\\PDO\\Exception' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/Exception.php',
'Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php',
'Doctrine\\DBAL\\Driver\\PDO\\OCI\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/OCI/Driver.php',
- 'Doctrine\\DBAL\\Driver\\PDO\\PDOException' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/PDOException.php',
- 'Doctrine\\DBAL\\Driver\\PDO\\ParameterTypeMap' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/ParameterTypeMap.php',
'Doctrine\\DBAL\\Driver\\PDO\\PgSQL\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php',
'Doctrine\\DBAL\\Driver\\PDO\\Result' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/Result.php',
'Doctrine\\DBAL\\Driver\\PDO\\SQLSrv\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php',
@@ -1887,29 +1861,9 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Driver\\SQLite3\\Exception' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/SQLite3/Exception.php',
'Doctrine\\DBAL\\Driver\\SQLite3\\Result' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/SQLite3/Result.php',
'Doctrine\\DBAL\\Driver\\SQLite3\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/SQLite3/Statement.php',
- 'Doctrine\\DBAL\\Driver\\ServerInfoAwareConnection' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/ServerInfoAwareConnection.php',
'Doctrine\\DBAL\\Driver\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/Statement.php',
- 'Doctrine\\DBAL\\Event\\ConnectionEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/ConnectionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\Listeners\\OracleSessionInit' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php',
- 'Doctrine\\DBAL\\Event\\Listeners\\SQLSessionInit' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php',
- 'Doctrine\\DBAL\\Event\\Listeners\\SQLiteSessionInit' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableAddColumnEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableChangeColumnEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableRemoveColumnEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaAlterTableRenameColumnEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaColumnDefinitionEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaCreateTableColumnEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaCreateTableEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaDropTableEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaEventArgs.php',
- 'Doctrine\\DBAL\\Event\\SchemaIndexDefinitionEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionBeginEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/TransactionBeginEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionCommitEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/TransactionCommitEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/TransactionEventArgs.php',
- 'Doctrine\\DBAL\\Event\\TransactionRollBackEventArgs' => __DIR__ . '/..' . '/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php',
- 'Doctrine\\DBAL\\Events' => __DIR__ . '/..' . '/doctrine/dbal/src/Events.php',
'Doctrine\\DBAL\\Exception' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception.php',
+ 'Doctrine\\DBAL\\Exception\\CommitFailedRollbackOnly' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/CommitFailedRollbackOnly.php',
'Doctrine\\DBAL\\Exception\\ConnectionException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/ConnectionException.php',
'Doctrine\\DBAL\\Exception\\ConnectionLost' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/ConnectionLost.php',
'Doctrine\\DBAL\\Exception\\ConstraintViolationException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/ConstraintViolationException.php',
@@ -1919,78 +1873,77 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Exception\\DatabaseRequired' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/DatabaseRequired.php',
'Doctrine\\DBAL\\Exception\\DeadlockException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/DeadlockException.php',
'Doctrine\\DBAL\\Exception\\DriverException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/DriverException.php',
+ 'Doctrine\\DBAL\\Exception\\DriverRequired' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/DriverRequired.php',
'Doctrine\\DBAL\\Exception\\ForeignKeyConstraintViolationException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/ForeignKeyConstraintViolationException.php',
'Doctrine\\DBAL\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidArgumentException.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnDeclaration' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidColumnDeclaration.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidColumnType.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType\\ColumnLengthRequired' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidColumnType/ColumnLengthRequired.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType\\ColumnPrecisionRequired' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidColumnType/ColumnPrecisionRequired.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidColumnType\\ColumnScaleRequired' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidColumnType/ColumnScaleRequired.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidDriverClass' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidDriverClass.php',
'Doctrine\\DBAL\\Exception\\InvalidFieldNameException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidFieldNameException.php',
- 'Doctrine\\DBAL\\Exception\\InvalidLockMode' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidLockMode.php',
+ 'Doctrine\\DBAL\\Exception\\InvalidWrapperClass' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/InvalidWrapperClass.php',
'Doctrine\\DBAL\\Exception\\LockWaitTimeoutException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/LockWaitTimeoutException.php',
'Doctrine\\DBAL\\Exception\\MalformedDsnException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/MalformedDsnException.php',
+ 'Doctrine\\DBAL\\Exception\\NoActiveTransaction' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/NoActiveTransaction.php',
'Doctrine\\DBAL\\Exception\\NoKeyValue' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/NoKeyValue.php',
'Doctrine\\DBAL\\Exception\\NonUniqueFieldNameException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/NonUniqueFieldNameException.php',
'Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/NotNullConstraintViolationException.php',
'Doctrine\\DBAL\\Exception\\ReadOnlyException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/ReadOnlyException.php',
'Doctrine\\DBAL\\Exception\\RetryableException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/RetryableException.php',
+ 'Doctrine\\DBAL\\Exception\\SavepointsNotSupported' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/SavepointsNotSupported.php',
'Doctrine\\DBAL\\Exception\\SchemaDoesNotExist' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/SchemaDoesNotExist.php',
'Doctrine\\DBAL\\Exception\\ServerException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/ServerException.php',
'Doctrine\\DBAL\\Exception\\SyntaxErrorException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/SyntaxErrorException.php',
'Doctrine\\DBAL\\Exception\\TableExistsException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/TableExistsException.php',
'Doctrine\\DBAL\\Exception\\TableNotFoundException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/TableNotFoundException.php',
'Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/UniqueConstraintViolationException.php',
+ 'Doctrine\\DBAL\\Exception\\UnknownDriver' => __DIR__ . '/..' . '/doctrine/dbal/src/Exception/UnknownDriver.php',
'Doctrine\\DBAL\\ExpandArrayParameters' => __DIR__ . '/..' . '/doctrine/dbal/src/ExpandArrayParameters.php',
- 'Doctrine\\DBAL\\FetchMode' => __DIR__ . '/..' . '/doctrine/dbal/src/FetchMode.php',
- 'Doctrine\\DBAL\\Id\\TableGenerator' => __DIR__ . '/..' . '/doctrine/dbal/src/Id/TableGenerator.php',
- 'Doctrine\\DBAL\\Id\\TableGeneratorSchemaVisitor' => __DIR__ . '/..' . '/doctrine/dbal/src/Id/TableGeneratorSchemaVisitor.php',
'Doctrine\\DBAL\\LockMode' => __DIR__ . '/..' . '/doctrine/dbal/src/LockMode.php',
'Doctrine\\DBAL\\Logging\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/Connection.php',
- 'Doctrine\\DBAL\\Logging\\DebugStack' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/DebugStack.php',
'Doctrine\\DBAL\\Logging\\Driver' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/Driver.php',
- 'Doctrine\\DBAL\\Logging\\LoggerChain' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/LoggerChain.php',
'Doctrine\\DBAL\\Logging\\Middleware' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/Middleware.php',
- 'Doctrine\\DBAL\\Logging\\SQLLogger' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/SQLLogger.php',
'Doctrine\\DBAL\\Logging\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/src/Logging/Statement.php',
'Doctrine\\DBAL\\ParameterType' => __DIR__ . '/..' . '/doctrine/dbal/src/ParameterType.php',
'Doctrine\\DBAL\\Platforms\\AbstractMySQLPlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/AbstractMySQLPlatform.php',
'Doctrine\\DBAL\\Platforms\\AbstractPlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/AbstractPlatform.php',
- 'Doctrine\\DBAL\\Platforms\\DB2111Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/DB2111Platform.php',
'Doctrine\\DBAL\\Platforms\\DB2Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/DB2Platform.php',
'Doctrine\\DBAL\\Platforms\\DateIntervalUnit' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/DateIntervalUnit.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\InvalidPlatformVersion' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Exception/InvalidPlatformVersion.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\NoColumnsSpecifiedForTable' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Exception/NoColumnsSpecifiedForTable.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\NotSupported' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Exception/NotSupported.php',
+ 'Doctrine\\DBAL\\Platforms\\Exception\\PlatformException' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Exception/PlatformException.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\DB2Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/DB2Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\KeywordList' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/KeywordList.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\MariaDBKeywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MariaDBKeywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\MariaDb102Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MariaDb102Keywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\MySQL57Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MySQL57Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\MySQL80Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MySQL80Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\MySQLKeywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MySQLKeywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\OracleKeywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/OracleKeywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQL100Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/PostgreSQL100Keywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQL94Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/PostgreSQL94Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQLKeywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/PostgreSQLKeywords.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\ReservedKeywordsValidator' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/ReservedKeywordsValidator.php',
- 'Doctrine\\DBAL\\Platforms\\Keywords\\SQLServer2012Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/SQLServer2012Keywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\SQLServerKeywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/SQLServerKeywords.php',
'Doctrine\\DBAL\\Platforms\\Keywords\\SQLiteKeywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/SQLiteKeywords.php',
+ 'Doctrine\\DBAL\\Platforms\\MariaDB1052Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDB1052Platform.php',
+ 'Doctrine\\DBAL\\Platforms\\MariaDB1060Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDB1060Platform.php',
'Doctrine\\DBAL\\Platforms\\MariaDBPlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDBPlatform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1027Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDb1027Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1043Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDb1043Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1052Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDb1052Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MariaDb1060Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDb1060Platform.php',
- 'Doctrine\\DBAL\\Platforms\\MySQL57Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL57Platform.php',
'Doctrine\\DBAL\\Platforms\\MySQL80Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL80Platform.php',
'Doctrine\\DBAL\\Platforms\\MySQLPlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQLPlatform.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\CharsetMetadataProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\CharsetMetadataProvider\\CachingCharsetMetadataProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/CachingCharsetMetadataProvider.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\CharsetMetadataProvider\\ConnectionCharsetMetadataProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\CollationMetadataProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\CollationMetadataProvider\\CachingCollationMetadataProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/CachingCollationMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\CollationMetadataProvider\\ConnectionCollationMetadataProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/CollationMetadataProvider/ConnectionCollationMetadataProvider.php',
'Doctrine\\DBAL\\Platforms\\MySQL\\Comparator' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/Comparator.php',
+ 'Doctrine\\DBAL\\Platforms\\MySQL\\DefaultTableOptions' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL/DefaultTableOptions.php',
'Doctrine\\DBAL\\Platforms\\OraclePlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/OraclePlatform.php',
- 'Doctrine\\DBAL\\Platforms\\PostgreSQL100Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/PostgreSQL100Platform.php',
- 'Doctrine\\DBAL\\Platforms\\PostgreSQL94Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/PostgreSQL94Platform.php',
'Doctrine\\DBAL\\Platforms\\PostgreSQLPlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/PostgreSQLPlatform.php',
- 'Doctrine\\DBAL\\Platforms\\SQLServer2012Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SQLServer2012Platform.php',
'Doctrine\\DBAL\\Platforms\\SQLServerPlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SQLServerPlatform.php',
'Doctrine\\DBAL\\Platforms\\SQLServer\\Comparator' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SQLServer/Comparator.php',
'Doctrine\\DBAL\\Platforms\\SQLServer\\SQL\\Builder\\SQLServerSelectSQLBuilder' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SQLServer/SQL/Builder/SQLServerSelectSQLBuilder.php',
+ 'Doctrine\\DBAL\\Platforms\\SQLitePlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SQLitePlatform.php',
'Doctrine\\DBAL\\Platforms\\SQLite\\Comparator' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SQLite/Comparator.php',
- 'Doctrine\\DBAL\\Platforms\\SqlitePlatform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/SqlitePlatform.php',
'Doctrine\\DBAL\\Platforms\\TrimMode' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/TrimMode.php',
'Doctrine\\DBAL\\Portability\\Connection' => __DIR__ . '/..' . '/doctrine/dbal/src/Portability/Connection.php',
'Doctrine\\DBAL\\Portability\\Converter' => __DIR__ . '/..' . '/doctrine/dbal/src/Portability/Converter.php',
@@ -2000,13 +1953,18 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Portability\\Result' => __DIR__ . '/..' . '/doctrine/dbal/src/Portability/Result.php',
'Doctrine\\DBAL\\Portability\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/src/Portability/Statement.php',
'Doctrine\\DBAL\\Query' => __DIR__ . '/..' . '/doctrine/dbal/src/Query.php',
+ 'Doctrine\\DBAL\\Query\\Exception\\NonUniqueAlias' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/Exception/NonUniqueAlias.php',
+ 'Doctrine\\DBAL\\Query\\Exception\\UnknownAlias' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/Exception/UnknownAlias.php',
'Doctrine\\DBAL\\Query\\Expression\\CompositeExpression' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/Expression/CompositeExpression.php',
'Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/Expression/ExpressionBuilder.php',
'Doctrine\\DBAL\\Query\\ForUpdate' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/ForUpdate.php',
'Doctrine\\DBAL\\Query\\ForUpdate\\ConflictResolutionMode' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/ForUpdate/ConflictResolutionMode.php',
+ 'Doctrine\\DBAL\\Query\\From' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/From.php',
+ 'Doctrine\\DBAL\\Query\\Join' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/Join.php',
'Doctrine\\DBAL\\Query\\Limit' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/Limit.php',
'Doctrine\\DBAL\\Query\\QueryBuilder' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/QueryBuilder.php',
'Doctrine\\DBAL\\Query\\QueryException' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/QueryException.php',
+ 'Doctrine\\DBAL\\Query\\QueryType' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/QueryType.php',
'Doctrine\\DBAL\\Query\\SelectQuery' => __DIR__ . '/..' . '/doctrine/dbal/src/Query/SelectQuery.php',
'Doctrine\\DBAL\\Result' => __DIR__ . '/..' . '/doctrine/dbal/src/Result.php',
'Doctrine\\DBAL\\SQL\\Builder\\CreateSchemaObjectsSQLBuilder' => __DIR__ . '/..' . '/doctrine/dbal/src/SQL/Builder/CreateSchemaObjectsSQLBuilder.php',
@@ -2022,7 +1980,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Schema\\Column' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Column.php',
'Doctrine\\DBAL\\Schema\\ColumnDiff' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/ColumnDiff.php',
'Doctrine\\DBAL\\Schema\\Comparator' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Comparator.php',
- 'Doctrine\\DBAL\\Schema\\Constraint' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Constraint.php',
'Doctrine\\DBAL\\Schema\\DB2SchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/DB2SchemaManager.php',
'Doctrine\\DBAL\\Schema\\DefaultSchemaManagerFactory' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/DefaultSchemaManagerFactory.php',
'Doctrine\\DBAL\\Schema\\Exception\\ColumnAlreadyExists' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php',
@@ -2032,7 +1989,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Schema\\Exception\\IndexDoesNotExist' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/IndexDoesNotExist.php',
'Doctrine\\DBAL\\Schema\\Exception\\IndexNameInvalid' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/IndexNameInvalid.php',
'Doctrine\\DBAL\\Schema\\Exception\\InvalidTableName' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/InvalidTableName.php',
- 'Doctrine\\DBAL\\Schema\\Exception\\NamedForeignKeyRequired' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/NamedForeignKeyRequired.php',
'Doctrine\\DBAL\\Schema\\Exception\\NamespaceAlreadyExists' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/NamespaceAlreadyExists.php',
'Doctrine\\DBAL\\Schema\\Exception\\SequenceAlreadyExists' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/SequenceAlreadyExists.php',
'Doctrine\\DBAL\\Schema\\Exception\\SequenceDoesNotExist' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Exception/SequenceDoesNotExist.php',
@@ -2043,40 +1999,29 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Schema\\ForeignKeyConstraint' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/ForeignKeyConstraint.php',
'Doctrine\\DBAL\\Schema\\Identifier' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Identifier.php',
'Doctrine\\DBAL\\Schema\\Index' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Index.php',
- 'Doctrine\\DBAL\\Schema\\LegacySchemaManagerFactory' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/LegacySchemaManagerFactory.php',
'Doctrine\\DBAL\\Schema\\MySQLSchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/MySQLSchemaManager.php',
'Doctrine\\DBAL\\Schema\\OracleSchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/OracleSchemaManager.php',
'Doctrine\\DBAL\\Schema\\PostgreSQLSchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php',
'Doctrine\\DBAL\\Schema\\SQLServerSchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SQLServerSchemaManager.php',
+ 'Doctrine\\DBAL\\Schema\\SQLiteSchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SQLiteSchemaManager.php',
'Doctrine\\DBAL\\Schema\\Schema' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Schema.php',
'Doctrine\\DBAL\\Schema\\SchemaConfig' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SchemaConfig.php',
'Doctrine\\DBAL\\Schema\\SchemaDiff' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SchemaDiff.php',
'Doctrine\\DBAL\\Schema\\SchemaException' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SchemaException.php',
'Doctrine\\DBAL\\Schema\\SchemaManagerFactory' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SchemaManagerFactory.php',
'Doctrine\\DBAL\\Schema\\Sequence' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Sequence.php',
- 'Doctrine\\DBAL\\Schema\\SqliteSchemaManager' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/SqliteSchemaManager.php',
'Doctrine\\DBAL\\Schema\\Table' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Table.php',
'Doctrine\\DBAL\\Schema\\TableDiff' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/TableDiff.php',
'Doctrine\\DBAL\\Schema\\UniqueConstraint' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/UniqueConstraint.php',
'Doctrine\\DBAL\\Schema\\View' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/View.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\AbstractVisitor' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/AbstractVisitor.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\CreateSchemaSqlCollector' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/CreateSchemaSqlCollector.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\DropSchemaSqlCollector' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/DropSchemaSqlCollector.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\Graphviz' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/Graphviz.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\NamespaceVisitor' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/NamespaceVisitor.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\RemoveNamespacedAssets' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/RemoveNamespacedAssets.php',
- 'Doctrine\\DBAL\\Schema\\Visitor\\Visitor' => __DIR__ . '/..' . '/doctrine/dbal/src/Schema/Visitor/Visitor.php',
+ 'Doctrine\\DBAL\\ServerVersionProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/ServerVersionProvider.php',
'Doctrine\\DBAL\\Statement' => __DIR__ . '/..' . '/doctrine/dbal/src/Statement.php',
- 'Doctrine\\DBAL\\Tools\\Console\\Command\\CommandCompatibility' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/Command/CommandCompatibility.php',
- 'Doctrine\\DBAL\\Tools\\Console\\Command\\ReservedWordsCommand' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/Command/ReservedWordsCommand.php',
'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php',
'Doctrine\\DBAL\\Tools\\Console\\ConnectionNotFound' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/ConnectionNotFound.php',
'Doctrine\\DBAL\\Tools\\Console\\ConnectionProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/ConnectionProvider.php',
'Doctrine\\DBAL\\Tools\\Console\\ConnectionProvider\\SingleConnectionProvider' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/ConnectionProvider/SingleConnectionProvider.php',
- 'Doctrine\\DBAL\\Tools\\Console\\ConsoleRunner' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/Console/ConsoleRunner.php',
'Doctrine\\DBAL\\Tools\\DsnParser' => __DIR__ . '/..' . '/doctrine/dbal/src/Tools/DsnParser.php',
'Doctrine\\DBAL\\TransactionIsolationLevel' => __DIR__ . '/..' . '/doctrine/dbal/src/TransactionIsolationLevel.php',
- 'Doctrine\\DBAL\\Types\\ArrayType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/ArrayType.php',
'Doctrine\\DBAL\\Types\\AsciiStringType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/AsciiStringType.php',
'Doctrine\\DBAL\\Types\\BigIntType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/BigIntType.php',
'Doctrine\\DBAL\\Types\\BinaryType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/BinaryType.php',
@@ -2091,13 +2036,24 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Types\\DateTimeTzType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/DateTimeTzType.php',
'Doctrine\\DBAL\\Types\\DateType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/DateType.php',
'Doctrine\\DBAL\\Types\\DecimalType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/DecimalType.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\InvalidFormat' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/InvalidFormat.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\InvalidType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/InvalidType.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\SerializationFailed' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/SerializationFailed.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypeAlreadyRegistered' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/TypeAlreadyRegistered.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypeNotFound' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/TypeNotFound.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypeNotRegistered' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/TypeNotRegistered.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypesAlreadyExists' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/TypesAlreadyExists.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\TypesException' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/TypesException.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\UnknownColumnType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/UnknownColumnType.php',
+ 'Doctrine\\DBAL\\Types\\Exception\\ValueNotConvertible' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Exception/ValueNotConvertible.php',
'Doctrine\\DBAL\\Types\\FloatType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/FloatType.php',
'Doctrine\\DBAL\\Types\\GuidType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/GuidType.php',
'Doctrine\\DBAL\\Types\\IntegerType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/IntegerType.php',
'Doctrine\\DBAL\\Types\\JsonType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/JsonType.php',
- 'Doctrine\\DBAL\\Types\\ObjectType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/ObjectType.php',
+ 'Doctrine\\DBAL\\Types\\PhpDateMappingType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/PhpDateMappingType.php',
'Doctrine\\DBAL\\Types\\PhpDateTimeMappingType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/PhpDateTimeMappingType.php',
'Doctrine\\DBAL\\Types\\PhpIntegerMappingType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/PhpIntegerMappingType.php',
+ 'Doctrine\\DBAL\\Types\\PhpTimeMappingType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/PhpTimeMappingType.php',
'Doctrine\\DBAL\\Types\\SimpleArrayType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/SimpleArrayType.php',
'Doctrine\\DBAL\\Types\\SmallIntType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/SmallIntType.php',
'Doctrine\\DBAL\\Types\\StringType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/StringType.php',
@@ -2109,7 +2065,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\DBAL\\Types\\Types' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/Types.php',
'Doctrine\\DBAL\\Types\\VarDateTimeImmutableType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/VarDateTimeImmutableType.php',
'Doctrine\\DBAL\\Types\\VarDateTimeType' => __DIR__ . '/..' . '/doctrine/dbal/src/Types/VarDateTimeType.php',
- 'Doctrine\\DBAL\\VersionAwarePlatformDriver' => __DIR__ . '/..' . '/doctrine/dbal/src/VersionAwarePlatformDriver.php',
'Doctrine\\Deprecations\\Deprecation' => __DIR__ . '/..' . '/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php',
'Doctrine\\Deprecations\\PHPUnit\\VerifyDeprecations' => __DIR__ . '/..' . '/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php',
'Egulias\\EmailValidator\\EmailLexer' => __DIR__ . '/..' . '/egulias/email-validator/src/EmailLexer.php',
diff --git a/composer/installed.json b/composer/installed.json
index a4347165d..4c5597799 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -445,147 +445,46 @@
},
"install-path": "../deepdiver1975/tarstreamer"
},
- {
- "name": "doctrine/cache",
- "version": "2.2.0",
- "version_normalized": "2.2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/cache.git",
- "reference": "1ca8f21980e770095a31456042471a57bc4c68fb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb",
- "reference": "1ca8f21980e770095a31456042471a57bc4c68fb",
- "shasum": ""
- },
- "require": {
- "php": "~7.1 || ^8.0"
- },
- "conflict": {
- "doctrine/common": ">2.2,<2.4"
- },
- "require-dev": {
- "cache/integration-tests": "dev-master",
- "doctrine/coding-standard": "^9",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "psr/cache": "^1.0 || ^2.0 || ^3.0",
- "symfony/cache": "^4.4 || ^5.4 || ^6",
- "symfony/var-exporter": "^4.4 || ^5.4 || ^6"
- },
- "time": "2022-05-20T20:07:39+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
- }
- ],
- "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.",
- "homepage": "https://www.doctrine-project.org/projects/cache.html",
- "keywords": [
- "abstraction",
- "apcu",
- "cache",
- "caching",
- "couchdb",
- "memcached",
- "php",
- "redis",
- "xcache"
- ],
- "support": {
- "issues": "https://github.com/doctrine/cache/issues",
- "source": "https://github.com/doctrine/cache/tree/2.2.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
- "type": "tidelift"
- }
- ],
- "install-path": "../doctrine/cache"
- },
{
"name": "doctrine/dbal",
- "version": "3.8.3",
- "version_normalized": "3.8.3.0",
+ "version": "4.0.4",
+ "version_normalized": "4.0.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c"
+ "reference": "50fda19f80724b55ff770bb4ff352407008e63c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/db922ba9436b7b18a23d1653a0b41ff2369ca41c",
- "reference": "db922ba9436b7b18a23d1653a0b41ff2369ca41c",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/50fda19f80724b55ff770bb4ff352407008e63c5",
+ "reference": "50fda19f80724b55ff770bb4ff352407008e63c5",
"shasum": ""
},
"require": {
- "composer-runtime-api": "^2",
- "doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
- "doctrine/event-manager": "^1|^2",
- "php": "^7.4 || ^8.0",
+ "php": "^8.1",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
- "jetbrains/phpstorm-stubs": "2023.1",
- "phpstan/phpstan": "1.10.58",
- "phpstan/phpstan-strict-rules": "^1.5",
- "phpunit/phpunit": "9.6.16",
- "psalm/plugin-phpunit": "0.18.4",
+ "jetbrains/phpstorm-stubs": "2023.2",
+ "phpstan/phpstan": "1.11.5",
+ "phpstan/phpstan-phpunit": "1.4.0",
+ "phpstan/phpstan-strict-rules": "^1.6",
+ "phpunit/phpunit": "10.5.22",
+ "psalm/plugin-phpunit": "0.19.0",
"slevomat/coding-standard": "8.13.1",
- "squizlabs/php_codesniffer": "3.9.0",
- "symfony/cache": "^5.4|^6.0|^7.0",
- "symfony/console": "^4.4|^5.4|^6.0|^7.0",
- "vimeo/psalm": "4.30.0"
+ "squizlabs/php_codesniffer": "3.10.1",
+ "symfony/cache": "^6.3.8|^7.0",
+ "symfony/console": "^5.4|^6.3|^7.0",
+ "vimeo/psalm": "5.24.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
- "time": "2024-03-03T15:55:06+00:00",
- "bin": [
- "bin/doctrine-dbal"
- ],
+ "time": "2024-06-19T11:57:23+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -639,7 +538,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.8.3"
+ "source": "https://github.com/doctrine/dbal/tree/4.0.4"
},
"funding": [
{
@@ -707,101 +606,6 @@
},
"install-path": "../doctrine/deprecations"
},
- {
- "name": "doctrine/event-manager",
- "version": "1.2.0",
- "version_normalized": "1.2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/event-manager.git",
- "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520",
- "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520",
- "shasum": ""
- },
- "require": {
- "doctrine/deprecations": "^0.5.3 || ^1",
- "php": "^7.1 || ^8.0"
- },
- "conflict": {
- "doctrine/common": "<2.9"
- },
- "require-dev": {
- "doctrine/coding-standard": "^9 || ^10",
- "phpstan/phpstan": "~1.4.10 || ^1.8.8",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.24"
- },
- "time": "2022-10-12T20:51:15+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Doctrine\\Common\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
- },
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com"
- }
- ],
- "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.",
- "homepage": "https://www.doctrine-project.org/projects/event-manager.html",
- "keywords": [
- "event",
- "event dispatcher",
- "event manager",
- "event system",
- "events"
- ],
- "support": {
- "issues": "https://github.com/doctrine/event-manager/issues",
- "source": "https://github.com/doctrine/event-manager/tree/1.2.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager",
- "type": "tidelift"
- }
- ],
- "install-path": "../doctrine/event-manager"
- },
{
"name": "doctrine/lexer",
"version": "3.0.1",
diff --git a/composer/installed.php b/composer/installed.php
index 34cb232d9..bf689aef3 100644
--- a/composer/installed.php
+++ b/composer/installed.php
@@ -1,9 +1,9 @@
array(
'name' => 'nextcloud/3rdparty',
- 'pretty_version' => '1.0.0+no-version-set',
- 'version' => '1.0.0.0',
- 'reference' => null,
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '6084b912d75b9e1e466b5211169e9e1c165587c5',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
@@ -73,19 +73,10 @@
'aliases' => array(),
'dev_requirement' => false,
),
- 'doctrine/cache' => array(
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'reference' => '1ca8f21980e770095a31456042471a57bc4c68fb',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../doctrine/cache',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
'doctrine/dbal' => array(
- 'pretty_version' => '3.8.3',
- 'version' => '3.8.3.0',
- 'reference' => 'db922ba9436b7b18a23d1653a0b41ff2369ca41c',
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'reference' => '50fda19f80724b55ff770bb4ff352407008e63c5',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/dbal',
'aliases' => array(),
@@ -100,15 +91,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
- 'doctrine/event-manager' => array(
- 'pretty_version' => '1.2.0',
- 'version' => '1.2.0.0',
- 'reference' => '95aa4cb529f1e96576f3fda9f5705ada4056a520',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../doctrine/event-manager',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
'doctrine/lexer' => array(
'pretty_version' => '3.0.1',
'version' => '3.0.1.0',
@@ -290,9 +272,9 @@
'dev_requirement' => false,
),
'nextcloud/3rdparty' => array(
- 'pretty_version' => '1.0.0+no-version-set',
- 'version' => '1.0.0.0',
- 'reference' => null,
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '6084b912d75b9e1e466b5211169e9e1c165587c5',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
diff --git a/doctrine/cache/LICENSE b/doctrine/cache/LICENSE
deleted file mode 100644
index 8c38cc1bc..000000000
--- a/doctrine/cache/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2006-2015 Doctrine Project
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php
deleted file mode 100644
index 4cfab6c0f..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php
+++ /dev/null
@@ -1,90 +0,0 @@
-hits
- * Number of keys that have been requested and found present.
- *
- * - misses
- * Number of items that have been requested and not found.
- *
- * - uptime
- * Time that the server is running.
- *
- * - memory_usage
- * Memory used by this server to store items.
- *
- * - memory_available
- * Memory allowed to use for storage.
- *
- * @return mixed[]|null An associative array with server's statistics if available, NULL otherwise.
- */
- public function getStats();
-}
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
deleted file mode 100644
index 180482a7b..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
+++ /dev/null
@@ -1,325 +0,0 @@
-namespace = (string) $namespace;
- $this->namespaceVersion = null;
- }
-
- /**
- * Retrieves the namespace that prefixes all cache ids.
- *
- * @return string
- */
- public function getNamespace()
- {
- return $this->namespace;
- }
-
- /**
- * {@inheritdoc}
- */
- public function fetch($id)
- {
- return $this->doFetch($this->getNamespacedId($id));
- }
-
- /**
- * {@inheritdoc}
- */
- public function fetchMultiple(array $keys)
- {
- if (empty($keys)) {
- return [];
- }
-
- // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys
- $namespacedKeys = array_combine($keys, array_map([$this, 'getNamespacedId'], $keys));
- $items = $this->doFetchMultiple($namespacedKeys);
- $foundItems = [];
-
- // no internal array function supports this sort of mapping: needs to be iterative
- // this filters and combines keys in one pass
- foreach ($namespacedKeys as $requestedKey => $namespacedKey) {
- if (! isset($items[$namespacedKey]) && ! array_key_exists($namespacedKey, $items)) {
- continue;
- }
-
- $foundItems[$requestedKey] = $items[$namespacedKey];
- }
-
- return $foundItems;
- }
-
- /**
- * {@inheritdoc}
- */
- public function saveMultiple(array $keysAndValues, $lifetime = 0)
- {
- $namespacedKeysAndValues = [];
- foreach ($keysAndValues as $key => $value) {
- $namespacedKeysAndValues[$this->getNamespacedId($key)] = $value;
- }
-
- return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime);
- }
-
- /**
- * {@inheritdoc}
- */
- public function contains($id)
- {
- return $this->doContains($this->getNamespacedId($id));
- }
-
- /**
- * {@inheritdoc}
- */
- public function save($id, $data, $lifeTime = 0)
- {
- return $this->doSave($this->getNamespacedId($id), $data, $lifeTime);
- }
-
- /**
- * {@inheritdoc}
- */
- public function deleteMultiple(array $keys)
- {
- return $this->doDeleteMultiple(array_map([$this, 'getNamespacedId'], $keys));
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete($id)
- {
- return $this->doDelete($this->getNamespacedId($id));
- }
-
- /**
- * {@inheritdoc}
- */
- public function getStats()
- {
- return $this->doGetStats();
- }
-
- /**
- * {@inheritDoc}
- */
- public function flushAll()
- {
- return $this->doFlush();
- }
-
- /**
- * {@inheritDoc}
- */
- public function deleteAll()
- {
- $namespaceCacheKey = $this->getNamespaceCacheKey();
- $namespaceVersion = $this->getNamespaceVersion() + 1;
-
- if ($this->doSave($namespaceCacheKey, $namespaceVersion)) {
- $this->namespaceVersion = $namespaceVersion;
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Prefixes the passed id with the configured namespace value.
- *
- * @param string $id The id to namespace.
- *
- * @return string The namespaced id.
- */
- private function getNamespacedId(string $id): string
- {
- $namespaceVersion = $this->getNamespaceVersion();
-
- return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);
- }
-
- /**
- * Returns the namespace cache key.
- */
- private function getNamespaceCacheKey(): string
- {
- return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace);
- }
-
- /**
- * Returns the namespace version.
- */
- private function getNamespaceVersion(): int
- {
- if ($this->namespaceVersion !== null) {
- return $this->namespaceVersion;
- }
-
- $namespaceCacheKey = $this->getNamespaceCacheKey();
- $this->namespaceVersion = (int) $this->doFetch($namespaceCacheKey) ?: 1;
-
- return $this->namespaceVersion;
- }
-
- /**
- * Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.
- *
- * @param string[] $keys Array of keys to retrieve from cache
- *
- * @return mixed[] Array of values retrieved for the given keys.
- */
- protected function doFetchMultiple(array $keys)
- {
- $returnValues = [];
-
- foreach ($keys as $key) {
- $item = $this->doFetch($key);
- if ($item === false && ! $this->doContains($key)) {
- continue;
- }
-
- $returnValues[$key] = $item;
- }
-
- return $returnValues;
- }
-
- /**
- * Fetches an entry from the cache.
- *
- * @param string $id The id of the cache entry to fetch.
- *
- * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id.
- */
- abstract protected function doFetch($id);
-
- /**
- * Tests if an entry exists in the cache.
- *
- * @param string $id The cache id of the entry to check for.
- *
- * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise.
- */
- abstract protected function doContains($id);
-
- /**
- * Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.
- *
- * @param mixed[] $keysAndValues Array of keys and values to save in cache
- * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these
- * cache entries (0 => infinite lifeTime).
- *
- * @return bool TRUE if the operation was successful, FALSE if it wasn't.
- */
- protected function doSaveMultiple(array $keysAndValues, $lifetime = 0)
- {
- $success = true;
-
- foreach ($keysAndValues as $key => $value) {
- if ($this->doSave($key, $value, $lifetime)) {
- continue;
- }
-
- $success = false;
- }
-
- return $success;
- }
-
- /**
- * Puts data into the cache.
- *
- * @param string $id The cache id.
- * @param string $data The cache entry/data.
- * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this
- * cache entry (0 => infinite lifeTime).
- *
- * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.
- */
- abstract protected function doSave($id, $data, $lifeTime = 0);
-
- /**
- * Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it.
- *
- * @param string[] $keys Array of keys to delete from cache
- *
- * @return bool TRUE if the operation was successful, FALSE if it wasn't
- */
- protected function doDeleteMultiple(array $keys)
- {
- $success = true;
-
- foreach ($keys as $key) {
- if ($this->doDelete($key)) {
- continue;
- }
-
- $success = false;
- }
-
- return $success;
- }
-
- /**
- * Deletes a cache entry.
- *
- * @param string $id The cache id.
- *
- * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise.
- */
- abstract protected function doDelete($id);
-
- /**
- * Flushes all cache entries.
- *
- * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise.
- */
- abstract protected function doFlush();
-
- /**
- * Retrieves cached information from the data store.
- *
- * @return mixed[]|null An associative array with server's statistics if available, NULL otherwise.
- */
- abstract protected function doGetStats();
-}
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php b/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php
deleted file mode 100644
index b94618e46..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php
+++ /dev/null
@@ -1,21 +0,0 @@
- infinite lifeTime).
- *
- * @return bool TRUE if the operation was successful, FALSE if it wasn't.
- */
- public function saveMultiple(array $keysAndValues, $lifetime = 0);
-}
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php b/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php
deleted file mode 100644
index d3693b7c6..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php
+++ /dev/null
@@ -1,340 +0,0 @@
- */
- private $deferredItems = [];
-
- public static function wrap(Cache $cache): CacheItemPoolInterface
- {
- if ($cache instanceof DoctrineProvider && ! $cache->getNamespace()) {
- return $cache->getPool();
- }
-
- if ($cache instanceof SymfonyDoctrineProvider && ! $cache->getNamespace()) {
- $getPool = function () {
- // phpcs:ignore Squiz.Scope.StaticThisUsage.Found
- return $this->pool;
- };
-
- return $getPool->bindTo($cache, SymfonyDoctrineProvider::class)();
- }
-
- return new self($cache);
- }
-
- private function __construct(Cache $cache)
- {
- $this->cache = $cache;
- }
-
- /** @internal */
- public function getCache(): Cache
- {
- return $this->cache;
- }
-
- /**
- * {@inheritDoc}
- */
- public function getItem($key): CacheItemInterface
- {
- assert(self::validKey($key));
-
- if (isset($this->deferredItems[$key])) {
- $this->commit();
- }
-
- $value = $this->cache->fetch($key);
-
- if (PHP_VERSION_ID >= 80000) {
- if ($value !== false) {
- return new TypedCacheItem($key, $value, true);
- }
-
- return new TypedCacheItem($key, null, false);
- }
-
- if ($value !== false) {
- return new CacheItem($key, $value, true);
- }
-
- return new CacheItem($key, null, false);
- }
-
- /**
- * {@inheritDoc}
- */
- public function getItems(array $keys = []): array
- {
- if ($this->deferredItems) {
- $this->commit();
- }
-
- assert(self::validKeys($keys));
-
- $values = $this->doFetchMultiple($keys);
- $items = [];
-
- if (PHP_VERSION_ID >= 80000) {
- foreach ($keys as $key) {
- if (array_key_exists($key, $values)) {
- $items[$key] = new TypedCacheItem($key, $values[$key], true);
- } else {
- $items[$key] = new TypedCacheItem($key, null, false);
- }
- }
-
- return $items;
- }
-
- foreach ($keys as $key) {
- if (array_key_exists($key, $values)) {
- $items[$key] = new CacheItem($key, $values[$key], true);
- } else {
- $items[$key] = new CacheItem($key, null, false);
- }
- }
-
- return $items;
- }
-
- /**
- * {@inheritDoc}
- */
- public function hasItem($key): bool
- {
- assert(self::validKey($key));
-
- if (isset($this->deferredItems[$key])) {
- $this->commit();
- }
-
- return $this->cache->contains($key);
- }
-
- public function clear(): bool
- {
- $this->deferredItems = [];
-
- if (! $this->cache instanceof ClearableCache) {
- return false;
- }
-
- return $this->cache->deleteAll();
- }
-
- /**
- * {@inheritDoc}
- */
- public function deleteItem($key): bool
- {
- assert(self::validKey($key));
- unset($this->deferredItems[$key]);
-
- return $this->cache->delete($key);
- }
-
- /**
- * {@inheritDoc}
- */
- public function deleteItems(array $keys): bool
- {
- foreach ($keys as $key) {
- assert(self::validKey($key));
- unset($this->deferredItems[$key]);
- }
-
- return $this->doDeleteMultiple($keys);
- }
-
- public function save(CacheItemInterface $item): bool
- {
- return $this->saveDeferred($item) && $this->commit();
- }
-
- public function saveDeferred(CacheItemInterface $item): bool
- {
- if (! $item instanceof CacheItem && ! $item instanceof TypedCacheItem) {
- return false;
- }
-
- $this->deferredItems[$item->getKey()] = $item;
-
- return true;
- }
-
- public function commit(): bool
- {
- if (! $this->deferredItems) {
- return true;
- }
-
- $now = microtime(true);
- $itemsCount = 0;
- $byLifetime = [];
- $expiredKeys = [];
-
- foreach ($this->deferredItems as $key => $item) {
- $lifetime = ($item->getExpiry() ?? $now) - $now;
-
- if ($lifetime < 0) {
- $expiredKeys[] = $key;
-
- continue;
- }
-
- ++$itemsCount;
- $byLifetime[(int) $lifetime][$key] = $item->get();
- }
-
- $this->deferredItems = [];
-
- switch (count($expiredKeys)) {
- case 0:
- break;
- case 1:
- $this->cache->delete(current($expiredKeys));
- break;
- default:
- $this->doDeleteMultiple($expiredKeys);
- break;
- }
-
- if ($itemsCount === 1) {
- return $this->cache->save($key, $item->get(), (int) $lifetime);
- }
-
- $success = true;
- foreach ($byLifetime as $lifetime => $values) {
- $success = $this->doSaveMultiple($values, $lifetime) && $success;
- }
-
- return $success;
- }
-
- public function __destruct()
- {
- $this->commit();
- }
-
- /**
- * @param mixed $key
- */
- private static function validKey($key): bool
- {
- if (! is_string($key)) {
- throw new InvalidArgument(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key)));
- }
-
- if ($key === '') {
- throw new InvalidArgument('Cache key length must be greater than zero.');
- }
-
- if (strpbrk($key, self::RESERVED_CHARACTERS) !== false) {
- throw new InvalidArgument(sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS));
- }
-
- return true;
- }
-
- /**
- * @param mixed[] $keys
- */
- private static function validKeys(array $keys): bool
- {
- foreach ($keys as $key) {
- self::validKey($key);
- }
-
- return true;
- }
-
- /**
- * @param mixed[] $keys
- */
- private function doDeleteMultiple(array $keys): bool
- {
- if ($this->cache instanceof MultiDeleteCache) {
- return $this->cache->deleteMultiple($keys);
- }
-
- $success = true;
- foreach ($keys as $key) {
- $success = $this->cache->delete($key) && $success;
- }
-
- return $success;
- }
-
- /**
- * @param mixed[] $keys
- *
- * @return mixed[]
- */
- private function doFetchMultiple(array $keys): array
- {
- if ($this->cache instanceof MultiGetCache) {
- return $this->cache->fetchMultiple($keys);
- }
-
- $values = [];
- foreach ($keys as $key) {
- $value = $this->cache->fetch($key);
- if (! $value) {
- continue;
- }
-
- $values[$key] = $value;
- }
-
- return $values;
- }
-
- /**
- * @param mixed[] $keysAndValues
- */
- private function doSaveMultiple(array $keysAndValues, int $lifetime = 0): bool
- {
- if ($this->cache instanceof MultiPutCache) {
- return $this->cache->saveMultiple($keysAndValues, $lifetime);
- }
-
- $success = true;
- foreach ($keysAndValues as $key => $value) {
- $success = $this->cache->save($key, $value, $lifetime) && $success;
- }
-
- return $success;
- }
-}
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php b/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php
deleted file mode 100644
index 0b6f0a28d..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php
+++ /dev/null
@@ -1,118 +0,0 @@
-key = $key;
- $this->value = $data;
- $this->isHit = $isHit;
- }
-
- public function getKey(): string
- {
- return $this->key;
- }
-
- /**
- * {@inheritDoc}
- *
- * @return mixed
- */
- public function get()
- {
- return $this->value;
- }
-
- public function isHit(): bool
- {
- return $this->isHit;
- }
-
- /**
- * {@inheritDoc}
- */
- public function set($value): self
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * {@inheritDoc}
- */
- public function expiresAt($expiration): self
- {
- if ($expiration === null) {
- $this->expiry = null;
- } elseif ($expiration instanceof DateTimeInterface) {
- $this->expiry = (float) $expiration->format('U.u');
- } else {
- throw new TypeError(sprintf(
- 'Expected $expiration to be an instance of DateTimeInterface or null, got %s',
- is_object($expiration) ? get_class($expiration) : gettype($expiration)
- ));
- }
-
- return $this;
- }
-
- /**
- * {@inheritDoc}
- */
- public function expiresAfter($time): self
- {
- if ($time === null) {
- $this->expiry = null;
- } elseif ($time instanceof DateInterval) {
- $this->expiry = microtime(true) + DateTime::createFromFormat('U', 0)->add($time)->format('U.u');
- } elseif (is_int($time)) {
- $this->expiry = $time + microtime(true);
- } else {
- throw new TypeError(sprintf(
- 'Expected $time to be either an integer, an instance of DateInterval or null, got %s',
- is_object($time) ? get_class($time) : gettype($time)
- ));
- }
-
- return $this;
- }
-
- /**
- * @internal
- */
- public function getExpiry(): ?float
- {
- return $this->expiry;
- }
-}
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php b/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php
deleted file mode 100644
index 3b0f416c1..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Doctrine\Common\Cache\Psr6;
-
-use Doctrine\Common\Cache\Cache;
-use Doctrine\Common\Cache\CacheProvider;
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\Cache\Adapter\DoctrineAdapter as SymfonyDoctrineAdapter;
-use Symfony\Contracts\Service\ResetInterface;
-
-use function rawurlencode;
-
-/**
- * This class was copied from the Symfony Framework, see the original copyright
- * notice above. The code is distributed subject to the license terms in
- * https://github.com/symfony/symfony/blob/ff0cf61278982539c49e467db9ab13cbd342f76d/LICENSE
- */
-final class DoctrineProvider extends CacheProvider
-{
- /** @var CacheItemPoolInterface */
- private $pool;
-
- public static function wrap(CacheItemPoolInterface $pool): Cache
- {
- if ($pool instanceof CacheAdapter) {
- return $pool->getCache();
- }
-
- if ($pool instanceof SymfonyDoctrineAdapter) {
- $getCache = function () {
- // phpcs:ignore Squiz.Scope.StaticThisUsage.Found
- return $this->provider;
- };
-
- return $getCache->bindTo($pool, SymfonyDoctrineAdapter::class)();
- }
-
- return new self($pool);
- }
-
- private function __construct(CacheItemPoolInterface $pool)
- {
- $this->pool = $pool;
- }
-
- /** @internal */
- public function getPool(): CacheItemPoolInterface
- {
- return $this->pool;
- }
-
- public function reset(): void
- {
- if ($this->pool instanceof ResetInterface) {
- $this->pool->reset();
- }
-
- $this->setNamespace($this->getNamespace());
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch($id)
- {
- $item = $this->pool->getItem(rawurlencode($id));
-
- return $item->isHit() ? $item->get() : false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doContains($id)
- {
- return $this->pool->hasItem(rawurlencode($id));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doSave($id, $data, $lifeTime = 0)
- {
- $item = $this->pool->getItem(rawurlencode($id));
-
- if (0 < $lifeTime) {
- $item->expiresAfter($lifeTime);
- }
-
- return $this->pool->save($item->set($data));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doDelete($id)
- {
- return $this->pool->deleteItem(rawurlencode($id));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doFlush()
- {
- return $this->pool->clear();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return array|null
- */
- protected function doGetStats()
- {
- return null;
- }
-}
diff --git a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php b/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php
deleted file mode 100644
index 196f1bca9..000000000
--- a/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php
+++ /dev/null
@@ -1,13 +0,0 @@
-key;
- }
-
- public function get(): mixed
- {
- return $this->value;
- }
-
- public function isHit(): bool
- {
- return $this->isHit;
- }
-
- public function set(mixed $value): static
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * {@inheritDoc}
- */
- public function expiresAt($expiration): static
- {
- if ($expiration === null) {
- $this->expiry = null;
- } elseif ($expiration instanceof DateTimeInterface) {
- $this->expiry = (float) $expiration->format('U.u');
- } else {
- throw new TypeError(sprintf(
- 'Expected $expiration to be an instance of DateTimeInterface or null, got %s',
- get_debug_type($expiration)
- ));
- }
-
- return $this;
- }
-
- /**
- * {@inheritDoc}
- */
- public function expiresAfter($time): static
- {
- if ($time === null) {
- $this->expiry = null;
- } elseif ($time instanceof DateInterval) {
- $this->expiry = microtime(true) + DateTime::createFromFormat('U', 0)->add($time)->format('U.u');
- } elseif (is_int($time)) {
- $this->expiry = $time + microtime(true);
- } else {
- throw new TypeError(sprintf(
- 'Expected $time to be either an integer, an instance of DateInterval or null, got %s',
- get_debug_type($time)
- ));
- }
-
- return $this;
- }
-
- /**
- * @internal
- */
- public function getExpiry(): ?float
- {
- return $this->expiry;
- }
-}
diff --git a/doctrine/dbal/src/ArrayParameterType.php b/doctrine/dbal/src/ArrayParameterType.php
index 65e1a29c2..851d47d18 100644
--- a/doctrine/dbal/src/ArrayParameterType.php
+++ b/doctrine/dbal/src/ArrayParameterType.php
@@ -1,42 +1,39 @@
ParameterType::INTEGER,
+ self::STRING => ParameterType::STRING,
+ self::ASCII => ParameterType::ASCII,
+ self::BINARY => ParameterType::BINARY,
+ };
}
}
diff --git a/doctrine/dbal/src/ArrayParameters/Exception.php b/doctrine/dbal/src/ArrayParameters/Exception.php
index 7fc0f7060..e5a580b76 100644
--- a/doctrine/dbal/src/ArrayParameters/Exception.php
+++ b/doctrine/dbal/src/ArrayParameters/Exception.php
@@ -1,5 +1,7 @@
> */
- private array $data;
-
- private int $columnCount = 0;
- private int $num = 0;
+ private readonly int $columnCount;
+ private int $num = 0;
/** @param list> $data */
- public function __construct(array $data)
+ public function __construct(private array $data)
{
- $this->data = $data;
- if (count($data) === 0) {
- return;
- }
-
- $this->columnCount = count($data[0]);
+ $this->columnCount = $data === [] ? 0 : count($data[0]);
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
$row = $this->fetch();
@@ -43,18 +34,12 @@ public function fetchNumeric()
return array_values($row);
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
return $this->fetch();
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
$row = $this->fetch();
@@ -105,7 +90,7 @@ public function free(): void
}
/** @return array|false */
- private function fetch()
+ private function fetch(): array|false
{
if (! isset($this->data[$this->num])) {
return false;
diff --git a/doctrine/dbal/src/Cache/CacheException.php b/doctrine/dbal/src/Cache/CacheException.php
index 18e95d6be..a6913ed0c 100644
--- a/doctrine/dbal/src/Cache/CacheException.php
+++ b/doctrine/dbal/src/Cache/CacheException.php
@@ -1,21 +1,12 @@
lifetime = $lifetime;
- $this->cacheKey = $cacheKey;
- if ($resultCache instanceof CacheItemPoolInterface) {
- $this->resultCache = $resultCache;
- } elseif ($resultCache instanceof Cache) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4620',
- 'Passing an instance of %s to %s as $resultCache is deprecated. Pass an instance of %s instead.',
- Cache::class,
- __METHOD__,
- CacheItemPoolInterface::class,
- );
-
- $this->resultCache = CacheAdapter::wrap($resultCache);
- } elseif ($resultCache !== null) {
- throw new TypeError(sprintf(
- '$resultCache: Expected either null or an instance of %s or %s, got %s.',
- CacheItemPoolInterface::class,
- Cache::class,
- get_class($resultCache),
- ));
- }
+ public function __construct(
+ private readonly int $lifetime = 0,
+ private readonly ?string $cacheKey = null,
+ private readonly ?CacheItemPoolInterface $resultCache = null,
+ ) {
}
public function getResultCache(): ?CacheItemPoolInterface
@@ -68,38 +33,16 @@ public function getResultCache(): ?CacheItemPoolInterface
return $this->resultCache;
}
- /**
- * @deprecated Use {@see getResultCache()} instead.
- *
- * @return Cache|null
- */
- public function getResultCacheDriver()
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4620',
- '%s is deprecated, call getResultCache() instead.',
- __METHOD__,
- );
-
- return $this->resultCache !== null ? DoctrineProvider::wrap($this->resultCache) : null;
- }
-
- /** @return int */
- public function getLifetime()
+ public function getLifetime(): int
{
return $this->lifetime;
}
- /**
- * @return string
- *
- * @throws CacheException
- */
- public function getCacheKey()
+ /** @throws CacheException */
+ public function getCacheKey(): string
{
if ($this->cacheKey === null) {
- throw CacheException::noCacheKey();
+ throw NoCacheKey::new();
}
return $this->cacheKey;
@@ -108,14 +51,13 @@ public function getCacheKey()
/**
* Generates the real cache key from query, params, types and connection parameters.
*
- * @param string $sql
- * @param list|array $params
- * @param array|array $types
- * @param array $connectionParams
+ * @param list|array $params
+ * @param array $connectionParams
+ * @psalm-param array|array $types
*
* @return array{string, string}
*/
- public function generateCacheKeys($sql, $params, $types, array $connectionParams = [])
+ public function generateCacheKeys(string $sql, array $params, array $types, array $connectionParams = []): array
{
if (isset($connectionParams['password'])) {
unset($connectionParams['password']);
@@ -137,39 +79,12 @@ public function setResultCache(CacheItemPoolInterface $cache): QueryCacheProfile
return new QueryCacheProfile($this->lifetime, $this->cacheKey, $cache);
}
- /**
- * @deprecated Use {@see setResultCache()} instead.
- *
- * @return QueryCacheProfile
- */
- public function setResultCacheDriver(Cache $cache)
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4620',
- '%s is deprecated, call setResultCache() instead.',
- __METHOD__,
- );
-
- return new QueryCacheProfile($this->lifetime, $this->cacheKey, CacheAdapter::wrap($cache));
- }
-
- /**
- * @param string|null $cacheKey
- *
- * @return QueryCacheProfile
- */
- public function setCacheKey($cacheKey)
+ public function setCacheKey(?string $cacheKey): self
{
return new QueryCacheProfile($this->lifetime, $cacheKey, $this->resultCache);
}
- /**
- * @param int $lifetime
- *
- * @return QueryCacheProfile
- */
- public function setLifetime($lifetime)
+ public function setLifetime(int $lifetime): self
{
return new QueryCacheProfile($lifetime, $this->cacheKey, $this->resultCache);
}
diff --git a/doctrine/dbal/src/ColumnCase.php b/doctrine/dbal/src/ColumnCase.php
index cb0dd409b..687a04f80 100644
--- a/doctrine/dbal/src/ColumnCase.php
+++ b/doctrine/dbal/src/ColumnCase.php
@@ -1,28 +1,21 @@
sqlLogger = $logger;
- }
-
- /**
- * Gets the SQL logger that is used.
- *
- * @deprecated
- */
- public function getSQLLogger(): ?SQLLogger
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4967',
- '%s is deprecated.',
- __METHOD__,
- );
-
- return $this->sqlLogger;
- }
-
/**
* Gets the cache driver implementation that is used for query result caching.
*/
@@ -115,78 +51,26 @@ public function getResultCache(): ?CacheItemPoolInterface
return $this->resultCache;
}
- /**
- * Gets the cache driver implementation that is used for query result caching.
- *
- * @deprecated Use {@see getResultCache()} instead.
- */
- public function getResultCacheImpl(): ?Cache
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4620',
- '%s is deprecated, call getResultCache() instead.',
- __METHOD__,
- );
-
- return $this->resultCacheImpl;
- }
-
/**
* Sets the cache driver implementation that is used for query result caching.
*/
public function setResultCache(CacheItemPoolInterface $cache): void
{
- $this->resultCacheImpl = DoctrineProvider::wrap($cache);
- $this->resultCache = $cache;
- }
-
- /**
- * Sets the cache driver implementation that is used for query result caching.
- *
- * @deprecated Use {@see setResultCache()} instead.
- */
- public function setResultCacheImpl(Cache $cacheImpl): void
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4620',
- '%s is deprecated, call setResultCache() instead.',
- __METHOD__,
- );
-
- $this->resultCacheImpl = $cacheImpl;
- $this->resultCache = CacheAdapter::wrap($cacheImpl);
+ $this->resultCache = $cache;
}
/**
* Sets the callable to use to filter schema assets.
*/
- public function setSchemaAssetsFilter(?callable $callable = null): void
+ public function setSchemaAssetsFilter(callable $schemaAssetsFilter): void
{
- if (func_num_args() < 1) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5483',
- 'Not passing an argument to %s is deprecated.',
- __METHOD__,
- );
- } elseif ($callable === null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5483',
- 'Using NULL as a schema asset filter is deprecated.'
- . ' Use a callable that always returns true instead.',
- );
- }
-
- $this->schemaAssetsFilter = $callable;
+ $this->schemaAssetsFilter = $schemaAssetsFilter;
}
/**
* Returns the callable to use to filter schema assets.
*/
- public function getSchemaAssetsFilter(): ?callable
+ public function getSchemaAssetsFilter(): callable
{
return $this->schemaAssetsFilter;
}
@@ -198,7 +82,7 @@ public function getSchemaAssetsFilter(): ?callable
* transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either
* the method commit or the method rollback. By default, new connections are in auto-commit mode.
*
- * @see getAutoCommit
+ * @see getAutoCommit
*
* @param bool $autoCommit True to enable auto-commit mode; false to disable it
*/
@@ -250,15 +134,22 @@ public function setSchemaManagerFactory(SchemaManagerFactory $schemaManagerFacto
return $this;
}
+ /** @return true */
public function getDisableTypeComments(): bool
{
- return $this->disableTypeComments;
+ return true;
}
- /** @return $this */
+ /**
+ * @param true $disableTypeComments
+ *
+ * @return $this
+ */
public function setDisableTypeComments(bool $disableTypeComments): self
{
- $this->disableTypeComments = $disableTypeComments;
+ if (! $disableTypeComments) {
+ throw new InvalidArgumentException('Column comments cannot be enabled anymore.');
+ }
return $this;
}
diff --git a/doctrine/dbal/src/Connection.php b/doctrine/dbal/src/Connection.php
index 76b427b5b..184b01b3a 100644
--- a/doctrine/dbal/src/Connection.php
+++ b/doctrine/dbal/src/Connection.php
@@ -1,109 +1,65 @@
, WrapperParameterType>|array
* @psalm-consistent-constructor
*/
-class Connection
+class Connection implements ServerVersionProvider
{
- /**
- * Represents an array of ints to be expanded by Doctrine SQL parsing.
- *
- * @deprecated Use {@see ArrayParameterType::INTEGER} instead.
- */
- public const PARAM_INT_ARRAY = ArrayParameterType::INTEGER;
-
- /**
- * Represents an array of strings to be expanded by Doctrine SQL parsing.
- *
- * @deprecated Use {@see ArrayParameterType::STRING} instead.
- */
- public const PARAM_STR_ARRAY = ArrayParameterType::STRING;
-
- /**
- * Represents an array of ascii strings to be expanded by Doctrine SQL parsing.
- *
- * @deprecated Use {@see ArrayParameterType::ASCII} instead.
- */
- public const PARAM_ASCII_STR_ARRAY = ArrayParameterType::ASCII;
-
- /**
- * Offset by which PARAM_* constants are detected as arrays of the param type.
- *
- * @internal Should be used only within the wrapper layer.
- */
- public const ARRAY_PARAM_OFFSET = 100;
-
/**
* The wrapped driver connection.
- *
- * @var DriverConnection|null
*/
- protected $_conn;
+ protected ?DriverConnection $_conn = null;
- /** @var Configuration */
- protected $_config;
-
- /**
- * @deprecated
- *
- * @var EventManager
- */
- protected $_eventManager;
-
- /**
- * @deprecated Use {@see createExpressionBuilder()} instead.
- *
- * @var ExpressionBuilder
- */
- protected $_expr;
+ protected Configuration $_config;
/**
* The current auto-commit mode of this connection.
@@ -117,15 +73,8 @@ class Connection
/**
* The currently active transaction isolation level or NULL before it has been determined.
- *
- * @var TransactionIsolationLevel::*|null
*/
- private $transactionIsolationLevel;
-
- /**
- * If nested transactions should use savepoints.
- */
- private bool $nestTransactionsWithSavepoints = false;
+ private ?TransactionIsolationLevel $transactionIsolationLevel = null;
/**
* The parameters used during creation of the Connection instance.
@@ -143,22 +92,6 @@ class Connection
private ?ExceptionConverter $exceptionConverter = null;
private ?Parser $parser = null;
- /**
- * The schema manager.
- *
- * @deprecated Use {@see createSchemaManager()} instead.
- *
- * @var AbstractSchemaManager|null
- */
- protected $_schemaManager;
-
- /**
- * The used DBAL driver.
- *
- * @var Driver
- */
- protected $_driver;
-
/**
* Flag that indicates whether the current transaction is marked for rollback only.
*/
@@ -171,66 +104,23 @@ class Connection
*
* @internal The connection can be only instantiated by the driver manager.
*
- * @param array $params The connection parameters.
- * @param Driver $driver The driver to use.
- * @param Configuration|null $config The configuration, optional.
- * @param EventManager|null $eventManager The event manager, optional.
+ * @param array $params The connection parameters.
+ * @param Driver $driver The driver to use.
+ * @param Configuration|null $config The configuration, optional.
* @psalm-param Params $params
- *
- * @throws Exception
*/
public function __construct(
#[SensitiveParameter]
array $params,
- Driver $driver,
+ protected Driver $driver,
?Configuration $config = null,
- ?EventManager $eventManager = null
) {
- $this->_driver = $driver;
- $this->params = $params;
-
- // Create default config and event manager if none given
- $config ??= new Configuration();
- $eventManager ??= new EventManager();
-
- $this->_config = $config;
- $this->_eventManager = $eventManager;
-
- if (isset($params['platform'])) {
- if (! $params['platform'] instanceof Platforms\AbstractPlatform) {
- throw Exception::invalidPlatformType($params['platform']);
- }
+ $this->_config = $config ?? new Configuration();
+ $this->params = $params;
+ $this->autoCommit = $this->_config->getAutoCommit();
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5699',
- 'The "platform" connection parameter is deprecated.'
- . ' Use a driver middleware that would instantiate the platform instead.',
- );
-
- $this->platform = $params['platform'];
- $this->platform->setEventManager($this->_eventManager);
- $this->platform->setDisableTypeComments($config->getDisableTypeComments());
- }
-
- $this->_expr = $this->createExpressionBuilder();
-
- $this->autoCommit = $config->getAutoCommit();
-
- $schemaManagerFactory = $config->getSchemaManagerFactory();
- if ($schemaManagerFactory === null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5812',
- 'Not configuring a schema manager factory is deprecated.'
- . ' Use %s which is going to be the default in DBAL 4.',
- DefaultSchemaManagerFactory::class,
- );
-
- $schemaManagerFactory = new LegacySchemaManagerFactory();
- }
-
- $this->schemaManagerFactory = $schemaManagerFactory;
+ $this->schemaManagerFactory = $this->_config->getSchemaManagerFactory()
+ ?? new DefaultSchemaManagerFactory();
}
/**
@@ -241,7 +131,7 @@ public function __construct(
* @return array
* @psalm-return Params
*/
- public function getParams()
+ public function getParams(): array
{
return $this->params;
}
@@ -255,7 +145,7 @@ public function getParams()
*
* @throws Exception
*/
- public function getDatabase()
+ public function getDatabase(): ?string
{
$platform = $this->getDatabasePlatform();
$query = $platform->getDummySelectSQL($platform->getCurrentDatabaseExpression());
@@ -268,56 +158,37 @@ public function getDatabase()
/**
* Gets the DBAL driver instance.
- *
- * @return Driver
*/
- public function getDriver()
+ public function getDriver(): Driver
{
- return $this->_driver;
+ return $this->driver;
}
/**
* Gets the Configuration used by the Connection.
- *
- * @return Configuration
*/
- public function getConfiguration()
+ public function getConfiguration(): Configuration
{
return $this->_config;
}
- /**
- * Gets the EventManager used by the Connection.
- *
- * @deprecated
- *
- * @return EventManager
- */
- public function getEventManager()
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5784',
- '%s is deprecated.',
- __METHOD__,
- );
-
- return $this->_eventManager;
- }
-
/**
* Gets the DatabasePlatform for the connection.
*
- * @return AbstractPlatform
- *
* @throws Exception
*/
- public function getDatabasePlatform()
+ public function getDatabasePlatform(): AbstractPlatform
{
if ($this->platform === null) {
- $this->platform = $this->detectDatabasePlatform();
- $this->platform->setEventManager($this->_eventManager);
- $this->platform->setDisableTypeComments($this->_config->getDisableTypeComments());
+ $versionProvider = $this;
+
+ if (isset($this->params['serverVersion'])) {
+ $versionProvider = new StaticServerVersionProvider($this->params['serverVersion']);
+ } elseif (isset($this->params['primary']['serverVersion'])) {
+ $versionProvider = new StaticServerVersionProvider($this->params['primary']['serverVersion']);
+ }
+
+ $this->platform = $this->driver->getDatabasePlatform($versionProvider);
}
return $this->platform;
@@ -332,50 +203,18 @@ public function createExpressionBuilder(): ExpressionBuilder
}
/**
- * Gets the ExpressionBuilder for the connection.
- *
- * @deprecated Use {@see createExpressionBuilder()} instead.
- *
- * @return 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;
- }
-
- /**
- * Establishes the connection with the database.
- *
- * @internal This method will be made protected in DBAL 4.0.
- *
- * @return bool TRUE if the connection was successfully established, FALSE if
- * the connection is already open.
+ * Establishes the connection with the database and returns the underlying connection.
*
* @throws Exception
- *
- * @psalm-assert !null $this->_conn
*/
- public function connect()
+ protected function connect(): DriverConnection
{
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4966',
- 'Public access to Connection::connect() is deprecated.',
- );
-
if ($this->_conn !== null) {
- return false;
+ return $this->_conn;
}
try {
- $this->_conn = $this->_driver->connect($this->params);
+ $connection = $this->_conn = $this->driver->connect($this->params);
} catch (Driver\Exception $e) {
throw $this->convertException($e);
}
@@ -384,144 +223,17 @@ public function connect()
$this->beginTransaction();
}
- if ($this->_eventManager->hasListeners(Events::postConnect)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5784',
- 'Subscribing to %s events is deprecated. Implement a middleware instead.',
- Events::postConnect,
- );
-
- $eventArgs = new Event\ConnectionEventArgs($this);
- $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);
- }
-
- return true;
+ return $connection;
}
/**
- * Detects and sets the database platform.
- *
- * Evaluates custom platform class and version in order to set the correct platform.
- *
- * @throws Exception If an invalid platform was specified for this connection.
- */
- private function detectDatabasePlatform(): AbstractPlatform
- {
- $version = $this->getDatabasePlatformVersion();
-
- if ($version !== null) {
- assert($this->_driver instanceof VersionAwarePlatformDriver);
-
- return $this->_driver->createDatabasePlatformForVersion($version);
- }
-
- return $this->_driver->getDatabasePlatform();
- }
-
- /**
- * Returns the version of the related platform if applicable.
- *
- * Returns null if either the driver is not capable to create version
- * specific platform instances, no explicit server version was specified
- * or the underlying driver connection cannot determine the platform
- * version without having to query it (performance reasons).
- *
- * @return string|null
- *
- * @throws Throwable
- */
- private function getDatabasePlatformVersion()
- {
- // Driver does not support version specific platforms.
- if (! $this->_driver instanceof VersionAwarePlatformDriver) {
- return null;
- }
-
- // Explicit platform version requested (supersedes auto-detection).
- if (isset($this->params['serverVersion'])) {
- return $this->params['serverVersion'];
- }
-
- if (isset($this->params['primary']) && isset($this->params['primary']['serverVersion'])) {
- return $this->params['primary']['serverVersion'];
- }
-
- // If not connected, we need to connect now to determine the platform version.
- if ($this->_conn === null) {
- try {
- $this->connect();
- } catch (Exception $originalException) {
- if (! isset($this->params['dbname'])) {
- throw $originalException;
- }
-
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5707',
- 'Relying on a fallback connection used to determine the database platform while connecting'
- . ' to a non-existing database is deprecated. Either use an existing database name in'
- . ' connection parameters or omit the database name if the platform'
- . ' and the server configuration allow that.',
- );
-
- // The database to connect to might not yet exist.
- // Retry detection without database name connection parameter.
- $params = $this->params;
-
- unset($this->params['dbname']);
-
- try {
- $this->connect();
- } catch (Exception $fallbackException) {
- // Either the platform does not support database-less connections
- // or something else went wrong.
- throw $originalException;
- } finally {
- $this->params = $params;
- }
-
- $serverVersion = $this->getServerVersion();
-
- // Close "temporary" connection to allow connecting to the real database again.
- $this->close();
-
- return $serverVersion;
- }
- }
-
- return $this->getServerVersion();
- }
-
- /**
- * Returns the database server version if the underlying driver supports it.
- *
- * @return string|null
+ * {@inheritDoc}
*
* @throws Exception
*/
- private function getServerVersion()
+ public function getServerVersion(): string
{
- $connection = $this->getWrappedConnection();
-
- // Automatic platform version detection.
- if ($connection instanceof ServerInfoAwareConnection) {
- try {
- return $connection->getServerVersion();
- } catch (Driver\Exception $e) {
- throw $this->convertException($e);
- }
- }
-
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4750',
- 'Not implementing the ServerInfoAwareConnection interface in %s is deprecated',
- get_class($connection),
- );
-
- // Unable to detect platform version.
- return null;
+ return $this->connect()->getServerVersion();
}
/**
@@ -531,9 +243,9 @@ private function getServerVersion()
*
* @return bool True if auto-commit mode is currently enabled for this connection, false otherwise.
*/
- public function isAutoCommit()
+ public function isAutoCommit(): bool
{
- return $this->autoCommit === true;
+ return $this->autoCommit;
}
/**
@@ -546,16 +258,13 @@ public function isAutoCommit()
* NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is
* committed. If this method is called and the auto-commit mode is not changed, the call is a no-op.
*
- * @see isAutoCommit
+ * @see isAutoCommit
*
- * @param bool $autoCommit True to enable auto-commit mode; false to disable it.
- *
- * @return void
+ * @throws ConnectionException
+ * @throws DriverException
*/
- public function setAutoCommit($autoCommit)
+ public function setAutoCommit(bool $autoCommit): void
{
- $autoCommit = (bool) $autoCommit;
-
// Mode not changed, no-op.
if ($autoCommit === $this->autoCommit) {
return;
@@ -575,15 +284,14 @@ public function setAutoCommit($autoCommit)
* Prepares and executes an SQL query and returns the first row of the result
* as an associative array.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return array|false False is returned if no rows are found.
*
* @throws Exception
*/
- public function fetchAssociative(string $query, array $params = [], array $types = [])
+ public function fetchAssociative(string $query, array $params = [], array $types = []): array|false
{
return $this->executeQuery($query, $params, $types)->fetchAssociative();
}
@@ -592,15 +300,14 @@ public function fetchAssociative(string $query, array $params = [], array $types
* Prepares and executes an SQL query and returns the first row of the result
* as a numerically indexed array.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return list|false False is returned if no rows are found.
*
* @throws Exception
*/
- public function fetchNumeric(string $query, array $params = [], array $types = [])
+ public function fetchNumeric(string $query, array $params = [], array $types = []): array|false
{
return $this->executeQuery($query, $params, $types)->fetchNumeric();
}
@@ -609,25 +316,22 @@ public function fetchNumeric(string $query, array $params = [], array $types = [
* Prepares and executes an SQL query and returns the value of a single column
* of the first row of the result.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return mixed|false False is returned if no rows are found.
*
* @throws Exception
*/
- public function fetchOne(string $query, array $params = [], array $types = [])
+ public function fetchOne(string $query, array $params = [], array $types = []): mixed
{
return $this->executeQuery($query, $params, $types)->fetchOne();
}
/**
* Whether an actual connection to the database is established.
- *
- * @return bool
*/
- public function isConnected()
+ public function isConnected(): bool
{
return $this->_conn !== null;
}
@@ -637,7 +341,7 @@ public function isConnected()
*
* @return bool TRUE if a transaction is currently active, FALSE otherwise.
*/
- public function isTransactionActive()
+ public function isTransactionActive(): bool
{
return $this->transactionNestingLevel > 0;
}
@@ -645,24 +349,17 @@ public function isTransactionActive()
/**
* Adds condition based on the criteria to the query components
*
- * @param array $criteria Map of key columns to their values
- * @param string[] $columns Column names
- * @param mixed[] $values Column values
- * @param string[] $conditions Key conditions
+ * @param array $criteria Map of key columns to their values
*
- * @throws Exception
+ * @return array{list, list, list}
*/
- private function addCriteriaCondition(
- array $criteria,
- array &$columns,
- array &$values,
- array &$conditions
- ): void {
- $platform = $this->getDatabasePlatform();
+ private function getCriteriaCondition(array $criteria): array
+ {
+ $columns = $values = $conditions = [];
foreach ($criteria as $columnName => $value) {
if ($value === null) {
- $conditions[] = $platform->getIsNullExpression($columnName);
+ $conditions[] = $columnName . ' IS NULL';
continue;
}
@@ -670,6 +367,8 @@ private function addCriteriaCondition(
$values[] = $value;
$conditions[] = $columnName . ' = ?';
}
+
+ return [$columns, $values, $conditions];
}
/**
@@ -677,26 +376,25 @@ private function addCriteriaCondition(
*
* Table expression and columns are not escaped and are not safe for user-input.
*
- * @param string $table Table name
- * @param array $criteria Deletion criteria
- * @param array|array $types Parameter types
+ * @param array $criteria
+ * @param array, string|ParameterType|Type>|array $types
*
- * @return int|string The number of affected rows.
+ * @return int|numeric-string The number of affected rows.
*
* @throws Exception
*/
- public function delete($table, array $criteria, array $types = [])
+ public function delete(string $table, array $criteria = [], array $types = []): int|string
{
- if (count($criteria) === 0) {
- throw InvalidArgumentException::fromEmptyCriteria();
- }
+ [$columns, $values, $conditions] = $this->getCriteriaCondition($criteria);
- $columns = $values = $conditions = [];
+ $sql = 'DELETE FROM ' . $table;
- $this->addCriteriaCondition($criteria, $columns, $values, $conditions);
+ if ($conditions !== []) {
+ $sql .= ' WHERE ' . implode(' AND ', $conditions);
+ }
return $this->executeStatement(
- 'DELETE FROM ' . $table . ' WHERE ' . implode(' AND ', $conditions),
+ $sql,
$values,
is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types,
);
@@ -704,10 +402,8 @@ public function delete($table, array $criteria, array $types = [])
/**
* Closes the connection.
- *
- * @return void
*/
- public function close()
+ public function close(): void
{
$this->_conn = null;
$this->transactionNestingLevel = 0;
@@ -716,27 +412,25 @@ public function close()
/**
* Sets the transaction isolation level.
*
- * @param TransactionIsolationLevel::* $level The level to set.
- *
- * @return int|string
+ * @param TransactionIsolationLevel $level The level to set.
*
* @throws Exception
*/
- public function setTransactionIsolation($level)
+ public function setTransactionIsolation(TransactionIsolationLevel $level): void
{
$this->transactionIsolationLevel = $level;
- return $this->executeStatement($this->getDatabasePlatform()->getSetTransactionIsolationSQL($level));
+ $this->executeStatement($this->getDatabasePlatform()->getSetTransactionIsolationSQL($level));
}
/**
* Gets the currently active transaction isolation level.
*
- * @return TransactionIsolationLevel::* The current transaction isolation level.
+ * @return TransactionIsolationLevel The current transaction isolation level.
*
* @throws Exception
*/
- public function getTransactionIsolation()
+ public function getTransactionIsolation(): TransactionIsolationLevel
{
return $this->transactionIsolationLevel ??= $this->getDatabasePlatform()->getDefaultTransactionIsolationLevel();
}
@@ -746,16 +440,15 @@ public function getTransactionIsolation()
*
* Table expression and columns are not escaped and are not safe for user-input.
*
- * @param string $table Table name
- * @param array $data Column-value pairs
- * @param array $criteria Update criteria
- * @param array|array $types Parameter types
+ * @param array $data
+ * @param array $criteria
+ * @param array, string|ParameterType|Type>|array $types
*
- * @return int|string The number of affected rows.
+ * @return int|numeric-string The number of affected rows.
*
* @throws Exception
*/
- public function update($table, array $data, array $criteria, array $types = [])
+ public function update(string $table, array $data, array $criteria = [], array $types = []): int|string
{
$columns = $values = $conditions = $set = [];
@@ -765,14 +458,21 @@ public function update($table, array $data, array $criteria, array $types = [])
$set[] = $columnName . ' = ?';
}
- $this->addCriteriaCondition($criteria, $columns, $values, $conditions);
+ [$criteriaColumns, $criteriaValues, $criteriaConditions] = $this->getCriteriaCondition($criteria);
+
+ $columns = array_merge($columns, $criteriaColumns);
+ $values = array_merge($values, $criteriaValues);
+ $conditions = array_merge($conditions, $criteriaConditions);
if (is_string(key($types))) {
$types = $this->extractTypeValues($columns, $types);
}
- $sql = 'UPDATE ' . $table . ' SET ' . implode(', ', $set)
- . ' WHERE ' . implode(' AND ', $conditions);
+ $sql = 'UPDATE ' . $table . ' SET ' . implode(', ', $set);
+
+ if ($conditions !== []) {
+ $sql .= ' WHERE ' . implode(' AND ', $conditions);
+ }
return $this->executeStatement($sql, $values, $types);
}
@@ -782,15 +482,14 @@ public function update($table, array $data, array $criteria, array $types = [])
*
* Table expression and columns are not escaped and are not safe for user-input.
*
- * @param string $table Table name
- * @param array $data Column-value pairs
- * @param array|array $types Parameter types
+ * @param array $data
+ * @param array, string|ParameterType|Type>|array $types
*
- * @return int|string The number of affected rows.
+ * @return int|numeric-string The number of affected rows.
*
* @throws Exception
*/
- public function insert($table, array $data, array $types = [])
+ public function insert(string $table, array $data, array $types = []): int|string
{
if (count($data) === 0) {
return $this->executeStatement('INSERT INTO ' . $table . ' () VALUES ()');
@@ -817,16 +516,16 @@ public function insert($table, array $data, array $types = [])
/**
* Extract ordered type list from an ordered column list and type map.
*
- * @param array $columnList
- * @param array|array $types
+ * @param array $columns
+ * @param array|array $types
*
- * @return array|array
+ * @return array, string|ParameterType|Type>
*/
- private function extractTypeValues(array $columnList, array $types): array
+ private function extractTypeValues(array $columns, array $types): array
{
$typeValues = [];
- foreach ($columnList as $columnName) {
+ foreach ($columns as $columnName) {
$typeValues[] = $types[$columnName] ?? ParameterType::STRING;
}
@@ -843,39 +542,29 @@ private function extractTypeValues(array $columnList, array $types): array
* you SHOULD use them. In general, they end up causing way more
* problems than they solve.
*
- * @param string $str The name to be quoted.
+ * @param string $identifier The identifier to be quoted.
*
- * @return string The quoted name.
+ * @return string The quoted identifier.
*/
- public function quoteIdentifier($str)
+ public function quoteIdentifier(string $identifier): string
{
- return $this->getDatabasePlatform()->quoteIdentifier($str);
+ return $this->getDatabasePlatform()->quoteIdentifier($identifier);
}
/**
* The usage of this method is discouraged. Use prepared statements
* or {@see AbstractPlatform::quoteStringLiteral()} instead.
- *
- * @param mixed $value
- * @param int|string|Type|null $type
- *
- * @return mixed
*/
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- $connection = $this->getWrappedConnection();
-
- [$value, $bindingType] = $this->getBindingInfo($value, $type);
-
- return $connection->quote($value, $bindingType);
+ return $this->connect()->quote($value);
}
/**
* Prepares and executes an SQL query and returns the result as an array of numeric arrays.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return list>
*
@@ -889,9 +578,8 @@ public function fetchAllNumeric(string $query, array $params = [], array $types
/**
* Prepares and executes an SQL query and returns the result as an array of associative arrays.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return list>
*
@@ -906,9 +594,8 @@ public function fetchAllAssociative(string $query, array $params = [], array $ty
* Prepares and executes an SQL query and returns the result as an associative array with the keys
* mapped to the first column and the values mapped to the second column.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return array
*
@@ -924,9 +611,8 @@ public function fetchAllKeyValue(string $query, array $params = [], array $types
* to the first column and the values being an associative array representing the rest of the columns
* and their values.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return array>
*
@@ -940,9 +626,8 @@ public function fetchAllAssociativeIndexed(string $query, array $params = [], ar
/**
* Prepares and executes an SQL query and returns the result as an array of the first column values.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return list
*
@@ -956,9 +641,8 @@ public function fetchFirstColumn(string $query, array $params = [], array $types
/**
* Prepares and executes an SQL query and returns the result as an iterator over rows represented as numeric arrays.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return Traversable>
*
@@ -973,9 +657,8 @@ public function iterateNumeric(string $query, array $params = [], array $types =
* Prepares and executes an SQL query and returns the result as an iterator over rows represented
* as associative arrays.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return Traversable>
*
@@ -990,9 +673,8 @@ public function iterateAssociative(string $query, array $params = [], array $typ
* Prepares and executes an SQL query and returns the result as an iterator with the keys
* mapped to the first column and the values mapped to the second column.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return Traversable
*
@@ -1008,9 +690,8 @@ public function iterateKeyValue(string $query, array $params = [], array $types
* to the first column and the values being an associative array representing the rest of the columns
* and their values.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return Traversable>
*
@@ -1024,9 +705,8 @@ public function iterateAssociativeIndexed(string $query, array $params = [], arr
/**
* Prepares and executes an SQL query and returns the result as an iterator over the first column values.
*
- * @param string $query SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @return Traversable
*
@@ -1046,7 +726,7 @@ public function iterateColumn(string $query, array $params = [], array $types =
*/
public function prepare(string $sql): Statement
{
- $connection = $this->getWrappedConnection();
+ $connection = $this->connect();
try {
$statement = $connection->prepare($sql);
@@ -1061,36 +741,27 @@ public function prepare(string $sql): Statement
* Executes an, optionally parameterized, SQL query.
*
* If the query is parametrized, a prepared statement is used.
- * If an SQLLogger is configured, the execution is logged.
*
- * @param string $sql SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @throws Exception
*/
public function executeQuery(
string $sql,
array $params = [],
- $types = [],
- ?QueryCacheProfile $qcp = null
+ array $types = [],
+ ?QueryCacheProfile $qcp = null,
): Result {
if ($qcp !== null) {
return $this->executeCacheQuery($sql, $params, $types, $qcp);
}
- $connection = $this->getWrappedConnection();
-
- $logger = $this->_config->getSQLLogger();
- if ($logger !== null) {
- $logger->startQuery($sql, $params, $types);
- }
+ $connection = $this->connect();
try {
if (count($params) > 0) {
- if ($this->needsArrayParameterConversion($params, $types)) {
- [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types);
- }
+ [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types);
$stmt = $connection->prepare($sql);
@@ -1104,33 +775,28 @@ public function executeQuery(
return new Result($result, $this);
} catch (Driver\Exception $e) {
throw $this->convertExceptionDuringQuery($e, $sql, $params, $types);
- } finally {
- if ($logger !== null) {
- $logger->stopQuery();
- }
}
}
/**
* Executes a caching query.
*
- * @param string $sql SQL query
- * @param list|array $params Query parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
* @throws CacheException
* @throws Exception
*/
- public function executeCacheQuery($sql, $params, $types, QueryCacheProfile $qcp): Result
+ public function executeCacheQuery(string $sql, array $params, array $types, QueryCacheProfile $qcp): Result
{
$resultCache = $qcp->getResultCache() ?? $this->_config->getResultCache();
if ($resultCache === null) {
- throw CacheException::noResultDriverConfigured();
+ throw NoResultDriverConfigured::new();
}
$connectionParams = $this->params;
- unset($connectionParams['platform'], $connectionParams['password'], $connectionParams['url']);
+ unset($connectionParams['password']);
[$cacheKey, $realKey] = $qcp->generateCacheKeys($sql, $params, $types, $connectionParams);
@@ -1177,28 +843,20 @@ public function executeCacheQuery($sql, $params, $types, QueryCacheProfile $qcp)
*
* This method supports PDO binding types as well as DBAL mapping types.
*
- * @param string $sql SQL statement
- * @param list|array $params Statement parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
- * @return int|string The number of affected rows.
+ * @return int|numeric-string
*
* @throws Exception
*/
- public function executeStatement($sql, array $params = [], array $types = [])
+ public function executeStatement(string $sql, array $params = [], array $types = []): int|string
{
- $connection = $this->getWrappedConnection();
-
- $logger = $this->_config->getSQLLogger();
- if ($logger !== null) {
- $logger->startQuery($sql, $params, $types);
- }
+ $connection = $this->connect();
try {
if (count($params) > 0) {
- if ($this->needsArrayParameterConversion($params, $types)) {
- [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types);
- }
+ [$sql, $params, $types] = $this->expandArrayParameters($sql, $params, $types);
$stmt = $connection->prepare($sql);
@@ -1211,10 +869,6 @@ public function executeStatement($sql, array $params = [], array $types = [])
return $connection->exec($sql);
} catch (Driver\Exception $e) {
throw $this->convertExceptionDuringQuery($e, $sql, $params, $types);
- } finally {
- if ($logger !== null) {
- $logger->stopQuery();
- }
}
}
@@ -1223,37 +877,22 @@ public function executeStatement($sql, array $params = [], array $types = [])
*
* @return int The nesting level. A value of 0 means there's no active transaction.
*/
- public function getTransactionNestingLevel()
+ public function getTransactionNestingLevel(): int
{
return $this->transactionNestingLevel;
}
/**
- * Returns the ID of the last inserted row, or the last value from a sequence object,
- * depending on the underlying driver.
- *
- * Note: This method may not return a meaningful or consistent result across different drivers,
- * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY
- * columns or sequences.
+ * Returns the ID of the last inserted row.
*
- * @param string|null $name Name of the sequence object from which the ID should be returned.
- *
- * @return string|int|false A string representation of the last inserted ID.
+ * If the underlying driver does not support identity columns, an exception is thrown.
*
* @throws Exception
*/
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
- if ($name !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
- }
-
try {
- return $this->getWrappedConnection()->lastInsertId($name);
+ return $this->connect()->lastInsertId();
} catch (Driver\Exception $e) {
throw $this->convertException($e);
}
@@ -1275,7 +914,7 @@ public function lastInsertId($name = null)
*
* @template T
*/
- public function transactional(Closure $func)
+ public function transactional(Closure $func): mixed
{
$this->beginTransaction();
try {
@@ -1293,186 +932,96 @@ public function transactional(Closure $func)
/**
* Sets if nested transactions should use savepoints.
*
- * @param bool $nestTransactionsWithSavepoints
- *
- * @return void
+ * @deprecated No replacement planned
*
* @throws Exception
*/
- public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints)
+ public function setNestTransactionsWithSavepoints(bool $nestTransactionsWithSavepoints): void
{
if (! $nestTransactionsWithSavepoints) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5383',
- <<<'DEPRECATION'
- Nesting transactions without enabling savepoints is deprecated.
- Call %s::setNestTransactionsWithSavepoints(true) to enable savepoints.
- DEPRECATION,
- self::class,
- );
- }
-
- if ($this->transactionNestingLevel > 0) {
- throw ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction();
- }
-
- if (! $this->getDatabasePlatform()->supportsSavepoints()) {
- throw ConnectionException::savepointsNotSupported();
+ throw new InvalidArgumentException(sprintf(
+ 'Calling %s with false to enable nesting transactions without savepoints is no longer supported.',
+ __METHOD__,
+ ));
}
- $this->nestTransactionsWithSavepoints = (bool) $nestTransactionsWithSavepoints;
+ Deprecation::trigger(
+ 'doctrine/dbal',
+ 'https://github.com/doctrine/dbal/pull/5383',
+ '%s is deprecated and will be removed in 5.0',
+ __METHOD__,
+ );
}
/**
* Gets if nested transactions should use savepoints.
*
- * @return bool
+ * @deprecated No replacement planned
*/
- public function getNestTransactionsWithSavepoints()
+ public function getNestTransactionsWithSavepoints(): bool
{
- return $this->nestTransactionsWithSavepoints;
+ Deprecation::trigger(
+ 'doctrine/dbal',
+ 'https://github.com/doctrine/dbal/pull/5383',
+ '%s is deprecated and will be removed in 5.0',
+ __METHOD__,
+ );
+
+ return true;
}
/**
* Returns the savepoint name to use for nested transactions.
- *
- * @return string
*/
- protected function _getNestedTransactionSavePointName()
+ protected function _getNestedTransactionSavePointName(): string
{
return 'DOCTRINE_' . $this->transactionNestingLevel;
}
- /**
- * @return bool
- *
- * @throws Exception
- */
- public function beginTransaction()
+ /** @throws Exception */
+ public function beginTransaction(): void
{
- $connection = $this->getWrappedConnection();
+ $connection = $this->connect();
++$this->transactionNestingLevel;
- $logger = $this->_config->getSQLLogger();
-
if ($this->transactionNestingLevel === 1) {
- if ($logger !== null) {
- $logger->startQuery('"START TRANSACTION"');
- }
-
$connection->beginTransaction();
-
- if ($logger !== null) {
- $logger->stopQuery();
- }
- } elseif ($this->nestTransactionsWithSavepoints) {
- if ($logger !== null) {
- $logger->startQuery('"SAVEPOINT"');
- }
-
- $this->createSavepoint($this->_getNestedTransactionSavePointName());
- if ($logger !== null) {
- $logger->stopQuery();
- }
} else {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5383',
- <<<'DEPRECATION'
- Nesting transactions without enabling savepoints is deprecated.
- Call %s::setNestTransactionsWithSavepoints(true) to enable savepoints.
- DEPRECATION,
- self::class,
- );
- }
-
- $eventManager = $this->getEventManager();
-
- if ($eventManager->hasListeners(Events::onTransactionBegin)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5784',
- 'Subscribing to %s events is deprecated.',
- Events::onTransactionBegin,
- );
-
- $eventManager->dispatchEvent(Events::onTransactionBegin, new TransactionBeginEventArgs($this));
+ $this->createSavepoint($this->_getNestedTransactionSavePointName());
}
-
- return true;
}
- /**
- * @return bool
- *
- * @throws Exception
- */
- public function commit()
+ /** @throws Exception */
+ public function commit(): void
{
if ($this->transactionNestingLevel === 0) {
- throw ConnectionException::noActiveTransaction();
+ throw NoActiveTransaction::new();
}
if ($this->isRollbackOnly) {
- throw ConnectionException::commitFailedRollbackOnly();
+ throw CommitFailedRollbackOnly::new();
}
- $result = true;
-
- $connection = $this->getWrappedConnection();
+ $connection = $this->connect();
if ($this->transactionNestingLevel === 1) {
- $result = $this->doCommit($connection);
- } elseif ($this->nestTransactionsWithSavepoints) {
+ try {
+ $connection->commit();
+ } catch (Driver\Exception $e) {
+ throw $this->convertException($e);
+ }
+ } else {
$this->releaseSavepoint($this->_getNestedTransactionSavePointName());
}
--$this->transactionNestingLevel;
- $eventManager = $this->getEventManager();
-
- if ($eventManager->hasListeners(Events::onTransactionCommit)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5784',
- 'Subscribing to %s events is deprecated.',
- Events::onTransactionCommit,
- );
-
- $eventManager->dispatchEvent(Events::onTransactionCommit, new TransactionCommitEventArgs($this));
- }
-
if ($this->autoCommit !== false || $this->transactionNestingLevel !== 0) {
- return $result;
+ return;
}
$this->beginTransaction();
-
- return $result;
- }
-
- /**
- * @return bool
- *
- * @throws DriverException
- */
- private function doCommit(DriverConnection $connection)
- {
- $logger = $this->_config->getSQLLogger();
-
- if ($logger !== null) {
- $logger->startQuery('"COMMIT"');
- }
-
- $result = $connection->commit();
-
- if ($logger !== null) {
- $logger->stopQuery();
- }
-
- return $result;
}
/**
@@ -1495,67 +1044,33 @@ private function commitAll(): void
}
}
- /**
- * Cancels any database changes done during the current transaction.
- *
- * @return bool
- *
- * @throws Exception
- */
- public function rollBack()
+ /** @throws Exception */
+ public function rollBack(): void
{
if ($this->transactionNestingLevel === 0) {
- throw ConnectionException::noActiveTransaction();
+ throw NoActiveTransaction::new();
}
- $connection = $this->getWrappedConnection();
-
- $logger = $this->_config->getSQLLogger();
+ $connection = $this->connect();
if ($this->transactionNestingLevel === 1) {
- if ($logger !== null) {
- $logger->startQuery('"ROLLBACK"');
- }
-
$this->transactionNestingLevel = 0;
- $connection->rollBack();
- $this->isRollbackOnly = false;
- if ($logger !== null) {
- $logger->stopQuery();
- }
- if ($this->autoCommit === false) {
- $this->beginTransaction();
- }
- } elseif ($this->nestTransactionsWithSavepoints) {
- if ($logger !== null) {
- $logger->startQuery('"ROLLBACK TO SAVEPOINT"');
- }
+ try {
+ $connection->rollBack();
+ } catch (Driver\Exception $e) {
+ throw $this->convertException($e);
+ } finally {
+ $this->isRollbackOnly = false;
- $this->rollbackSavepoint($this->_getNestedTransactionSavePointName());
- --$this->transactionNestingLevel;
- if ($logger !== null) {
- $logger->stopQuery();
+ if ($this->autoCommit === false) {
+ $this->beginTransaction();
+ }
}
} else {
- $this->isRollbackOnly = true;
+ $this->rollbackSavepoint($this->_getNestedTransactionSavePointName());
--$this->transactionNestingLevel;
}
-
- $eventManager = $this->getEventManager();
-
- if ($eventManager->hasListeners(Events::onTransactionRollBack)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5784',
- 'Subscribing to %s events is deprecated.',
- Events::onTransactionRollBack,
- );
-
- $eventManager->dispatchEvent(Events::onTransactionRollBack, new TransactionRollBackEventArgs($this));
- }
-
- return true;
}
/**
@@ -1563,16 +1078,14 @@ public function rollBack()
*
* @param string $savepoint The name of the savepoint to create.
*
- * @return void
- *
* @throws Exception
*/
- public function createSavepoint($savepoint)
+ public function createSavepoint(string $savepoint): void
{
$platform = $this->getDatabasePlatform();
if (! $platform->supportsSavepoints()) {
- throw ConnectionException::savepointsNotSupported();
+ throw SavepointsNotSupported::new();
}
$this->executeStatement($platform->createSavePoint($savepoint));
@@ -1583,39 +1096,21 @@ public function createSavepoint($savepoint)
*
* @param string $savepoint The name of the savepoint to release.
*
- * @return void
- *
* @throws Exception
*/
- public function releaseSavepoint($savepoint)
+ public function releaseSavepoint(string $savepoint): void
{
- $logger = $this->_config->getSQLLogger();
-
$platform = $this->getDatabasePlatform();
if (! $platform->supportsSavepoints()) {
- throw ConnectionException::savepointsNotSupported();
+ throw SavepointsNotSupported::new();
}
if (! $platform->supportsReleaseSavepoints()) {
- if ($logger !== null) {
- $logger->stopQuery();
- }
-
return;
}
- if ($logger !== null) {
- $logger->startQuery('"RELEASE SAVEPOINT"');
- }
-
$this->executeStatement($platform->releaseSavePoint($savepoint));
-
- if ($logger === null) {
- return;
- }
-
- $logger->stopQuery();
}
/**
@@ -1623,57 +1118,29 @@ public function releaseSavepoint($savepoint)
*
* @param string $savepoint The name of the savepoint to rollback to.
*
- * @return void
- *
* @throws Exception
*/
- public function rollbackSavepoint($savepoint)
+ public function rollbackSavepoint(string $savepoint): void
{
$platform = $this->getDatabasePlatform();
if (! $platform->supportsSavepoints()) {
- throw ConnectionException::savepointsNotSupported();
+ throw SavepointsNotSupported::new();
}
$this->executeStatement($platform->rollbackSavePoint($savepoint));
}
/**
- * Gets the wrapped driver connection.
- *
- * @deprecated Use {@link getNativeConnection()} to access the native connection.
+ * Provides access to the native database connection.
*
- * @return DriverConnection
+ * @return resource|object
*
* @throws Exception
*/
- public function getWrappedConnection()
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4966',
- 'Connection::getWrappedConnection() is deprecated.'
- . ' Use Connection::getNativeConnection() to access the native connection.',
- );
-
- $this->connect();
-
- return $this->_conn;
- }
-
- /** @return resource|object */
public function getNativeConnection()
{
- $this->connect();
-
- if (! method_exists($this->_conn, 'getNativeConnection')) {
- throw new LogicException(sprintf(
- 'The driver connection %s does not support accessing the native connection.',
- get_class($this->_conn),
- ));
- }
-
- return $this->_conn->getNativeConnection();
+ return $this->connect()->getNativeConnection();
}
/**
@@ -1687,39 +1154,16 @@ public function createSchemaManager(): AbstractSchemaManager
return $this->schemaManagerFactory->createSchemaManager($this);
}
- /**
- * Gets the SchemaManager that can be used to inspect or change the
- * database schema through the connection.
- *
- * @deprecated Use {@see createSchemaManager()} instead.
- *
- * @return AbstractSchemaManager
- *
- * @throws Exception
- */
- public function getSchemaManager()
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4515',
- 'Connection::getSchemaManager() is deprecated, use Connection::createSchemaManager() instead.',
- );
-
- return $this->_schemaManager ??= $this->createSchemaManager();
- }
-
/**
* Marks the current transaction so that the only possible
* outcome for the transaction to be rolled back.
*
- * @return void
- *
* @throws ConnectionException If no transaction is active.
*/
- public function setRollbackOnly()
+ public function setRollbackOnly(): void
{
if ($this->transactionNestingLevel === 0) {
- throw ConnectionException::noActiveTransaction();
+ throw NoActiveTransaction::new();
}
$this->isRollbackOnly = true;
@@ -1728,14 +1172,12 @@ public function setRollbackOnly()
/**
* Checks whether the current transaction is marked for rollback only.
*
- * @return bool
- *
* @throws ConnectionException If no transaction is active.
*/
- public function isRollbackOnly()
+ public function isRollbackOnly(): bool
{
if ($this->transactionNestingLevel === 0) {
- throw ConnectionException::noActiveTransaction();
+ throw NoActiveTransaction::new();
}
return $this->isRollbackOnly;
@@ -1752,7 +1194,7 @@ public function isRollbackOnly()
*
* @throws Exception
*/
- public function convertToDatabaseValue($value, $type)
+ public function convertToDatabaseValue(mixed $value, string $type): mixed
{
return Type::getType($type)->convertToDatabaseValue($value, $this->getDatabasePlatform());
}
@@ -1768,7 +1210,7 @@ public function convertToDatabaseValue($value, $type)
*
* @throws Exception
*/
- public function convertToPHPValue($value, $type)
+ public function convertToPHPValue(mixed $value, string $type): mixed
{
return Type::getType($type)->convertToPHPValue($value, $this->getDatabasePlatform());
}
@@ -1777,9 +1219,8 @@ public function convertToPHPValue($value, $type)
* Binds a set of parameters, some or all of which are typed with a PDO binding type
* or DBAL mapping type, to a given statement.
*
- * @param DriverStatement $stmt Prepared statement
- * @param list|array $params Statement parameters
- * @param array|array $types Parameter types
+ * @param list|array $params
+ * @param array|array $types
*
* @throws Exception
*/
@@ -1790,19 +1231,10 @@ private function bindParameters(DriverStatement $stmt, array $params, array $typ
$bindIndex = 1;
foreach ($params as $key => $value) {
- if (isset($types[$key])) {
+ if (array_key_exists($key, $types)) {
$type = $types[$key];
[$value, $bindingType] = $this->getBindingInfo($value, $type);
} else {
- if (array_key_exists($key, $types)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5550',
- 'Using NULL as prepared statement parameter type is deprecated.'
- . 'Omit or use ParameterType::STRING instead',
- );
- }
-
$bindingType = ParameterType::STRING;
}
@@ -1813,19 +1245,10 @@ private function bindParameters(DriverStatement $stmt, array $params, array $typ
} else {
// Named parameters
foreach ($params as $name => $value) {
- if (isset($types[$name])) {
+ if (array_key_exists($name, $types)) {
$type = $types[$name];
[$value, $bindingType] = $this->getBindingInfo($value, $type);
} else {
- if (array_key_exists($name, $types)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5550',
- 'Using NULL as prepared statement parameter type is deprecated.'
- . 'Omit or use ParameterType::STRING instead',
- );
- }
-
$bindingType = ParameterType::STRING;
}
@@ -1837,14 +1260,14 @@ private function bindParameters(DriverStatement $stmt, array $params, array $typ
/**
* Gets the binding type of a given type.
*
- * @param mixed $value The value to bind.
- * @param int|string|Type|null $type The type to bind (PDO or DBAL).
+ * @param mixed $value The value to bind.
+ * @param string|ParameterType|Type $type The type to bind.
*
- * @return array{mixed, int} [0] => the (escaped) value, [1] => the binding type.
+ * @return array{mixed, ParameterType} [0] => the (escaped) value, [1] => the binding type.
*
* @throws Exception
*/
- private function getBindingInfo($value, $type): array
+ private function getBindingInfo(mixed $value, string|ParameterType|Type $type): array
{
if (is_string($type)) {
$type = Type::getType($type);
@@ -1854,7 +1277,7 @@ private function getBindingInfo($value, $type): array
$value = $type->convertToDatabaseValue($value, $this->getDatabasePlatform());
$bindingType = $type->getBindingType();
} else {
- $bindingType = $type ?? ParameterType::STRING;
+ $bindingType = $type;
}
return [$value, $bindingType];
@@ -1862,10 +1285,8 @@ private function getBindingInfo($value, $type): array
/**
* Creates a new instance of a SQL query builder.
- *
- * @return QueryBuilder
*/
- public function createQueryBuilder()
+ public function createQueryBuilder(): QueryBuilder
{
return new Query\QueryBuilder($this);
}
@@ -1873,14 +1294,14 @@ public function createQueryBuilder()
/**
* @internal
*
- * @param list|array $params
- * @param array|array $types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*/
final public function convertExceptionDuringQuery(
Driver\Exception $e,
string $sql,
array $params = [],
- array $types = []
+ array $types = [],
): DriverException {
return $this->handleDriverException($e, new Query($sql, $params, $types));
}
@@ -1892,13 +1313,37 @@ final public function convertException(Driver\Exception $e): DriverException
}
/**
- * @param array|array $params
- * @param array|array $types
+ * @param list|array $params
+ * @psalm-param WrapperParameterTypeArray $types
*
- * @return array{string, list, array}
+ * @return array{
+ * string,
+ * list|array,
+ * array, string|ParameterType|Type>|array
+ * }
*/
private function expandArrayParameters(string $sql, array $params, array $types): array
{
+ $needsConversion = false;
+ $nonArrayTypes = [];
+
+ if (is_string(key($params))) {
+ $needsConversion = true;
+ } else {
+ foreach ($types as $key => $type) {
+ if ($type instanceof ArrayParameterType) {
+ $needsConversion = true;
+ break;
+ }
+
+ $nonArrayTypes[$key] = $type;
+ }
+ }
+
+ if (! $needsConversion) {
+ return [$sql, $params, $nonArrayTypes];
+ }
+
$this->parser ??= $this->getDatabasePlatform()->createSQLParser();
$visitor = new ExpandArrayParameters($params, $types);
@@ -1911,35 +1356,11 @@ private function expandArrayParameters(string $sql, array $params, array $types)
];
}
- /**
- * @param array|array $params
- * @param array|array $types
- */
- private function needsArrayParameterConversion(array $params, array $types): bool
- {
- if (is_string(key($params))) {
- return true;
- }
-
- foreach ($types as $type) {
- if (
- $type === ArrayParameterType::INTEGER
- || $type === ArrayParameterType::STRING
- || $type === ArrayParameterType::ASCII
- || $type === ArrayParameterType::BINARY
- ) {
- return true;
- }
- }
-
- return false;
- }
-
private function handleDriverException(
Driver\Exception $driverException,
- ?Query $query
+ ?Query $query,
): DriverException {
- $this->exceptionConverter ??= $this->_driver->getExceptionConverter();
+ $this->exceptionConverter ??= $this->driver->getExceptionConverter();
$exception = $this->exceptionConverter->convert($driverException, $query);
if ($exception instanceof ConnectionLost) {
@@ -1948,58 +1369,4 @@ private function handleDriverException(
return $exception;
}
-
- /**
- * BC layer for a wide-spread use-case of old DBAL APIs
- *
- * @deprecated Use {@see executeStatement()} instead
- *
- * @param array $params The query parameters
- * @param array $types The parameter types
- */
- public function executeUpdate(string $sql, array $params = [], array $types = []): int
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4163',
- '%s is deprecated, please use executeStatement() instead.',
- __METHOD__,
- );
-
- return $this->executeStatement($sql, $params, $types);
- }
-
- /**
- * BC layer for a wide-spread use-case of old DBAL APIs
- *
- * @deprecated Use {@see executeQuery()} instead
- */
- public function query(string $sql): Result
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4163',
- '%s is deprecated, please use executeQuery() instead.',
- __METHOD__,
- );
-
- return $this->executeQuery($sql);
- }
-
- /**
- * BC layer for a wide-spread use-case of old DBAL APIs
- *
- * @deprecated please use {@see executeStatement()} instead
- */
- public function exec(string $sql): int
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/4163',
- '%s is deprecated, please use executeStatement() instead.',
- __METHOD__,
- );
-
- return $this->executeStatement($sql);
- }
}
diff --git a/doctrine/dbal/src/Connection/StaticServerVersionProvider.php b/doctrine/dbal/src/Connection/StaticServerVersionProvider.php
new file mode 100644
index 000000000..aebe086a9
--- /dev/null
+++ b/doctrine/dbal/src/Connection/StaticServerVersionProvider.php
@@ -0,0 +1,19 @@
+version;
+ }
+}
diff --git a/doctrine/dbal/src/ConnectionException.php b/doctrine/dbal/src/ConnectionException.php
index f1e18987b..de9624831 100644
--- a/doctrine/dbal/src/ConnectionException.php
+++ b/doctrine/dbal/src/ConnectionException.php
@@ -1,31 +1,10 @@
*/
- protected $connections = ['primary' => null, 'replica' => null];
+ protected array $connections = ['primary' => null, 'replica' => null];
/**
* You can keep the replica connection and then switch back to it
* during the request if you know what you are doing.
- *
- * @var bool
*/
- protected $keepReplica = false;
+ protected bool $keepReplica = false;
/**
* Creates Primary Replica Connection.
*
* @internal The connection can be only instantiated by the driver manager.
*
- * @param array $params
+ * @param array $params
* @psalm-param Params $params
- *
- * @throws Exception
- * @throws InvalidArgumentException
*/
- public function __construct(
- array $params,
- Driver $driver,
- ?Configuration $config = null,
- ?EventManager $eventManager = null
- ) {
+ public function __construct(array $params, Driver $driver, ?Configuration $config = null)
+ {
if (! isset($params['replica'], $params['primary'])) {
throw new InvalidArgumentException('primary or replica configuration missing');
}
@@ -125,9 +116,9 @@ public function __construct(
}
}
- $this->keepReplica = (bool) ($params['keepReplica'] ?? false);
+ $this->keepReplica = ! empty($params['keepReplica']);
- parent::__construct($params, $driver, $config, $eventManager);
+ parent::__construct($params, $driver, $config);
}
/**
@@ -138,12 +129,7 @@ public function isConnectedToPrimary(): bool
return $this->_conn !== null && $this->_conn === $this->connections['primary'];
}
- /**
- * @param string|null $connectionName
- *
- * @return bool
- */
- public function connect($connectionName = null)
+ public function connect(?string $connectionName = null): DriverConnection
{
if ($connectionName !== null) {
throw new InvalidArgumentException(
@@ -155,10 +141,10 @@ public function connect($connectionName = null)
return $this->performConnect();
}
- protected function performConnect(?string $connectionName = null): bool
+ protected function performConnect(?string $connectionName = null): DriverConnection
{
$requestedConnectionChange = ($connectionName !== null);
- $connectionName = $connectionName ?? 'replica';
+ $connectionName ??= 'replica';
if ($connectionName !== 'replica' && $connectionName !== 'primary') {
throw new InvalidArgumentException('Invalid option to connect(), only primary or replica allowed.');
@@ -168,7 +154,7 @@ protected function performConnect(?string $connectionName = null): bool
// change request, then abort right here, because we are already done.
// This prevents writes to the replica in case of "keepReplica" option enabled.
if ($this->_conn !== null && ! $requestedConnectionChange) {
- return false;
+ return $this->_conn;
}
$forcePrimaryAsReplica = false;
@@ -185,7 +171,7 @@ protected function performConnect(?string $connectionName = null): bool
$this->connections['replica'] = $this->_conn;
}
- return false;
+ return $this->_conn;
}
if ($connectionName === 'primary') {
@@ -199,19 +185,7 @@ protected function performConnect(?string $connectionName = null): bool
$this->connections['replica'] = $this->_conn = $this->connectTo($connectionName);
}
- if ($this->_eventManager->hasListeners(Events::postConnect)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/5784',
- 'Subscribing to %s events is deprecated. Implement a middleware instead.',
- Events::postConnect,
- );
-
- $eventArgs = new ConnectionEventArgs($this);
- $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);
- }
-
- return true;
+ return $this->_conn;
}
/**
@@ -219,9 +193,9 @@ protected function performConnect(?string $connectionName = null): bool
*
* All following statements after this will be executed against the primary node.
*/
- public function ensureConnectedToPrimary(): bool
+ public function ensureConnectedToPrimary(): void
{
- return $this->performConnect('primary');
+ $this->performConnect('primary');
}
/**
@@ -231,101 +205,89 @@ public function ensureConnectedToPrimary(): bool
* unless the keepReplica option is set to false and a primary connection
* was already opened.
*/
- public function ensureConnectedToReplica(): bool
+ public function ensureConnectedToReplica(): void
{
- return $this->performConnect('replica');
+ $this->performConnect('replica');
}
/**
* Connects to a specific connection.
*
- * @param string $connectionName
- *
- * @return DriverConnection
- *
* @throws Exception
*/
- protected function connectTo($connectionName)
+ protected function connectTo(string $connectionName): DriverConnection
{
$params = $this->getParams();
+ assert(isset($params['primary']));
- $connectionParams = $this->chooseConnectionConfiguration($connectionName, $params);
+ if ($connectionName === 'primary') {
+ $connectionParams = $params['primary'];
+ } else {
+ assert(isset($params['replica']));
+ $connectionParams = $this->chooseReplicaConnectionParameters($params['primary'], $params['replica']);
+ }
try {
- return $this->_driver->connect($connectionParams);
+ return $this->driver->connect($connectionParams);
} catch (DriverException $e) {
throw $this->convertException($e);
}
}
/**
- * @param string $connectionName
- * @param mixed[] $params
+ * @param OverrideParams $primary
+ * @param array $replicas
*
- * @return mixed
+ * @return array
+ * @psalm-return OverrideParams
*/
- protected function chooseConnectionConfiguration(
- $connectionName,
+ protected function chooseReplicaConnectionParameters(
#[SensitiveParameter]
- $params
- ) {
- if ($connectionName === 'primary') {
- return $params['primary'];
- }
-
- $config = $params['replica'][array_rand($params['replica'])];
+ array $primary,
+ #[SensitiveParameter]
+ array $replicas,
+ ): array {
+ $params = $replicas[array_rand($replicas)];
- if (! isset($config['charset']) && isset($params['primary']['charset'])) {
- $config['charset'] = $params['primary']['charset'];
+ if (! isset($params['charset']) && isset($primary['charset'])) {
+ $params['charset'] = $primary['charset'];
}
- return $config;
+ return $params;
}
/**
* {@inheritDoc}
*/
- public function executeStatement($sql, array $params = [], array $types = [])
+ public function executeStatement(string $sql, array $params = [], array $types = []): int|string
{
$this->ensureConnectedToPrimary();
return parent::executeStatement($sql, $params, $types);
}
- /**
- * {@inheritDoc}
- */
- public function beginTransaction()
+ public function beginTransaction(): void
{
$this->ensureConnectedToPrimary();
- return parent::beginTransaction();
+ parent::beginTransaction();
}
- /**
- * {@inheritDoc}
- */
- public function commit()
+ public function commit(): void
{
$this->ensureConnectedToPrimary();
- return parent::commit();
+ parent::commit();
}
- /**
- * {@inheritDoc}
- */
- public function rollBack()
+ public function rollBack(): void
{
$this->ensureConnectedToPrimary();
- return parent::rollBack();
+ parent::rollBack();
}
- /**
- * {@inheritDoc}
- */
- public function close()
+ public function close(): void
{
unset($this->connections['primary'], $this->connections['replica']);
@@ -335,30 +297,21 @@ public function close()
$this->connections = ['primary' => null, 'replica' => null];
}
- /**
- * {@inheritDoc}
- */
- public function createSavepoint($savepoint)
+ public function createSavepoint(string $savepoint): void
{
$this->ensureConnectedToPrimary();
parent::createSavepoint($savepoint);
}
- /**
- * {@inheritDoc}
- */
- public function releaseSavepoint($savepoint)
+ public function releaseSavepoint(string $savepoint): void
{
$this->ensureConnectedToPrimary();
parent::releaseSavepoint($savepoint);
}
- /**
- * {@inheritDoc}
- */
- public function rollbackSavepoint($savepoint)
+ public function rollbackSavepoint(string $savepoint): void
{
$this->ensureConnectedToPrimary();
diff --git a/doctrine/dbal/src/Driver.php b/doctrine/dbal/src/Driver.php
index 46e422ba9..ffdc83cf0 100644
--- a/doctrine/dbal/src/Driver.php
+++ b/doctrine/dbal/src/Driver.php
@@ -1,12 +1,13 @@
getCode()) {
- case -104:
- return new SyntaxErrorException($exception, $query);
-
- case -203:
- return new NonUniqueFieldNameException($exception, $query);
-
- case -204:
- return new TableNotFoundException($exception, $query);
-
- case -206:
- return new InvalidFieldNameException($exception, $query);
-
- case -407:
- return new NotNullConstraintViolationException($exception, $query);
-
- case -530:
- case -531:
- case -532:
- case -20356:
- return new ForeignKeyConstraintViolationException($exception, $query);
-
- case -601:
- return new TableExistsException($exception, $query);
-
- case -803:
- return new UniqueConstraintViolationException($exception, $query);
-
- case -1336:
- case -30082:
- return new ConnectionException($exception, $query);
- }
-
- return new DriverException($exception, $query);
+ return match ($exception->getCode()) {
+ -104 => new SyntaxErrorException($exception, $query),
+ -203 => new NonUniqueFieldNameException($exception, $query),
+ -204 => new TableNotFoundException($exception, $query),
+ -206 => new InvalidFieldNameException($exception, $query),
+ -407 => new NotNullConstraintViolationException($exception, $query),
+ -530,
+ -531,
+ -532,
+ -20356 => new ForeignKeyConstraintViolationException($exception, $query),
+ -601 => new TableExistsException($exception, $query),
+ -803 => new UniqueConstraintViolationException($exception, $query),
+ -1336,
+ -30082 => new ConnectionException($exception, $query),
+ default => new DriverException($exception, $query),
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php b/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php
index 87d50aff9..254489834 100644
--- a/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php
+++ b/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php
@@ -31,89 +31,63 @@ final class ExceptionConverter implements ExceptionConverterInterface
*/
public function convert(Exception $exception, ?Query $query): DriverException
{
- switch ($exception->getCode()) {
- case 1008:
- return new DatabaseDoesNotExist($exception, $query);
-
- case 1213:
- return new DeadlockException($exception, $query);
-
- case 1205:
- return new LockWaitTimeoutException($exception, $query);
-
- case 1050:
- return new TableExistsException($exception, $query);
-
- case 1051:
- case 1146:
- return new TableNotFoundException($exception, $query);
-
- case 1216:
- case 1217:
- case 1451:
- case 1452:
- case 1701:
- return new ForeignKeyConstraintViolationException($exception, $query);
-
- case 1062:
- case 1557:
- case 1569:
- case 1586:
- return new UniqueConstraintViolationException($exception, $query);
-
- case 1054:
- case 1166:
- case 1611:
- return new InvalidFieldNameException($exception, $query);
-
- case 1052:
- case 1060:
- case 1110:
- return new NonUniqueFieldNameException($exception, $query);
-
- case 1064:
- case 1149:
- case 1287:
- case 1341:
- case 1342:
- case 1343:
- case 1344:
- case 1382:
- case 1479:
- case 1541:
- case 1554:
- case 1626:
- return new SyntaxErrorException($exception, $query);
-
- case 1044:
- case 1045:
- case 1046:
- case 1049:
- case 1095:
- case 1142:
- case 1143:
- case 1227:
- case 1370:
- case 1429:
- case 2002:
- case 2005:
- case 2054:
- return new ConnectionException($exception, $query);
-
- case 2006:
- return new ConnectionLost($exception, $query);
-
- case 1048:
- case 1121:
- case 1138:
- case 1171:
- case 1252:
- case 1263:
- case 1364:
- case 1566:
- return new NotNullConstraintViolationException($exception, $query);
- }
-
- return new DriverException($exception, $query);
+ return match ($exception->getCode()) {
+ 1008 => new DatabaseDoesNotExist($exception, $query),
+ 1213 => new DeadlockException($exception, $query),
+ 1205 => new LockWaitTimeoutException($exception, $query),
+ 1050 => new TableExistsException($exception, $query),
+ 1051,
+ 1146 => new TableNotFoundException($exception, $query),
+ 1216,
+ 1217,
+ 1451,
+ 1452,
+ 1701 => new ForeignKeyConstraintViolationException($exception, $query),
+ 1062,
+ 1557,
+ 1569,
+ 1586 => new UniqueConstraintViolationException($exception, $query),
+ 1054,
+ 1166,
+ 1611 => new InvalidFieldNameException($exception, $query),
+ 1052,
+ 1060,
+ 1110 => new NonUniqueFieldNameException($exception, $query),
+ 1064,
+ 1149,
+ 1287,
+ 1341,
+ 1342,
+ 1343,
+ 1344,
+ 1382,
+ 1479,
+ 1541,
+ 1554,
+ 1626 => new SyntaxErrorException($exception, $query),
+ 1044,
+ 1045,
+ 1046,
+ 1049,
+ 1095,
+ 1142,
+ 1143,
+ 1227,
+ 1370,
+ 1429,
+ 2002,
+ 2005,
+ 2054 => new ConnectionException($exception, $query),
+ 2006 => new ConnectionLost($exception, $query),
+ 1048,
+ 1121,
+ 1138,
+ 1171,
+ 1252,
+ 1263,
+ 1364,
+ 1566 => new NotNullConstraintViolationException($exception, $query),
+ default => new DriverException($exception, $query),
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php b/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php
index 4703a57d5..1c0dc793f 100644
--- a/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php
+++ b/doctrine/dbal/src/Driver/API/OCI/ExceptionConverter.php
@@ -26,49 +26,27 @@ final class ExceptionConverter implements ExceptionConverterInterface
/** @link http://www.dba-oracle.com/t_error_code_list.htm */
public function convert(Exception $exception, ?Query $query): DriverException
{
- switch ($exception->getCode()) {
- case 1:
- case 2299:
- case 38911:
- return new UniqueConstraintViolationException($exception, $query);
-
- case 904:
- return new InvalidFieldNameException($exception, $query);
-
- case 918:
- case 960:
- return new NonUniqueFieldNameException($exception, $query);
-
- case 923:
- return new SyntaxErrorException($exception, $query);
-
- case 942:
- return new TableNotFoundException($exception, $query);
-
- case 955:
- return new TableExistsException($exception, $query);
-
- case 1017:
- case 12545:
- return new ConnectionException($exception, $query);
-
- case 1400:
- return new NotNullConstraintViolationException($exception, $query);
-
- case 1918:
- return new DatabaseDoesNotExist($exception, $query);
-
- case 2289:
- case 2443:
- case 4080:
- return new DatabaseObjectNotFoundException($exception, $query);
-
- case 2266:
- case 2291:
- case 2292:
- return new ForeignKeyConstraintViolationException($exception, $query);
- }
-
- return new DriverException($exception, $query);
+ return match ($exception->getCode()) {
+ 1,
+ 2299,
+ 38911 => new UniqueConstraintViolationException($exception, $query),
+ 904 => new InvalidFieldNameException($exception, $query),
+ 918,
+ 960 => new NonUniqueFieldNameException($exception, $query),
+ 923 => new SyntaxErrorException($exception, $query),
+ 942 => new TableNotFoundException($exception, $query),
+ 955 => new TableExistsException($exception, $query),
+ 1017,
+ 12545 => new ConnectionException($exception, $query),
+ 1400 => new NotNullConstraintViolationException($exception, $query),
+ 1918 => new DatabaseDoesNotExist($exception, $query),
+ 2289,
+ 2443,
+ 4080 => new DatabaseObjectNotFoundException($exception, $query),
+ 2266,
+ 2291,
+ 2292 => new ForeignKeyConstraintViolationException($exception, $query),
+ default => new DriverException($exception, $query),
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php b/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php
index 2baca1ee2..54e496638 100644
--- a/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php
+++ b/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php
@@ -21,7 +21,7 @@
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Query;
-use function strpos;
+use function str_contains;
/** @internal */
final class ExceptionConverter implements ExceptionConverterInterface
@@ -37,7 +37,7 @@ public function convert(Exception $exception, ?Query $query): DriverException
case '0A000':
// Foreign key constraint violations during a TRUNCATE operation
// are considered "feature not supported" in PostgreSQL.
- if (strpos($exception->getMessage(), 'truncate') !== false) {
+ if (str_contains($exception->getMessage(), 'truncate')) {
return new ForeignKeyConstraintViolationException($exception, $query);
}
@@ -77,13 +77,6 @@ public function convert(Exception $exception, ?Query $query): DriverException
return new ConnectionException($exception, $query);
}
- // Prior to fixing https://bugs.php.net/bug.php?id=64705 (PHP 7.4.10),
- // in some cases (mainly connection errors) the PDO exception wouldn't provide a SQLSTATE via its code.
- // We have to match against the SQLSTATE in the error message in these cases.
- if ($exception->getCode() === 7 && strpos($exception->getMessage(), 'SQLSTATE[08006]') !== false) {
- return new ConnectionException($exception, $query);
- }
-
return new DriverException($exception, $query);
}
}
diff --git a/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php b/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php
index d0e8e9f46..561e58b96 100644
--- a/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php
+++ b/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php
@@ -28,42 +28,22 @@ final class ExceptionConverter implements ExceptionConverterInterface
{
public function convert(Exception $exception, ?Query $query): DriverException
{
- switch ($exception->getCode()) {
- case 102:
- return new SyntaxErrorException($exception, $query);
-
- case 207:
- return new InvalidFieldNameException($exception, $query);
-
- case 208:
- return new TableNotFoundException($exception, $query);
-
- case 209:
- return new NonUniqueFieldNameException($exception, $query);
-
- case 515:
- return new NotNullConstraintViolationException($exception, $query);
-
- case 547:
- case 4712:
- return new ForeignKeyConstraintViolationException($exception, $query);
-
- case 2601:
- case 2627:
- return new UniqueConstraintViolationException($exception, $query);
-
- case 2714:
- return new TableExistsException($exception, $query);
-
- case 3701:
- case 15151:
- return new DatabaseObjectNotFoundException($exception, $query);
-
- case 11001:
- case 18456:
- return new ConnectionException($exception, $query);
- }
-
- return new DriverException($exception, $query);
+ return match ($exception->getCode()) {
+ 102 => new SyntaxErrorException($exception, $query),
+ 207 => new InvalidFieldNameException($exception, $query),
+ 208 => new TableNotFoundException($exception, $query),
+ 209 => new NonUniqueFieldNameException($exception, $query),
+ 515 => new NotNullConstraintViolationException($exception, $query),
+ 547,
+ 4712 => new ForeignKeyConstraintViolationException($exception, $query),
+ 2601,
+ 2627 => new UniqueConstraintViolationException($exception, $query),
+ 2714 => new TableExistsException($exception, $query),
+ 3701,
+ 15151 => new DatabaseObjectNotFoundException($exception, $query),
+ 11001,
+ 18456 => new ConnectionException($exception, $query),
+ default => new DriverException($exception, $query),
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php b/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php
index 9e67155ad..58851955f 100644
--- a/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php
+++ b/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php
@@ -20,7 +20,7 @@
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Query;
-use function strpos;
+use function str_contains;
/** @internal */
final class ExceptionConverter implements ExceptionConverterInterface
@@ -28,55 +28,55 @@ final class ExceptionConverter implements ExceptionConverterInterface
/** @link http://www.sqlite.org/c3ref/c_abort.html */
public function convert(Exception $exception, ?Query $query): DriverException
{
- if (strpos($exception->getMessage(), 'database is locked') !== false) {
+ if (str_contains($exception->getMessage(), 'database is locked')) {
return new LockWaitTimeoutException($exception, $query);
}
if (
- strpos($exception->getMessage(), 'must be unique') !== false ||
- strpos($exception->getMessage(), 'is not unique') !== false ||
- strpos($exception->getMessage(), 'are not unique') !== false ||
- strpos($exception->getMessage(), 'UNIQUE constraint failed') !== false
+ str_contains($exception->getMessage(), 'must be unique') ||
+ str_contains($exception->getMessage(), 'is not unique') ||
+ str_contains($exception->getMessage(), 'are not unique') ||
+ str_contains($exception->getMessage(), 'UNIQUE constraint failed')
) {
return new UniqueConstraintViolationException($exception, $query);
}
if (
- strpos($exception->getMessage(), 'may not be NULL') !== false ||
- strpos($exception->getMessage(), 'NOT NULL constraint failed') !== false
+ str_contains($exception->getMessage(), 'may not be NULL') ||
+ str_contains($exception->getMessage(), 'NOT NULL constraint failed')
) {
return new NotNullConstraintViolationException($exception, $query);
}
- if (strpos($exception->getMessage(), 'no such table:') !== false) {
+ if (str_contains($exception->getMessage(), 'no such table:')) {
return new TableNotFoundException($exception, $query);
}
- if (strpos($exception->getMessage(), 'already exists') !== false) {
+ if (str_contains($exception->getMessage(), 'already exists')) {
return new TableExistsException($exception, $query);
}
- if (strpos($exception->getMessage(), 'has no column named') !== false) {
+ if (str_contains($exception->getMessage(), 'has no column named')) {
return new InvalidFieldNameException($exception, $query);
}
- if (strpos($exception->getMessage(), 'ambiguous column name') !== false) {
+ if (str_contains($exception->getMessage(), 'ambiguous column name')) {
return new NonUniqueFieldNameException($exception, $query);
}
- if (strpos($exception->getMessage(), 'syntax error') !== false) {
+ if (str_contains($exception->getMessage(), 'syntax error')) {
return new SyntaxErrorException($exception, $query);
}
- if (strpos($exception->getMessage(), 'attempt to write a readonly database') !== false) {
+ if (str_contains($exception->getMessage(), 'attempt to write a readonly database')) {
return new ReadOnlyException($exception, $query);
}
- if (strpos($exception->getMessage(), 'unable to open database file') !== false) {
+ if (str_contains($exception->getMessage(), 'unable to open database file')) {
return new ConnectionException($exception, $query);
}
- if (strpos($exception->getMessage(), 'FOREIGN KEY constraint failed') !== false) {
+ if (str_contains($exception->getMessage(), 'FOREIGN KEY constraint failed')) {
return new ForeignKeyConstraintViolationException($exception, $query);
}
diff --git a/doctrine/dbal/src/Driver/API/SQLite/UserDefinedFunctions.php b/doctrine/dbal/src/Driver/API/SQLite/UserDefinedFunctions.php
deleted file mode 100644
index 3779c8bab..000000000
--- a/doctrine/dbal/src/Driver/API/SQLite/UserDefinedFunctions.php
+++ /dev/null
@@ -1,80 +0,0 @@
- ['callback' => [SqlitePlatform::class, 'udfSqrt'], 'numArgs' => 1],
- 'mod' => ['callback' => [SqlitePlatform::class, 'udfMod'], 'numArgs' => 2],
- 'locate' => ['callback' => [SqlitePlatform::class, 'udfLocate'], 'numArgs' => -1],
- ];
-
- /**
- * @param callable(string, callable, int): bool $callback
- * @param array $additionalFunctions
- */
- public static function register(callable $callback, array $additionalFunctions = []): void
- {
- $userDefinedFunctions = array_merge(self::DEFAULT_FUNCTIONS, $additionalFunctions);
-
- foreach ($userDefinedFunctions as $function => $data) {
- $callback($function, $data['callback'], $data['numArgs']);
- }
- }
-
- /**
- * User-defined function that implements MOD().
- *
- * @param int $a
- * @param int $b
- */
- public static function mod($a, $b): int
- {
- return $a % $b;
- }
-
- /**
- * User-defined function that implements LOCATE().
- *
- * @param string $str
- * @param string $substr
- * @param int $offset
- */
- public static function locate($str, $substr, $offset = 0): int
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5749',
- 'Relying on DBAL\'s emulated LOCATE() function is deprecated. '
- . 'Use INSTR() or %s::getLocateExpression() instead.',
- AbstractPlatform::class,
- );
-
- // SQL's LOCATE function works on 1-based positions, while PHP's strpos works on 0-based positions.
- // So we have to make them compatible if an offset is given.
- if ($offset > 0) {
- $offset -= 1;
- }
-
- $pos = strpos($str, $substr, $offset);
-
- if ($pos !== false) {
- return $pos + 1;
- }
-
- return 0;
- }
-}
diff --git a/doctrine/dbal/src/Driver/AbstractDB2Driver.php b/doctrine/dbal/src/Driver/AbstractDB2Driver.php
index 79efb8650..9955a3836 100644
--- a/doctrine/dbal/src/Driver/AbstractDB2Driver.php
+++ b/doctrine/dbal/src/Driver/AbstractDB2Driver.php
@@ -1,100 +1,27 @@
getVersionNumber($version), '11.1', '>=')) {
- return new DB2111Platform();
- }
-
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5156',
- 'IBM DB2 < 11.1 support is deprecated and will be removed in DBAL 4.'
- . ' Consider upgrading to IBM DB2 11.1 or later.',
- );
-
- return $this->getDatabasePlatform();
- }
-
- /**
- * Detects IBM DB2 server version
- *
- * @param string $versionString Version string as returned by IBM DB2 server, i.e. 'DB2/LINUXX8664 11.5.8.0'
- *
- * @throws DBALException
- */
- private function getVersionNumber(string $versionString): string
- {
- if (
- preg_match(
- '/^(?:[^\s]+\s)?(?P\d+)\.(?P\d+)\.(?P\d+)/i',
- $versionString,
- $versionParts,
- ) === 0
- ) {
- throw DBALException::invalidPlatformVersionSpecified(
- $versionString,
- '^(?:[^\s]+\s)?..',
- );
- }
-
- return $versionParts['major'] . '.' . $versionParts['minor'] . '.' . $versionParts['patch'];
- }
}
diff --git a/doctrine/dbal/src/Driver/AbstractException.php b/doctrine/dbal/src/Driver/AbstractException.php
index 389f82e70..367fc497a 100644
--- a/doctrine/dbal/src/Driver/AbstractException.php
+++ b/doctrine/dbal/src/Driver/AbstractException.php
@@ -8,36 +8,28 @@
use Throwable;
/**
- * Base implementation of the {@see Exception} interface.
- *
- * @internal
+ * Abstract base implementation of the {@see DriverException} interface.
*
* @psalm-immutable
*/
abstract class AbstractException extends BaseException implements Exception
{
- /**
- * The SQLSTATE of the driver.
- */
- private ?string $sqlState = null;
-
/**
* @param string $message The driver error message.
* @param string|null $sqlState The SQLSTATE the driver is in at the time the error occurred, if any.
* @param int $code The driver specific error code if any.
* @param Throwable|null $previous The previous throwable used for the exception chaining.
*/
- public function __construct($message, $sqlState = null, $code = 0, ?Throwable $previous = null)
- {
+ public function __construct(
+ string $message,
+ private readonly ?string $sqlState = null,
+ int $code = 0,
+ ?Throwable $previous = null,
+ ) {
parent::__construct($message, $code, $previous);
-
- $this->sqlState = $sqlState;
}
- /**
- * {@inheritDoc}
- */
- public function getSQLState()
+ public function getSQLState(): ?string
{
return $this->sqlState;
}
diff --git a/doctrine/dbal/src/Driver/AbstractMySQLDriver.php b/doctrine/dbal/src/Driver/AbstractMySQLDriver.php
index 83159a540..40d650763 100644
--- a/doctrine/dbal/src/Driver/AbstractMySQLDriver.php
+++ b/doctrine/dbal/src/Driver/AbstractMySQLDriver.php
@@ -1,25 +1,21 @@
getServerVersion();
+ if (stripos($version, 'mariadb') !== false) {
$mariaDbVersion = $this->getMariaDbMysqlVersionNumber($version);
if (version_compare($mariaDbVersion, '10.6.0', '>=')) {
- return new MariaDb1060Platform();
+ return new MariaDB1060Platform();
}
if (version_compare($mariaDbVersion, '10.5.2', '>=')) {
- return new MariaDb1052Platform();
- }
-
- if (version_compare($mariaDbVersion, '10.4.3', '>=')) {
- return new MariaDb1043Platform();
- }
-
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/6110',
- 'Support for MariaDB < 10.4 is deprecated and will be removed in DBAL 4.'
- . ' Consider upgrading to a more recent version of MariaDB.',
- );
-
- if (version_compare($mariaDbVersion, '10.2.7', '>=')) {
- return new MariaDb1027Platform();
- }
- } else {
- $oracleMysqlVersion = $this->getOracleMysqlVersionNumber($version);
- if (version_compare($oracleMysqlVersion, '8', '>=')) {
- if (! version_compare($version, '8.0.0', '>=')) {
- Deprecation::trigger(
- 'doctrine/orm',
- 'https://github.com/doctrine/dbal/pull/5779',
- 'Version detection logic for MySQL will change in DBAL 4. '
- . 'Please specify the version as the server reports it, e.g. "8.0.31" instead of "8".',
- );
- }
-
- return new MySQL80Platform();
+ return new MariaDB1052Platform();
}
- if (version_compare($oracleMysqlVersion, '5.7.9', '>=')) {
- if (! version_compare($version, '5.7.9', '>=')) {
- Deprecation::trigger(
- 'doctrine/orm',
- 'https://github.com/doctrine/dbal/pull/5779',
- 'Version detection logic for MySQL will change in DBAL 4. '
- . 'Please specify the version as the server reports it, e.g. "5.7.40" instead of "5.7".',
- );
- }
-
- return new MySQL57Platform();
- }
+ return new MariaDBPlatform();
+ }
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5072',
- 'MySQL 5.6 support is deprecated and will be removed in DBAL 4.'
- . ' Consider upgrading to MySQL 5.7 or later.',
- );
+ if (version_compare($version, '8.0.0', '>=')) {
+ return new MySQL80Platform();
}
- return $this->getDatabasePlatform();
+ return new MySQLPlatform();
}
- /**
- * Get a normalized 'version number' from the server string
- * returned by Oracle MySQL servers.
- *
- * @param string $versionString Version string returned by the driver, i.e. '5.7.10'
- *
- * @throws Exception
- */
- private function getOracleMysqlVersionNumber(string $versionString): string
+ public function getExceptionConverter(): ExceptionConverterInterface
{
- if (
- preg_match(
- '/^(?P\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?/',
- $versionString,
- $versionParts,
- ) === 0
- ) {
- throw Exception::invalidPlatformVersionSpecified(
- $versionString,
- '..',
- );
- }
-
- $majorVersion = $versionParts['major'];
- $minorVersion = $versionParts['minor'] ?? 0;
- $patchVersion = $versionParts['patch'] ?? null;
-
- if ($majorVersion === '5' && $minorVersion === '7') {
- $patchVersion ??= '9';
- }
-
- return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
+ return new ExceptionConverter();
}
/**
@@ -141,20 +64,10 @@ private function getOracleMysqlVersionNumber(string $versionString): string
*
* @param string $versionString Version string as returned by mariadb server, i.e. '5.5.5-Mariadb-10.0.8-xenial'
*
- * @throws Exception
+ * @throws InvalidPlatformVersion
*/
private function getMariaDbMysqlVersionNumber(string $versionString): string
{
- if (stripos($versionString, 'MariaDB') === 0) {
- Deprecation::trigger(
- 'doctrine/orm',
- 'https://github.com/doctrine/dbal/pull/5779',
- 'Version detection logic for MySQL will change in DBAL 4. '
- . 'Please specify the version as the server reports it, '
- . 'e.g. "10.9.3-MariaDB" instead of "mariadb-10.9".',
- );
- }
-
if (
preg_match(
'/^(?:5\.5\.5-)?(mariadb-)?(?P\d+)\.(?P\d+)\.(?P\d+)/i',
@@ -162,7 +75,7 @@ private function getMariaDbMysqlVersionNumber(string $versionString): string
$versionParts,
) === 0
) {
- throw Exception::invalidPlatformVersionSpecified(
+ throw InvalidPlatformVersion::new(
$versionString,
'^(?:5\.5\.5-)?(mariadb-)?..',
);
@@ -170,40 +83,4 @@ private function getMariaDbMysqlVersionNumber(string $versionString): string
return $versionParts['major'] . '.' . $versionParts['minor'] . '.' . $versionParts['patch'];
}
-
- /**
- * {@inheritDoc}
- *
- * @return AbstractMySQLPlatform
- */
- public function getDatabasePlatform()
- {
- return new MySQLPlatform();
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@link AbstractMySQLPlatform::createSchemaManager()} instead.
- *
- * @return MySQLSchemaManager
- */
- public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5458',
- 'AbstractMySQLDriver::getSchemaManager() is deprecated.'
- . ' Use MySQLPlatform::createSchemaManager() instead.',
- );
-
- assert($platform instanceof AbstractMySQLPlatform);
-
- return new MySQLSchemaManager($conn, $platform);
- }
-
- public function getExceptionConverter(): ExceptionConverter
- {
- return new MySQL\ExceptionConverter();
- }
}
diff --git a/doctrine/dbal/src/Driver/AbstractOracleDriver.php b/doctrine/dbal/src/Driver/AbstractOracleDriver.php
index b0f92453a..cf56cfad6 100644
--- a/doctrine/dbal/src/Driver/AbstractOracleDriver.php
+++ b/doctrine/dbal/src/Driver/AbstractOracleDriver.php
@@ -1,64 +1,37 @@
$params The connection parameters to return the Easy Connect String for.
- *
- * @return string
*/
- protected function getEasyConnectString(array $params)
+ protected function getEasyConnectString(array $params): string
{
return (string) EasyConnectString::fromConnectionParameters($params);
}
diff --git a/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php b/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php
index 91bc6a7e1..a7778176c 100644
--- a/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php
+++ b/doctrine/dbal/src/Driver/AbstractOracleDriver/EasyConnectString.php
@@ -15,11 +15,8 @@
*/
final class EasyConnectString
{
- private string $string;
-
- private function __construct(string $string)
+ private function __construct(private readonly string $string)
{
- $this->string = $string;
}
public function __toString(): string
@@ -104,8 +101,7 @@ private static function renderParams(array $params): string
return implode('', $chunks);
}
- /** @param mixed $value */
- private static function renderValue($value): string
+ private static function renderValue(mixed $value): string
{
if (is_array($value)) {
return self::renderParams($value);
diff --git a/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php b/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php
index 099630d33..2efcddca7 100644
--- a/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php
+++ b/doctrine/dbal/src/Driver/AbstractPostgreSQLDriver.php
@@ -1,88 +1,27 @@
\d+)(?:\.(?P\d+)(?:\.(?P\d+))?)?/', $version, $versionParts) === 0) {
- throw Exception::invalidPlatformVersionSpecified(
- $version,
- '..',
- );
- }
-
- $majorVersion = $versionParts['major'];
- $minorVersion = $versionParts['minor'] ?? 0;
- $patchVersion = $versionParts['patch'] ?? 0;
- $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
-
- if (version_compare($version, '10.0', '>=')) {
- return new PostgreSQL100Platform();
- }
-
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5060',
- 'PostgreSQL 9 support is deprecated and will be removed in DBAL 4.'
- . ' Consider upgrading to Postgres 10 or later.',
- );
-
- return new PostgreSQL94Platform();
- }
-
- /**
- * {@inheritDoc}
- */
- public function getDatabasePlatform()
+ public function getDatabasePlatform(ServerVersionProvider $versionProvider): PostgreSQLPlatform
{
- return new PostgreSQL94Platform();
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@link PostgreSQLPlatform::createSchemaManager()} instead.
- */
- public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5458',
- 'AbstractPostgreSQLDriver::getSchemaManager() is deprecated.'
- . ' Use PostgreSQLPlatform::createSchemaManager() instead.',
- );
-
- assert($platform instanceof PostgreSQLPlatform);
-
- return new PostgreSQLSchemaManager($conn, $platform);
+ return new PostgreSQLPlatform();
}
- public function getExceptionConverter(): ExceptionConverter
+ public function getExceptionConverter(): ExceptionConverterInterface
{
- return new PostgreSQL\ExceptionConverter();
+ return new ExceptionConverter();
}
}
diff --git a/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php b/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php
index b9a99552e..8c2d012fe 100644
--- a/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php
+++ b/doctrine/dbal/src/Driver/AbstractSQLServerDriver.php
@@ -1,49 +1,23 @@
fetchNumeric();
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Connection.php b/doctrine/dbal/src/Driver/IBMDB2/Connection.php
index dfb11c236..2c8783b28 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Connection.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Connection.php
@@ -1,15 +1,14 @@
connection = $connection;
}
- /**
- * {@inheritDoc}
- */
- public function getServerVersion()
+ public function getServerVersion(): string
{
$serverInfo = db2_server_info($this->connection);
assert($serverInfo instanceof stdClass);
@@ -53,7 +45,7 @@ public function getServerVersion()
return $serverInfo->DBMS_VER;
}
- public function prepare(string $sql): DriverStatement
+ public function prepare(string $sql): Statement
{
$stmt = @db2_prepare($this->connection, $sql);
@@ -64,26 +56,17 @@ public function prepare(string $sql): DriverStatement
return new Statement($stmt);
}
- public function query(string $sql): ResultInterface
+ public function query(string $sql): Result
{
return $this->prepare($sql)->execute();
}
- /**
- * {@inheritDoc}
- */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- $value = db2_escape_string($value);
-
- if ($type === ParameterType::INTEGER) {
- return $value;
- }
-
- return "'" . $value . "'";
+ return "'" . db2_escape_string($value) . "'";
}
- public function exec(string $sql): int
+ public function exec(string $sql): int|string
{
$stmt = @db2_exec($this->connection, $sql);
@@ -91,46 +74,53 @@ public function exec(string $sql): int
throw StatementError::new();
}
- return db2_num_rows($stmt);
+ $numRows = db2_num_rows($stmt);
+
+ if ($numRows === false) {
+ throw StatementError::new();
+ }
+
+ return $numRows;
}
- /**
- * {@inheritDoc}
- */
- public function lastInsertId($name = null)
+ public function lastInsertId(): string
{
- if ($name !== null) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
+ $lastInsertId = db2_last_insert_id($this->connection);
+
+ if ($lastInsertId === null) {
+ throw NoIdentityValue::new();
}
- return db2_last_insert_id($this->connection) ?? false;
+ return $lastInsertId;
}
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
- return db2_autocommit($this->connection, DB2_AUTOCOMMIT_OFF);
+ if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_OFF) !== true) {
+ throw ConnectionError::new($this->connection);
+ }
}
- public function commit(): bool
+ public function commit(): void
{
if (! db2_commit($this->connection)) {
throw ConnectionError::new($this->connection);
}
- return db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
+ if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON) !== true) {
+ throw ConnectionError::new($this->connection);
+ }
}
- public function rollBack(): bool
+ public function rollBack(): void
{
if (! db2_rollback($this->connection)) {
throw ConnectionError::new($this->connection);
}
- return db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON);
+ if (db2_autocommit($this->connection, DB2_AUTOCOMMIT_ON) !== true) {
+ throw ConnectionError::new($this->connection);
+ }
}
/** @return resource */
diff --git a/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php b/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php
index 124a6f6db..a1e594821 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php
@@ -8,20 +8,17 @@
use function implode;
use function sprintf;
-use function strpos;
+use function str_contains;
/**
* IBM DB2 DSN
*/
final class DataSourceName
{
- private string $string;
-
private function __construct(
#[SensitiveParameter]
- string $string
+ private readonly string $string,
) {
- $this->string = $string;
}
public function toString(): string
@@ -36,7 +33,7 @@ public function toString(): string
*/
public static function fromArray(
#[SensitiveParameter]
- array $params
+ array $params,
): self {
$chunks = [];
@@ -52,11 +49,10 @@ public static function fromArray(
*
* @param array $params
*/
- public static function fromConnectionParameters(
- #[SensitiveParameter]
- array $params
- ): self {
- if (isset($params['dbname']) && strpos($params['dbname'], '=') !== false) {
+ public static function fromConnectionParameters(#[SensitiveParameter]
+ array $params,): self
+ {
+ if (isset($params['dbname']) && str_contains($params['dbname'], '=')) {
return new self($params['dbname']);
}
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Driver.php b/doctrine/dbal/src/Driver/IBMDB2/Driver.php
index 7650db5f4..f2f4ed770 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Driver.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Driver.php
@@ -1,5 +1,7 @@
toString();
$username = $params['user'] ?? '';
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php b/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php
index 231c9d473..c584fb82c 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCopyStreamToStream.php
@@ -13,7 +13,7 @@
*/
final class CannotCopyStreamToStream extends AbstractException
{
- /** @psalm-param array{message: string}|null $error */
+ /** @psalm-param array{message: string, ...}|null $error */
public static function new(?array $error): self
{
$message = 'Could not copy source stream to temporary file';
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCreateTemporaryFile.php b/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCreateTemporaryFile.php
index 63f7ca1e2..d7646a0ce 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCreateTemporaryFile.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Exception/CannotCreateTemporaryFile.php
@@ -13,7 +13,7 @@
*/
final class CannotCreateTemporaryFile extends AbstractException
{
- /** @psalm-param array{message: string}|null $error */
+ /** @psalm-param array{message: string, ...}|null $error */
public static function new(?array $error): self
{
$message = 'Could not create temporary file';
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Exception/PrepareFailed.php b/doctrine/dbal/src/Driver/IBMDB2/Exception/PrepareFailed.php
index 42df5e15c..5344b6529 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Exception/PrepareFailed.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Exception/PrepareFailed.php
@@ -13,7 +13,7 @@
*/
final class PrepareFailed extends AbstractException
{
- /** @psalm-param array{message: string}|null $error */
+ /** @psalm-param array{message: string, ...}|null $error */
public static function new(?array $error): self
{
if ($error === null) {
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Result.php b/doctrine/dbal/src/Driver/IBMDB2/Result.php
index d8e9fc599..461f44aca 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Result.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Result.php
@@ -17,23 +17,16 @@
final class Result implements ResultInterface
{
- /** @var resource */
- private $statement;
-
/**
* @internal The result can be only instantiated by its driver connection or statement.
*
* @param resource $statement
*/
- public function __construct($statement)
+ public function __construct(private readonly mixed $statement)
{
- $this->statement = $statement;
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
$row = @db2_fetch_array($this->statement);
@@ -44,10 +37,7 @@ public function fetchNumeric()
return $row;
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
$row = @db2_fetch_assoc($this->statement);
@@ -58,10 +48,7 @@ public function fetchAssociative()
return $row;
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return FetchUtils::fetchOne($this);
}
@@ -92,7 +79,13 @@ public function fetchFirstColumn(): array
public function rowCount(): int
{
- return @db2_num_rows($this->statement);
+ $numRows = @db2_num_rows($this->statement);
+
+ if ($numRows === false) {
+ throw StatementError::new($this->statement);
+ }
+
+ return $numRows;
}
public function columnCount(): int
diff --git a/doctrine/dbal/src/Driver/IBMDB2/Statement.php b/doctrine/dbal/src/Driver/IBMDB2/Statement.php
index 699e236d7..96852dae4 100644
--- a/doctrine/dbal/src/Driver/IBMDB2/Statement.php
+++ b/doctrine/dbal/src/Driver/IBMDB2/Statement.php
@@ -1,22 +1,21 @@
stmt = $stmt;
}
- /**
- * {@inheritDoc}
- */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
assert(is_int($param));
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- return $this->bindParam($param, $value, $type);
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@see bindValue()} instead.
- */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- assert(is_int($param));
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
switch ($type) {
case ParameterType::INTEGER:
- $this->bind($param, $variable, DB2_PARAM_IN, DB2_LONG);
+ $this->bind($param, $value, DB2_PARAM_IN, DB2_LONG);
break;
case ParameterType::LARGE_OBJECT:
- $this->lobs[$param] = &$variable;
+ $this->lobs[$param] = &$value;
break;
default:
- $this->bind($param, $variable, DB2_PARAM_IN, DB2_CHAR);
+ $this->bind($param, $value, DB2_PARAM_IN, DB2_CHAR);
break;
}
-
- return true;
}
- /**
- * @param int $position Parameter position
- * @param mixed $variable
- *
- * @throws Exception
- */
- private function bind($position, &$variable, int $parameterType, int $dataType): void
+ /** @throws Exception */
+ private function bind(int $position, mixed &$variable, int $parameterType, int $dataType): void
{
$this->parameters[$position] =& $variable;
@@ -131,23 +79,11 @@ private function bind($position, &$variable, int $parameterType, int $dataType):
}
}
- /**
- * {@inheritDoc}
- */
- public function execute($params = null): ResultInterface
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
- }
-
$handles = $this->bindLobs();
- $result = @db2_execute($this->stmt, $params ?? $this->parameters);
+ $result = @db2_execute($this->stmt, $this->parameters);
foreach ($handles as $handle) {
fclose($handle);
diff --git a/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php b/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php
index f2809cd0a..bdf9b2f84 100644
--- a/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php
+++ b/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php
@@ -1,26 +1,17 @@
wrappedConnection = $wrappedConnection;
}
public function prepare(string $sql): Statement
@@ -33,81 +24,46 @@ public function query(string $sql): Result
return $this->wrappedConnection->query($sql);
}
- /**
- * {@inheritDoc}
- */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- return $this->wrappedConnection->quote($value, $type);
+ return $this->wrappedConnection->quote($value);
}
- public function exec(string $sql): int
+ public function exec(string $sql): int|string
{
return $this->wrappedConnection->exec($sql);
}
- /**
- * {@inheritDoc}
- */
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
- if ($name !== null) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
- }
-
- return $this->wrappedConnection->lastInsertId($name);
+ return $this->wrappedConnection->lastInsertId();
}
- /**
- * {@inheritDoc}
- */
- public function beginTransaction()
+ public function beginTransaction(): void
{
- return $this->wrappedConnection->beginTransaction();
+ $this->wrappedConnection->beginTransaction();
}
- /**
- * {@inheritDoc}
- */
- public function commit()
+ public function commit(): void
{
- return $this->wrappedConnection->commit();
+ $this->wrappedConnection->commit();
}
- /**
- * {@inheritDoc}
- */
- public function rollBack()
+ public function rollBack(): void
{
- return $this->wrappedConnection->rollBack();
+ $this->wrappedConnection->rollBack();
}
- /**
- * {@inheritDoc}
- */
- public function getServerVersion()
+ public function getServerVersion(): string
{
- if (! $this->wrappedConnection instanceof ServerInfoAwareConnection) {
- throw new LogicException('The underlying connection is not a ServerInfoAwareConnection');
- }
-
return $this->wrappedConnection->getServerVersion();
}
- /** @return resource|object */
+ /**
+ * {@inheritDoc}
+ */
public function getNativeConnection()
{
- if (! method_exists($this->wrappedConnection, 'getNativeConnection')) {
- throw new LogicException(sprintf(
- 'The driver connection %s does not support accessing the native connection.',
- get_class($this->wrappedConnection),
- ));
- }
-
return $this->wrappedConnection->getNativeConnection();
}
}
diff --git a/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php b/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php
index 1c9d43097..482f13458 100644
--- a/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php
+++ b/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php
@@ -1,22 +1,20 @@
wrappedDriver = $wrappedDriver;
}
/**
@@ -24,50 +22,18 @@ public function __construct(Driver $wrappedDriver)
*/
public function connect(
#[SensitiveParameter]
- array $params
- ) {
+ array $params,
+ ): DriverConnection {
return $this->wrappedDriver->connect($params);
}
- /**
- * {@inheritDoc}
- */
- public function getDatabasePlatform()
+ public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform
{
- return $this->wrappedDriver->getDatabasePlatform();
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@link AbstractPlatform::createSchemaManager()} instead.
- */
- public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5458',
- 'AbstractDriverMiddleware::getSchemaManager() is deprecated.'
- . ' Use AbstractPlatform::createSchemaManager() instead.',
- );
-
- return $this->wrappedDriver->getSchemaManager($conn, $platform);
+ return $this->wrappedDriver->getDatabasePlatform($versionProvider);
}
public function getExceptionConverter(): ExceptionConverter
{
return $this->wrappedDriver->getExceptionConverter();
}
-
- /**
- * {@inheritDoc}
- */
- public function createDatabasePlatformForVersion($version)
- {
- if ($this->wrappedDriver instanceof VersionAwarePlatformDriver) {
- return $this->wrappedDriver->createDatabasePlatformForVersion($version);
- }
-
- return $this->wrappedDriver->getDatabasePlatform();
- }
}
diff --git a/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php b/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php
index 198d39b0d..7da2f9974 100644
--- a/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php
+++ b/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php
@@ -1,38 +1,28 @@
wrappedResult = $result;
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
return $this->wrappedResult->fetchNumeric();
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
return $this->wrappedResult->fetchAssociative();
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return $this->wrappedResult->fetchOne();
}
@@ -61,7 +51,7 @@ public function fetchFirstColumn(): array
return $this->wrappedResult->fetchFirstColumn();
}
- public function rowCount(): int
+ public function rowCount(): int|string
{
return $this->wrappedResult->rowCount();
}
diff --git a/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php b/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php
index 6cd2f8f08..6eaad509f 100644
--- a/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php
+++ b/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php
@@ -1,71 +1,26 @@
wrappedStatement = $wrappedStatement;
}
- /**
- * {@inheritDoc}
- */
- public function bindValue($param, $value, $type = ParameterType::STRING)
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- return $this->wrappedStatement->bindValue($param, $value, $type);
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@see bindValue()} instead.
- */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- return $this->wrappedStatement->bindParam($param, $variable, $type, $length);
+ $this->wrappedStatement->bindValue($param, $value, $type);
}
- /**
- * {@inheritDoc}
- */
- public function execute($params = null): Result
+ public function execute(): Result
{
- return $this->wrappedStatement->execute($params);
+ return $this->wrappedStatement->execute();
}
}
diff --git a/doctrine/dbal/src/Driver/Mysqli/Connection.php b/doctrine/dbal/src/Driver/Mysqli/Connection.php
index d492684cc..cc00fb62c 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Connection.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Connection.php
@@ -1,48 +1,25 @@
connection = $connection;
- }
-
- /**
- * Retrieves mysqli native resource handle.
- *
- * Could be used if part of your application is not using DBAL.
- *
- * @deprecated Call {@see getNativeConnection()} instead.
- */
- public function getWrappedResourceHandle(): mysqli
+ public function __construct(private readonly mysqli $connection)
{
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5037',
- '%s is deprecated, call getNativeConnection() instead.',
- __METHOD__,
- );
-
- return $this->getNativeConnection();
}
public function getServerVersion(): string
@@ -50,7 +27,7 @@ public function getServerVersion(): string
return $this->connection->get_server_info();
}
- public function prepare(string $sql): DriverStatement
+ public function prepare(string $sql): Statement
{
try {
$stmt = $this->connection->prepare($sql);
@@ -65,20 +42,17 @@ public function prepare(string $sql): DriverStatement
return new Statement($stmt);
}
- public function query(string $sql): ResultInterface
+ public function query(string $sql): Result
{
return $this->prepare($sql)->execute();
}
- /**
- * {@inheritDoc}
- */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
return "'" . $this->connection->escape_string($value) . "'";
}
- public function exec(string $sql): int
+ public function exec(string $sql): int|string
{
try {
$result = $this->connection->query($sql);
@@ -93,44 +67,41 @@ public function exec(string $sql): int
return $this->connection->affected_rows;
}
- /**
- * {@inheritDoc}
- */
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
- if ($name !== null) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
+ $lastInsertId = $this->connection->insert_id;
+
+ if ($lastInsertId === 0) {
+ throw Exception\NoIdentityValue::new();
}
return $this->connection->insert_id;
}
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
$this->connection->begin_transaction();
-
- return true;
}
- public function commit(): bool
+ public function commit(): void
{
try {
- return $this->connection->commit();
+ if (! $this->connection->commit()) {
+ throw ConnectionError::new($this->connection);
+ }
} catch (mysqli_sql_exception $e) {
- return false;
+ throw ConnectionError::upcast($e);
}
}
- public function rollBack(): bool
+ public function rollBack(): void
{
try {
- return $this->connection->rollback();
+ if (! $this->connection->rollback()) {
+ throw ConnectionError::new($this->connection);
+ }
} catch (mysqli_sql_exception $e) {
- return false;
+ throw ConnectionError::upcast($e);
}
}
diff --git a/doctrine/dbal/src/Driver/Mysqli/Driver.php b/doctrine/dbal/src/Driver/Mysqli/Driver.php
index 4f5186875..9855e565d 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Driver.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Driver.php
@@ -1,5 +1,7 @@
real_connect(
$host,
- $params['user'] ?? null,
- $params['password'] ?? null,
- $params['dbname'] ?? null,
- $params['port'] ?? null,
- $params['unix_socket'] ?? null,
+ $params['user'] ?? '',
+ $params['password'] ?? '',
+ $params['dbname'] ?? '',
+ $params['port'] ?? 0,
+ $params['unix_socket'] ?? '',
$params['driverOptions'][Connection::OPTION_FLAGS] ?? 0,
);
} catch (mysqli_sql_exception $e) {
@@ -72,7 +72,7 @@ public function connect(
*/
private function compilePreInitializers(
#[SensitiveParameter]
- array $params
+ array $params,
): Generator {
unset($params['driverOptions'][Connection::OPTION_FLAGS]);
@@ -106,7 +106,7 @@ private function compilePreInitializers(
*/
private function compilePostInitializers(
#[SensitiveParameter]
- array $params
+ array $params,
): Generator {
if (! isset($params['charset'])) {
return;
diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php
index ef5b98017..d2477fdba 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php
@@ -24,8 +24,7 @@ public static function new(mysqli $connection): self
public static function upcast(mysqli_sql_exception $exception): self
{
$p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate');
- $p->setAccessible(true);
- return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception);
+ return new self($exception->getMessage(), $p->getValue($exception), $exception->getCode(), $exception);
}
}
diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php
index 44a8cab99..cb3bc64f7 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php
@@ -29,8 +29,7 @@ public static function new(mysqli $connection): self
public static function upcast(mysqli_sql_exception $exception): self
{
$p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate');
- $p->setAccessible(true);
- return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception);
+ return new self($exception->getMessage(), $p->getValue($exception), $exception->getCode(), $exception);
}
}
diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php b/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php
index 8c6bbb476..778ea6451 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php
@@ -30,12 +30,11 @@ public static function fromCharset(mysqli $connection, string $charset): self
public static function upcast(mysqli_sql_exception $exception, string $charset): self
{
$p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate');
- $p->setAccessible(true);
return new self(
sprintf('Failed to set charset "%s": %s', $charset, $exception->getMessage()),
$p->getValue($exception),
- (int) $exception->getCode(),
+ $exception->getCode(),
$exception,
);
}
diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php b/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php
index 6fb46316e..654bb87b2 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidOption.php
@@ -15,8 +15,7 @@
*/
final class InvalidOption extends AbstractException
{
- /** @param mixed $value */
- public static function fromOption(int $option, $value): self
+ public static function fromOption(int $option, mixed $value): self
{
return new self(
sprintf('Failed to set option %d with value "%s"', $option, $value),
diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php b/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php
index 78dc8556b..991384cd9 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php
@@ -24,8 +24,7 @@ public static function new(mysqli_stmt $statement): self
public static function upcast(mysqli_sql_exception $exception): self
{
$p = new ReflectionProperty(mysqli_sql_exception::class, 'sqlstate');
- $p->setAccessible(true);
- return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception);
+ return new self($exception->getMessage(), $p->getValue($exception), $exception->getCode(), $exception);
}
}
diff --git a/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php b/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
index 8143a265c..d02c76841 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
@@ -11,11 +11,8 @@
final class Charset implements Initializer
{
- private string $charset;
-
- public function __construct(string $charset)
+ public function __construct(private readonly string $charset)
{
- $this->charset = $charset;
}
public function initialize(mysqli $connection): void
diff --git a/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php b/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php
index 2e66f8d69..322395135 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Initializer/Options.php
@@ -12,13 +12,9 @@
final class Options implements Initializer
{
- /** @var array */
- private array $options;
-
/** @param array $options */
- public function __construct(array $options)
+ public function __construct(private readonly array $options)
{
- $this->options = $options;
}
public function initialize(mysqli $connection): void
diff --git a/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php b/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php
index a25fcfc2d..fa819b5a2 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Initializer/Secure.php
@@ -10,25 +10,14 @@
final class Secure implements Initializer
{
- private string $key;
- private string $cert;
- private string $ca;
- private string $capath;
- private string $cipher;
-
public function __construct(
#[SensitiveParameter]
- string $key,
- string $cert,
- string $ca,
- string $capath,
- string $cipher
+ private readonly string $key,
+ private readonly string $cert,
+ private readonly string $ca,
+ private readonly string $capath,
+ private readonly string $cipher,
) {
- $this->key = $key;
- $this->cert = $cert;
- $this->ca = $ca;
- $this->capath = $capath;
- $this->cipher = $cipher;
}
public function initialize(mysqli $connection): void
diff --git a/doctrine/dbal/src/Driver/Mysqli/Result.php b/doctrine/dbal/src/Driver/Mysqli/Result.php
index c7dc65d1d..8d3c47af5 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Result.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Result.php
@@ -18,13 +18,11 @@
final class Result implements ResultInterface
{
- private mysqli_stmt $statement;
-
/**
* Whether the statement result has columns. The property should be used only after the result metadata
* has been fetched ({@see $metadataFetched}). Otherwise, the property value is undetermined.
*/
- private bool $hasColumns = false;
+ private readonly bool $hasColumns;
/**
* Mapping of statement result column indexes to their names. The property should be used only
@@ -32,7 +30,7 @@ final class Result implements ResultInterface
*
* @var array
*/
- private array $columnNames = [];
+ private readonly array $columnNames;
/** @var mixed[] */
private array $boundValues = [];
@@ -42,20 +40,16 @@ final class Result implements ResultInterface
*
* @throws Exception
*/
- public function __construct(mysqli_stmt $statement)
+ public function __construct(private readonly mysqli_stmt $statement)
{
- $this->statement = $statement;
-
- $meta = $statement->result_metadata();
+ $meta = $statement->result_metadata();
+ $this->hasColumns = $meta !== false;
+ $this->columnNames = $meta !== false ? array_column($meta->fetch_fields(), 'name') : [];
if ($meta === false) {
return;
}
- $this->hasColumns = true;
-
- $this->columnNames = array_column($meta->fetch_fields(), 'name');
-
$meta->free();
// Store result of every execution which has it. Otherwise it will be impossible
@@ -84,10 +78,7 @@ public function __construct(mysqli_stmt $statement)
}
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
try {
$ret = $this->statement->fetch();
@@ -112,10 +103,7 @@ public function fetchNumeric()
return $values;
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
$values = $this->fetchNumeric();
@@ -126,10 +114,7 @@ public function fetchAssociative()
return array_combine($this->columnNames, $values);
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return FetchUtils::fetchOne($this);
}
@@ -158,7 +143,7 @@ public function fetchFirstColumn(): array
return FetchUtils::fetchFirstColumn($this);
}
- public function rowCount(): int
+ public function rowCount(): int|string
{
if ($this->hasColumns) {
return $this->statement->num_rows;
diff --git a/doctrine/dbal/src/Driver/Mysqli/Statement.php b/doctrine/dbal/src/Driver/Mysqli/Statement.php
index fec7c95c3..8436fadfc 100644
--- a/doctrine/dbal/src/Driver/Mysqli/Statement.php
+++ b/doctrine/dbal/src/Driver/Mysqli/Statement.php
@@ -1,16 +1,15 @@
's',
- ParameterType::STRING => 's',
- ParameterType::BINARY => 's',
- ParameterType::BOOLEAN => 'i',
- ParameterType::NULL => 's',
- ParameterType::INTEGER => 'i',
- ParameterType::LARGE_OBJECT => 'b',
- ];
-
- private mysqli_stmt $stmt;
+ private const PARAMETER_TYPE_STRING = 's';
+ private const PARAMETER_TYPE_INTEGER = 'i';
+ private const PARAMETER_TYPE_BINARY = 'b';
/** @var mixed[] */
private array $boundValues;
@@ -52,113 +42,36 @@ final class Statement implements StatementInterface
private array $values = [];
/** @internal The statement can be only instantiated by its driver connection. */
- public function __construct(mysqli_stmt $stmt)
+ public function __construct(private readonly mysqli_stmt $stmt)
{
- $this->stmt = $stmt;
-
$paramCount = $this->stmt->param_count;
- $this->types = str_repeat('s', $paramCount);
+ $this->types = str_repeat(self::PARAMETER_TYPE_STRING, $paramCount);
$this->boundValues = array_fill(1, $paramCount, null);
}
- /**
- * @deprecated Use {@see bindValue()} instead.
- *
- * {@inheritDoc}
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- assert(is_int($param));
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- if (! isset(self::PARAM_TYPE_MAP[$type])) {
- throw UnknownParameterType::new($type);
- }
-
- $this->boundValues[$param] =& $variable;
- $this->types[$param - 1] = self::PARAM_TYPE_MAP[$type];
-
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
assert(is_int($param));
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- if (! isset(self::PARAM_TYPE_MAP[$type])) {
- throw UnknownParameterType::new($type);
- }
-
+ $this->types[$param - 1] = $this->convertParameterType($type);
$this->values[$param] = $value;
$this->boundValues[$param] =& $this->values[$param];
- $this->types[$param - 1] = self::PARAM_TYPE_MAP[$type];
-
- return true;
}
- /**
- * {@inheritDoc}
- */
- public function execute($params = null): ResultInterface
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
+ if (count($this->boundValues) > 0) {
+ $this->bindParameters();
}
- if ($params !== null && count($params) > 0) {
- if (! $this->bindUntypedValues($params)) {
+ try {
+ if (! $this->stmt->execute()) {
throw StatementError::new($this->stmt);
}
- } elseif (count($this->boundValues) > 0) {
- $this->bindTypedParameters();
- }
-
- try {
- $result = $this->stmt->execute();
} catch (mysqli_sql_exception $e) {
throw StatementError::upcast($e);
}
- if (! $result) {
- throw StatementError::new($this->stmt);
- }
-
return new Result($this->stmt);
}
@@ -167,19 +80,18 @@ public function execute($params = null): ResultInterface
*
* @throws Exception
*/
- private function bindTypedParameters(): void
+ private function bindParameters(): void
{
$streams = $values = [];
$types = $this->types;
foreach ($this->boundValues as $parameter => $value) {
assert(is_int($parameter));
-
if (! isset($types[$parameter - 1])) {
- $types[$parameter - 1] = self::PARAM_TYPE_MAP[ParameterType::STRING];
+ $types[$parameter - 1] = self::PARAMETER_TYPE_STRING;
}
- if ($types[$parameter - 1] === self::PARAM_TYPE_MAP[ParameterType::LARGE_OBJECT]) {
+ if ($types[$parameter - 1] === self::PARAMETER_TYPE_BINARY) {
if (is_resource($value)) {
if (get_resource_type($value) !== 'stream') {
throw NonStreamResourceUsedAsLargeObject::new($parameter);
@@ -190,7 +102,7 @@ private function bindTypedParameters(): void
continue;
}
- $types[$parameter - 1] = self::PARAM_TYPE_MAP[ParameterType::STRING];
+ $types[$parameter - 1] = self::PARAMETER_TYPE_STRING;
}
$values[$parameter] = $value;
@@ -227,13 +139,16 @@ private function sendLongData(array $streams): void
}
}
- /**
- * Binds a array of values to bound parameters.
- *
- * @param mixed[] $values
- */
- private function bindUntypedValues(array $values): bool
+ private function convertParameterType(ParameterType $type): string
{
- return $this->stmt->bind_param(str_repeat('s', count($values)), ...$values);
+ return match ($type) {
+ ParameterType::NULL,
+ ParameterType::STRING,
+ ParameterType::ASCII,
+ ParameterType::BINARY => self::PARAMETER_TYPE_STRING,
+ ParameterType::INTEGER,
+ ParameterType::BOOLEAN => self::PARAMETER_TYPE_INTEGER,
+ ParameterType::LARGE_OBJECT => self::PARAMETER_TYPE_BINARY,
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/OCI8/Connection.php b/doctrine/dbal/src/Driver/OCI8/Connection.php
index 72353fa31..3652ca0eb 100644
--- a/doctrine/dbal/src/Driver/OCI8/Connection.php
+++ b/doctrine/dbal/src/Driver/OCI8/Connection.php
@@ -1,21 +1,17 @@
connection = $connection;
$this->parser = new Parser(false);
$this->executionMode = new ExecutionMode();
}
@@ -47,10 +39,7 @@ public function __construct($connection)
public function getServerVersion(): string
{
$version = oci_server_version($this->connection);
-
- if ($version === false) {
- throw Error::new($this->connection);
- }
+ assert($version !== false);
$result = preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches);
assert($result === 1);
@@ -59,7 +48,7 @@ public function getServerVersion(): string
}
/** @throws Parser\Exception */
- public function prepare(string $sql): DriverStatement
+ public function prepare(string $sql): Statement
{
$visitor = new ConvertPositionalToNamedPlaceholders();
@@ -75,91 +64,51 @@ public function prepare(string $sql): DriverStatement
* @throws Exception
* @throws Parser\Exception
*/
- public function query(string $sql): ResultInterface
+ public function query(string $sql): Result
{
return $this->prepare($sql)->execute();
}
- /**
- * {@inheritDoc}
- */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- if (is_int($value) || is_float($value)) {
- return $value;
- }
-
- $value = str_replace("'", "''", $value);
-
- return "'" . addcslashes($value, "\000\n\r\\\032") . "'";
+ return "'" . addcslashes(str_replace("'", "''", $value), "\000\n\r\\\032") . "'";
}
/**
* @throws Exception
* @throws Parser\Exception
*/
- public function exec(string $sql): int
+ public function exec(string $sql): int|string
{
return $this->prepare($sql)->execute()->rowCount();
}
- /**
- * {@inheritDoc}
- *
- * @param string|null $name
- *
- * @return int|false
- *
- * @throws Parser\Exception
- */
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
- if ($name === null) {
- return false;
- }
-
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
-
- $result = $this->query('SELECT ' . $name . '.CURRVAL FROM DUAL')->fetchOne();
-
- if ($result === false) {
- throw SequenceDoesNotExist::new();
- }
-
- return (int) $result;
+ throw IdentityColumnsNotSupported::new();
}
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
$this->executionMode->disableAutoCommit();
-
- return true;
}
- public function commit(): bool
+ public function commit(): void
{
if (! oci_commit($this->connection)) {
throw Error::new($this->connection);
}
$this->executionMode->enableAutoCommit();
-
- return true;
}
- public function rollBack(): bool
+ public function rollBack(): void
{
if (! oci_rollback($this->connection)) {
throw Error::new($this->connection);
}
$this->executionMode->enableAutoCommit();
-
- return true;
}
/** @return resource */
diff --git a/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php b/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php
index e2a112629..5898a2c5e 100644
--- a/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php
+++ b/doctrine/dbal/src/Driver/OCI8/ConvertPositionalToNamedPlaceholders.php
@@ -1,5 +1,7 @@
getEasyConnectString($params);
+ /** @psalm-suppress RiskyTruthyFalsyComparison */
$persistent = ! empty($params['persistent']);
- $exclusive = ! empty($params['driverOptions']['exclusive']);
+ /** @psalm-suppress RiskyTruthyFalsyComparison */
+ $exclusive = ! empty($params['driverOptions']['exclusive']);
if ($persistent && $exclusive) {
throw InvalidConfiguration::forPersistentAndExclusive();
diff --git a/doctrine/dbal/src/Driver/OCI8/Exception/SequenceDoesNotExist.php b/doctrine/dbal/src/Driver/OCI8/Exception/SequenceDoesNotExist.php
deleted file mode 100644
index 5fa43caba..000000000
--- a/doctrine/dbal/src/Driver/OCI8/Exception/SequenceDoesNotExist.php
+++ /dev/null
@@ -1,20 +0,0 @@
-statement = $statement;
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
return $this->fetch(OCI_NUM);
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
return $this->fetch(OCI_ASSOC);
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return FetchUtils::fetchOne($this);
}
@@ -113,12 +100,8 @@ public function free(): void
oci_cancel($this->statement);
}
- /**
- * @return mixed|false
- *
- * @throws Exception
- */
- private function fetch(int $mode)
+ /** @throws Exception */
+ private function fetch(int $mode): mixed
{
$result = oci_fetch_array($this->statement, $mode | OCI_RETURN_NULLS | OCI_RETURN_LOBS);
diff --git a/doctrine/dbal/src/Driver/OCI8/Statement.php b/doctrine/dbal/src/Driver/OCI8/Statement.php
index 015a14b7b..408f0dd5d 100644
--- a/doctrine/dbal/src/Driver/OCI8/Statement.php
+++ b/doctrine/dbal/src/Driver/OCI8/Statement.php
@@ -1,15 +1,14 @@
*/
- private array $parameterMap;
-
- private ExecutionMode $executionMode;
-
/**
* @internal The statement can be only instantiated by its driver connection.
*
@@ -43,54 +31,16 @@ final class Statement implements StatementInterface
* @param resource $statement
* @param array $parameterMap
*/
- public function __construct($connection, $statement, array $parameterMap, ExecutionMode $executionMode)
- {
- $this->connection = $connection;
- $this->statement = $statement;
- $this->parameterMap = $parameterMap;
- $this->executionMode = $executionMode;
+ public function __construct(
+ private readonly mixed $connection,
+ private readonly mixed $statement,
+ private readonly array $parameterMap,
+ private readonly ExecutionMode $executionMode,
+ ) {
}
- /**
- * {@inheritDoc}
- */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
- {
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- return $this->bindParam($param, $value, $type);
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@see bindValue()} instead.
- */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
if (is_int($param)) {
if (! isset($this->parameterMap[$param])) {
throw UnknownParameterIndex::new($param);
@@ -100,64 +50,43 @@ public function bindParam($param, &$variable, $type = ParameterType::STRING, $le
}
if ($type === ParameterType::LARGE_OBJECT) {
- if ($variable !== null) {
+ if ($value !== null) {
$lob = oci_new_descriptor($this->connection, OCI_D_LOB);
- $lob->writeTemporary($variable, OCI_TEMP_BLOB);
+ $lob->writeTemporary($value, OCI_TEMP_BLOB);
- $variable =& $lob;
+ $value =& $lob;
} else {
$type = ParameterType::STRING;
}
}
- return oci_bind_by_name(
- $this->statement,
- $param,
- $variable,
- $length ?? -1,
- $this->convertParameterType($type),
- );
+ if (
+ ! @oci_bind_by_name(
+ $this->statement,
+ $param,
+ $value,
+ -1,
+ $this->convertParameterType($type),
+ )
+ ) {
+ throw Error::new($this->statement);
+ }
}
/**
* Converts DBAL parameter type to oci8 parameter type
*/
- private function convertParameterType(int $type): int
+ private function convertParameterType(ParameterType $type): int
{
- switch ($type) {
- case ParameterType::BINARY:
- return OCI_B_BIN;
-
- case ParameterType::LARGE_OBJECT:
- return OCI_B_BLOB;
-
- default:
- return SQLT_CHR;
- }
+ return match ($type) {
+ ParameterType::BINARY => OCI_B_BIN,
+ ParameterType::LARGE_OBJECT => OCI_B_BLOB,
+ default => SQLT_CHR,
+ };
}
- /**
- * {@inheritDoc}
- */
- public function execute($params = null): ResultInterface
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
-
- foreach ($params as $key => $val) {
- if (is_int($key)) {
- $this->bindValue($key + 1, $val, ParameterType::STRING);
- } else {
- $this->bindValue($key, $val, ParameterType::STRING);
- }
- }
- }
-
if ($this->executionMode->isAutoCommitEnabled()) {
$mode = OCI_COMMIT_ON_SUCCESS;
} else {
diff --git a/doctrine/dbal/src/Driver/PDO/Connection.php b/doctrine/dbal/src/Driver/PDO/Connection.php
index 290dcc2d2..b1faca147 100644
--- a/doctrine/dbal/src/Driver/PDO/Connection.php
+++ b/doctrine/dbal/src/Driver/PDO/Connection.php
@@ -1,30 +1,24 @@
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-
- $this->connection = $connection;
}
public function exec(string $sql): int
@@ -40,20 +34,12 @@ public function exec(string $sql): int
}
}
- /**
- * {@inheritDoc}
- */
- public function getServerVersion()
+ public function getServerVersion(): string
{
return $this->connection->getAttribute(PDO::ATTR_SERVER_VERSION);
}
- /**
- * {@inheritDoc}
- *
- * @return Statement
- */
- public function prepare(string $sql): StatementInterface
+ public function prepare(string $sql): Statement
{
try {
$stmt = $this->connection->prepare($sql);
@@ -65,7 +51,7 @@ public function prepare(string $sql): StatementInterface
}
}
- public function query(string $sql): ResultInterface
+ public function query(string $sql): Result
{
try {
$stmt = $this->connection->query($sql);
@@ -77,64 +63,66 @@ public function query(string $sql): ResultInterface
}
}
- /**
- * {@inheritDoc}
- *
- * @throws UnknownParameterType
- *
- * @psalm-assert ParameterType::* $type
- */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- return $this->connection->quote($value, ParameterTypeMap::convertParamType($type));
+ return $this->connection->quote($value);
}
- /**
- * {@inheritDoc}
- */
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
try {
- if ($name === null) {
- return $this->connection->lastInsertId();
+ $value = $this->connection->lastInsertId();
+ } catch (PDOException $exception) {
+ assert($exception->errorInfo !== null);
+ [$sqlState] = $exception->errorInfo;
+
+ // if the PDO driver does not support this capability, PDO::lastInsertId() triggers an IM001 SQLSTATE
+ // see https://www.php.net/manual/en/pdo.lastinsertid.php
+ if ($sqlState === 'IM001') {
+ throw IdentityColumnsNotSupported::new();
}
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
+ // PDO PGSQL throws a 'lastval is not yet defined in this session' error when no identity value is
+ // available, with SQLSTATE 55000 'Object Not In Prerequisite State'
+ if ($sqlState === '55000' && $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME) === 'pgsql') {
+ throw NoIdentityValue::new($exception);
+ }
- return $this->connection->lastInsertId($name);
- } catch (PDOException $exception) {
throw Exception::new($exception);
}
+
+ // pdo_mysql & pdo_sqlite return '0', pdo_sqlsrv returns '' or false depending on the PHP version
+ if ($value === '0' || $value === '' || $value === false) {
+ throw NoIdentityValue::new();
+ }
+
+ return $value;
}
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
try {
- return $this->connection->beginTransaction();
+ $this->connection->beginTransaction();
} catch (PDOException $exception) {
- throw DriverPDOException::new($exception);
+ throw Exception::new($exception);
}
}
- public function commit(): bool
+ public function commit(): void
{
try {
- return $this->connection->commit();
+ $this->connection->commit();
} catch (PDOException $exception) {
- throw DriverPDOException::new($exception);
+ throw Exception::new($exception);
}
}
- public function rollBack(): bool
+ public function rollBack(): void
{
try {
- return $this->connection->rollBack();
+ $this->connection->rollBack();
} catch (PDOException $exception) {
- throw DriverPDOException::new($exception);
+ throw Exception::new($exception);
}
}
@@ -142,17 +130,4 @@ public function getNativeConnection(): PDO
{
return $this->connection;
}
-
- /** @deprecated Call {@see getNativeConnection()} instead. */
- public function getWrappedConnection(): PDO
- {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5037',
- '%s is deprecated, call getNativeConnection() instead.',
- __METHOD__,
- );
-
- return $this->getNativeConnection();
- }
}
diff --git a/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php b/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php
index 2492698b4..963fef04b 100644
--- a/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php
@@ -1,5 +1,7 @@
message, 0, $previous);
-
- $exception->errorInfo = $previous->errorInfo;
- $exception->code = $previous->code;
- $exception->sqlState = $previous->errorInfo[0] ?? null;
-
- return $exception;
- }
-
- public function getSQLState(): ?string
- {
- return $this->sqlState;
- }
-}
diff --git a/doctrine/dbal/src/Driver/PDO/ParameterTypeMap.php b/doctrine/dbal/src/Driver/PDO/ParameterTypeMap.php
deleted file mode 100644
index f17b585f7..000000000
--- a/doctrine/dbal/src/Driver/PDO/ParameterTypeMap.php
+++ /dev/null
@@ -1,49 +0,0 @@
- PDO::PARAM_NULL,
- ParameterType::INTEGER => PDO::PARAM_INT,
- ParameterType::STRING => PDO::PARAM_STR,
- ParameterType::ASCII => PDO::PARAM_STR,
- ParameterType::BINARY => PDO::PARAM_LOB,
- ParameterType::LARGE_OBJECT => PDO::PARAM_LOB,
- ParameterType::BOOLEAN => PDO::PARAM_BOOL,
- ];
-
- /**
- * Converts DBAL parameter type to PDO parameter type
- *
- * @psalm-return PDO::PARAM_*
- *
- * @throws UnknownParameterType
- *
- * @psalm-assert ParameterType::* $type
- */
- public static function convertParamType(int $type): int
- {
- if (! isset(self::PARAM_TYPE_MAP[$type])) {
- throw UnknownParameterType::new($type);
- }
-
- return self::PARAM_TYPE_MAP[$type];
- }
-
- private function __construct()
- {
- }
-
- private function __clone()
- {
- }
-}
diff --git a/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php b/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php
index 5bfcd730c..a267e8407 100644
--- a/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php
@@ -1,11 +1,12 @@
statement = $statement;
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
return $this->fetch(PDO::FETCH_NUM);
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
return $this->fetch(PDO::FETCH_ASSOC);
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return $this->fetch(PDO::FETCH_COLUMN);
}
@@ -93,11 +81,9 @@ public function free(): void
/**
* @psalm-param PDO::FETCH_* $mode
*
- * @return mixed
- *
* @throws Exception
*/
- private function fetch(int $mode)
+ private function fetch(int $mode): mixed
{
try {
return $this->statement->fetch($mode);
diff --git a/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php b/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php
index 9015f5558..78ba7f821 100644
--- a/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php
+++ b/doctrine/dbal/src/Driver/PDO/SQLSrv/Connection.php
@@ -1,70 +1,29 @@
connection = $connection;
}
- public function prepare(string $sql): StatementInterface
+ public function prepare(string $sql): Statement
{
return new Statement(
$this->connection->prepare($sql),
);
}
- /**
- * {@inheritDoc}
- */
- public function lastInsertId($name = null)
- {
- if ($name === null) {
- return parent::lastInsertId($name);
- }
-
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
-
- $statement = $this->prepare(
- 'SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?',
- );
- $statement->bindValue(1, $name);
-
- return $statement->execute()
- ->fetchOne();
- }
-
public function getNativeConnection(): PDO
{
return $this->connection->getNativeConnection();
}
-
- /** @deprecated Call {@see getNativeConnection()} instead. */
- public function getWrappedConnection(): PDO
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5037',
- '%s is deprecated, call getNativeConnection() instead.',
- __METHOD__,
- );
-
- return $this->connection->getWrappedConnection();
- }
}
diff --git a/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php b/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php
index 63eabb71a..a3cae9785 100644
--- a/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php
@@ -1,5 +1,7 @@
statement = $statement;
}
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@see bindValue()} instead.
- *
- * @param string|int $param
- * @param mixed $variable
- * @param int $type
- * @param int|null $length
- * @param mixed $driverOptions The usage of the argument is deprecated.
- *
- * @throws UnknownParameterType
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindParam(
- $param,
- &$variable,
- $type = ParameterType::STRING,
- $length = null,
- $driverOptions = null
- ): bool {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- if (func_num_args() > 4) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4533',
- 'The $driverOptions argument of Statement::bindParam() is deprecated.',
- );
- }
-
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
+ {
switch ($type) {
case ParameterType::LARGE_OBJECT:
case ParameterType::BINARY:
- $driverOptions ??= PDO::SQLSRV_ENCODING_BINARY;
-
+ $this->statement->bindParamWithDriverOptions(
+ $param,
+ $value,
+ $type,
+ PDO::SQLSRV_ENCODING_BINARY,
+ );
break;
case ParameterType::ASCII:
- $type = ParameterType::STRING;
- $length = 0;
- $driverOptions = PDO::SQLSRV_ENCODING_SYSTEM;
+ $this->statement->bindParamWithDriverOptions(
+ $param,
+ $value,
+ ParameterType::STRING,
+ PDO::SQLSRV_ENCODING_SYSTEM,
+ );
break;
- }
- return $this->statement->bindParam($param, $variable, $type, $length ?? 0, $driverOptions);
- }
-
- /**
- * @throws UnknownParameterType
- *
- * {@inheritDoc}
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
- {
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
+ default:
+ $this->statement->bindValue($param, $value, $type);
}
-
- return $this->bindParam($param, $value, $type);
}
}
diff --git a/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php b/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php
index 2e97788e6..74194a59c 100644
--- a/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php
@@ -1,12 +1,12 @@
constructPdoDsn(array_intersect_key($params, ['path' => true, 'memory' => true])),
$params['user'] ?? '',
$params['password'] ?? '',
- $driverOptions,
+ $params['driverOptions'] ?? [],
);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
- UserDefinedFunctions::register(
- [$pdo, 'sqliteCreateFunction'],
- $userDefinedFunctions,
- );
-
return new Connection($pdo);
}
diff --git a/doctrine/dbal/src/Driver/PDO/Statement.php b/doctrine/dbal/src/Driver/PDO/Statement.php
index 64f318d2c..4f0e070b7 100644
--- a/doctrine/dbal/src/Driver/PDO/Statement.php
+++ b/doctrine/dbal/src/Driver/PDO/Statement.php
@@ -1,137 +1,80 @@
stmt = $stmt;
}
- /**
- * {@inheritDoc}
- *
- * @throws UnknownParameterType
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindValue($param, $value, $type = ParameterType::STRING)
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- $pdoType = ParameterTypeMap::convertParamType($type);
+ $pdoType = $this->convertParamType($type);
try {
- return $this->stmt->bindValue($param, $value, $pdoType);
+ $this->stmt->bindValue($param, $value, $pdoType);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
- * {@inheritDoc}
- *
- * @deprecated Use {@see bindValue()} instead.
- *
- * @param mixed $param
- * @param mixed $variable
- * @param int $type
- * @param int|null $length
- * @param mixed $driverOptions The usage of the argument is deprecated.
+ * @internal Driver options can be only specified by a PDO-based driver.
*
- * @throws UnknownParameterType
- *
- * @psalm-assert ParameterType::* $type
+ * @throws ExceptionInterface
*/
- public function bindParam(
- $param,
- &$variable,
- $type = ParameterType::STRING,
- $length = null,
- $driverOptions = null
- ): bool {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- if (func_num_args() > 4) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4533',
- 'The $driverOptions argument of Statement::bindParam() is deprecated.',
- );
- }
-
- $pdoType = ParameterTypeMap::convertParamType($type);
+ public function bindParamWithDriverOptions(
+ string|int $param,
+ mixed &$variable,
+ ParameterType $type,
+ mixed $driverOptions,
+ ): void {
+ $pdoType = $this->convertParamType($type);
try {
- return $this->stmt->bindParam(
- $param,
- $variable,
- $pdoType,
- $length ?? 0,
- ...array_slice(func_get_args(), 4),
- );
+ $this->stmt->bindParam($param, $variable, $pdoType, 0, $driverOptions);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
- /**
- * {@inheritDoc}
- */
- public function execute($params = null): ResultInterface
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
- }
-
try {
- $this->stmt->execute($params);
+ $this->stmt->execute();
} catch (PDOException $exception) {
throw Exception::new($exception);
}
return new Result($this->stmt);
}
+
+ /**
+ * Converts DBAL parameter type to PDO parameter type
+ *
+ * @psalm-return PDO::PARAM_*
+ */
+ private function convertParamType(ParameterType $type): int
+ {
+ return match ($type) {
+ ParameterType::NULL => PDO::PARAM_NULL,
+ ParameterType::INTEGER => PDO::PARAM_INT,
+ ParameterType::STRING,
+ ParameterType::ASCII => PDO::PARAM_STR,
+ ParameterType::BINARY,
+ ParameterType::LARGE_OBJECT => PDO::PARAM_LOB,
+ ParameterType::BOOLEAN => PDO::PARAM_BOOL,
+ };
+ }
}
diff --git a/doctrine/dbal/src/Driver/PgSQL/Connection.php b/doctrine/dbal/src/Driver/PgSQL/Connection.php
index 378e8ed7a..4f280b0dc 100644
--- a/doctrine/dbal/src/Driver/PgSQL/Connection.php
+++ b/doctrine/dbal/src/Driver/PgSQL/Connection.php
@@ -1,21 +1,16 @@
connection = $connection;
- $this->parser = new Parser(false);
+ $this->parser = new Parser(false);
}
public function __destruct()
@@ -94,13 +75,12 @@ public function query(string $sql): Result
}
/** {@inheritDoc} */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- if ($type === ParameterType::BINARY || $type === ParameterType::LARGE_OBJECT) {
- return sprintf("'%s'", pg_escape_bytea($this->connection, $value));
- }
+ $quotedValue = pg_escape_literal($this->connection, $value);
+ assert($quotedValue !== false);
- return pg_escape_literal($this->connection, $value);
+ return $quotedValue;
}
public function exec(string $sql): int
@@ -109,43 +89,32 @@ public function exec(string $sql): int
}
/** {@inheritDoc} */
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
- if ($name !== null) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
-
- return $this->query(sprintf('SELECT CURRVAL(%s)', $this->quote($name)))->fetchOne();
+ try {
+ return $this->query('SELECT LASTVAL()')->fetchOne();
+ } catch (Exception $exception) {
+ if ($exception->getSQLState() === '55000') {
+ throw NoIdentityValue::new($exception);
+ }
+
+ throw $exception;
}
-
- return $this->query('SELECT LASTVAL()')->fetchOne();
}
- /** @return true */
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
$this->exec('BEGIN');
-
- return true;
}
- /** @return true */
- public function commit(): bool
+ public function commit(): void
{
$this->exec('COMMIT');
-
- return true;
}
- /** @return true */
- public function rollBack(): bool
+ public function rollBack(): void
{
$this->exec('ROLLBACK');
-
- return true;
}
public function getServerVersion(): string
@@ -153,8 +122,7 @@ public function getServerVersion(): string
return (string) pg_version($this->connection)['server'];
}
- /** @return PgSqlConnection|resource */
- public function getNativeConnection()
+ public function getNativeConnection(): PgSqlConnection
{
return $this->connection;
}
diff --git a/doctrine/dbal/src/Driver/PgSQL/Driver.php b/doctrine/dbal/src/Driver/PgSQL/Driver.php
index 6377499a7..0d5d605f8 100644
--- a/doctrine/dbal/src/Driver/PgSQL/Driver.php
+++ b/doctrine/dbal/src/Driver/PgSQL/Driver.php
@@ -1,5 +1,7 @@
$params['sslmode'] ?? null,
'gssencmode' => $params['gssencmode'] ?? null,
],
- static fn ($value) => $value !== '' && $value !== null,
+ static fn (int|string|null $value) => $value !== '' && $value !== null,
);
return implode(' ', array_map(
- static fn ($value, string $key) => sprintf("%s='%s'", $key, addslashes($value)),
+ static fn (int|string $value, string $key) => sprintf("%s='%s'", $key, addslashes((string) $value)),
array_values($components),
array_keys($components),
));
diff --git a/doctrine/dbal/src/Driver/PgSQL/Exception.php b/doctrine/dbal/src/Driver/PgSQL/Exception.php
index 41e0dff19..3036e556d 100644
--- a/doctrine/dbal/src/Driver/PgSQL/Exception.php
+++ b/doctrine/dbal/src/Driver/PgSQL/Exception.php
@@ -1,5 +1,7 @@
result = $result;
}
@@ -61,7 +47,7 @@ public function __destruct()
}
/** {@inheritDoc} */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
if ($this->result === null) {
return false;
@@ -76,7 +62,7 @@ public function fetchNumeric()
}
/** {@inheritDoc} */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
if ($this->result === null) {
return false;
@@ -91,7 +77,7 @@ public function fetchAssociative()
}
/** {@inheritDoc} */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return FetchUtils::fetchOne($this);
}
@@ -103,17 +89,11 @@ public function fetchAllNumeric(): array
return [];
}
- $resultSet = pg_fetch_all($this->result, PGSQL_NUM);
- // On PHP 7.4, pg_fetch_all() might return false for empty result sets.
- if ($resultSet === false) {
- return [];
- }
-
$types = $this->fetchNumericColumnTypes();
return array_map(
fn (array $row) => $this->mapNumericRow($row, $types),
- $resultSet,
+ pg_fetch_all($this->result, PGSQL_NUM),
);
}
@@ -124,17 +104,11 @@ public function fetchAllAssociative(): array
return [];
}
- $resultSet = pg_fetch_all($this->result, PGSQL_ASSOC);
- // On PHP 7.4, pg_fetch_all() might return false for empty result sets.
- if ($resultSet === false) {
- return [];
- }
-
$types = $this->fetchAssociativeColumnTypes();
return array_map(
fn (array $row) => $this->mapAssociativeRow($row, $types),
- $resultSet,
+ pg_fetch_all($this->result, PGSQL_ASSOC),
);
}
@@ -244,39 +218,23 @@ private function mapAssociativeRow(array $row, array $types): array
return $mappedRow;
}
- /** @return string|int|float|bool|null */
- private function mapType(string $postgresType, ?string $value)
+ private function mapType(string $postgresType, ?string $value): string|int|float|bool|null
{
if ($value === null) {
return null;
}
- switch ($postgresType) {
- case 'bool':
- switch ($value) {
- case 't':
- return true;
- case 'f':
- return false;
- }
-
- throw UnexpectedValue::new($value, $postgresType);
-
- case 'bytea':
- return hex2bin(substr($value, 2));
-
- case 'float4':
- case 'float8':
- return (float) $value;
-
- case 'int2':
- case 'int4':
- return (int) $value;
-
- case 'int8':
- return PHP_INT_SIZE >= 8 ? (int) $value : $value;
- }
-
- return $value;
+ return match ($postgresType) {
+ 'bool' => match ($value) {
+ 't' => true,
+ 'f' => false,
+ default => throw UnexpectedValue::new($value, $postgresType),
+ },
+ 'bytea' => hex2bin(substr($value, 2)),
+ 'float4', 'float8' => (float) $value,
+ 'int2', 'int4' => (int) $value,
+ 'int8' => PHP_INT_SIZE >= 8 ? (int) $value : $value,
+ default => $value,
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/PgSQL/Statement.php b/doctrine/dbal/src/Driver/PgSQL/Statement.php
index 75af66f30..b48ab5d83 100644
--- a/doctrine/dbal/src/Driver/PgSQL/Statement.php
+++ b/doctrine/dbal/src/Driver/PgSQL/Statement.php
@@ -1,20 +1,15 @@
*/
- private array $parameterMap;
-
/** @var array */
private array $parameters = [];
- /** @psalm-var array */
+ /** @psalm-var array */
private array $parameterTypes = [];
- /**
- * @param PgSqlConnection|resource $connection
- * @param array $parameterMap
- */
- public function __construct($connection, string $name, array $parameterMap)
- {
- if (! is_resource($connection) && ! $connection instanceof PgSqlConnection) {
- throw new TypeError(sprintf(
- 'Expected connection to be a resource or an instance of %s, got %s.',
- PgSqlConnection::class,
- is_object($connection) ? get_class($connection) : gettype($connection),
- ));
- }
-
- $this->connection = $connection;
- $this->name = $name;
- $this->parameterMap = $parameterMap;
+ /** @param array $parameterMap */
+ public function __construct(
+ private readonly PgSqlConnection $connection,
+ private readonly string $name,
+ private readonly array $parameterMap,
+ ) {
}
public function __destruct()
@@ -75,7 +50,7 @@ public function __destruct()
}
/** {@inheritDoc} */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
+ public function bindValue(int|string $param, mixed $value, ParameterType $type = ParameterType::STRING): void
{
if (! isset($this->parameterMap[$param])) {
throw UnknownParameter::new((string) $param);
@@ -83,82 +58,21 @@ public function bindValue($param, $value, $type = ParameterType::STRING): bool
$this->parameters[$this->parameterMap[$param]] = $value;
$this->parameterTypes[$this->parameterMap[$param]] = $type;
-
- return true;
- }
-
- /** {@inheritDoc} */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- if (func_num_args() > 4) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4533',
- 'The $driverOptions argument of Statement::bindParam() is deprecated.',
- );
- }
-
- if (! isset($this->parameterMap[$param])) {
- throw UnknownParameter::new((string) $param);
- }
-
- $this->parameters[$this->parameterMap[$param]] = &$variable;
- $this->parameterTypes[$this->parameterMap[$param]] = $type;
-
- return true;
}
/** {@inheritDoc} */
- public function execute($params = null): Result
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
-
- foreach ($params as $param => $value) {
- if (is_int($param)) {
- $this->bindValue($param + 1, $value, ParameterType::STRING);
- } else {
- $this->bindValue($param, $value, ParameterType::STRING);
- }
- }
- }
-
ksort($this->parameters);
$escapedParameters = [];
foreach ($this->parameters as $parameter => $value) {
- switch ($this->parameterTypes[$parameter]) {
- case ParameterType::BINARY:
- case ParameterType::LARGE_OBJECT:
- $escapedParameters[] = $value === null ? null : pg_escape_bytea(
- $this->connection,
- is_resource($value) ? stream_get_contents($value) : $value,
- );
- break;
- default:
- $escapedParameters[] = $value;
- }
+ $escapedParameters[] = match ($this->parameterTypes[$parameter]) {
+ ParameterType::BINARY, ParameterType::LARGE_OBJECT => $value === null
+ ? null
+ : pg_escape_bytea($this->connection, is_resource($value) ? stream_get_contents($value) : $value),
+ default => $value,
+ };
}
if (@pg_send_execute($this->connection, $this->name, $escapedParameters) !== true) {
diff --git a/doctrine/dbal/src/Driver/Result.php b/doctrine/dbal/src/Driver/Result.php
index 7843a9589..500cb8870 100644
--- a/doctrine/dbal/src/Driver/Result.php
+++ b/doctrine/dbal/src/Driver/Result.php
@@ -16,7 +16,7 @@ interface Result
*
* @throws Exception
*/
- public function fetchNumeric();
+ public function fetchNumeric(): array|false;
/**
* Returns the next row of the result as an associative array or FALSE if there are no more rows.
@@ -25,16 +25,14 @@ public function fetchNumeric();
*
* @throws Exception
*/
- public function fetchAssociative();
+ public function fetchAssociative(): array|false;
/**
* Returns the first value of the next row of the result or FALSE if there are no more rows.
*
- * @return mixed|false
- *
* @throws Exception
*/
- public function fetchOne();
+ public function fetchOne(): mixed;
/**
* Returns an array containing all of the result rows represented as numeric arrays.
@@ -70,11 +68,13 @@ public function fetchFirstColumn(): array;
* some database drivers may return the number of rows returned by that query. However, this behaviour
* is not guaranteed for all drivers and should not be relied on in portable applications.
*
- * @return int The number of rows.
+ * If the number of rows exceeds {@see PHP_INT_MAX}, it might be returned as string if the driver supports it.
+ *
+ * @return int|numeric-string
*
* @throws Exception
*/
- public function rowCount(): int;
+ public function rowCount(): int|string;
/**
* Returns the number of columns in the result
diff --git a/doctrine/dbal/src/Driver/SQLSrv/Connection.php b/doctrine/dbal/src/Driver/SQLSrv/Connection.php
index 16e45d110..71050f17a 100644
--- a/doctrine/dbal/src/Driver/SQLSrv/Connection.php
+++ b/doctrine/dbal/src/Driver/SQLSrv/Connection.php
@@ -1,17 +1,13 @@
connection = $connection;
}
- /**
- * {@inheritDoc}
- */
- public function getServerVersion()
+ public function getServerVersion(): string
{
$serverInfo = sqlsrv_server_info($this->connection);
return $serverInfo['SQLServerVersion'];
}
- public function prepare(string $sql): DriverStatement
+ public function prepare(string $sql): Statement
{
return new Statement($this->connection, $sql);
}
- public function query(string $sql): ResultInterface
+ public function query(string $sql): Result
{
return $this->prepare($sql)->execute();
}
- /**
- * {@inheritDoc}
- */
- public function quote($value, $type = ParameterType::STRING)
+ public function quote(string $value): string
{
- if (is_int($value)) {
- return $value;
- }
-
- if (is_float($value)) {
- return sprintf('%F', $value);
- }
-
return "'" . str_replace("'", "''", $value) . "'";
}
@@ -88,52 +66,38 @@ public function exec(string $sql): int
return $rowsAffected;
}
- /**
- * {@inheritDoc}
- */
- public function lastInsertId($name = null)
+ public function lastInsertId(): int|string
{
- if ($name !== null) {
- Deprecation::triggerIfCalledFromOutside(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/4687',
- 'The usage of Connection::lastInsertId() with a sequence name is deprecated.',
- );
-
- $result = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?')
- ->execute([$name]);
- } else {
- $result = $this->query('SELECT @@IDENTITY');
+ $result = $this->query('SELECT @@IDENTITY');
+
+ $lastInsertId = $result->fetchOne();
+
+ if ($lastInsertId === null) {
+ throw NoIdentityValue::new();
}
- return $result->fetchOne();
+ return $lastInsertId;
}
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
if (! sqlsrv_begin_transaction($this->connection)) {
throw Error::new();
}
-
- return true;
}
- public function commit(): bool
+ public function commit(): void
{
if (! sqlsrv_commit($this->connection)) {
throw Error::new();
}
-
- return true;
}
- public function rollBack(): bool
+ public function rollBack(): void
{
if (! sqlsrv_rollback($this->connection)) {
throw Error::new();
}
-
- return true;
}
/** @return resource */
diff --git a/doctrine/dbal/src/Driver/SQLSrv/Driver.php b/doctrine/dbal/src/Driver/SQLSrv/Driver.php
index fcbdb7734..c9c2c3430 100644
--- a/doctrine/dbal/src/Driver/SQLSrv/Driver.php
+++ b/doctrine/dbal/src/Driver/SQLSrv/Driver.php
@@ -1,5 +1,7 @@
statement = $stmt;
}
- /**
- * {@inheritDoc}
- */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
return $this->fetch(SQLSRV_FETCH_NUMERIC);
}
- /**
- * {@inheritDoc}
- */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
return $this->fetch(SQLSRV_FETCH_ASSOC);
}
- /**
- * {@inheritDoc}
- */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return FetchUtils::fetchOne($this);
}
@@ -110,8 +97,7 @@ public function free(): void
}
}
- /** @return mixed|false */
- private function fetch(int $fetchType)
+ private function fetch(int $fetchType): mixed
{
return sqlsrv_fetch_array($this->statement, $fetchType) ?? false;
}
diff --git a/doctrine/dbal/src/Driver/SQLSrv/Statement.php b/doctrine/dbal/src/Driver/SQLSrv/Statement.php
index 227c33456..dc7827a50 100644
--- a/doctrine/dbal/src/Driver/SQLSrv/Statement.php
+++ b/doctrine/dbal/src/Driver/SQLSrv/Statement.php
@@ -1,16 +1,15 @@
+ * @var array
*/
private array $types = [];
@@ -67,13 +54,11 @@ final class Statement implements StatementInterface
* @internal The statement can be only instantiated by its driver connection.
*
* @param resource $conn
- * @param string $sql
*/
- public function __construct($conn, $sql)
- {
- $this->conn = $conn;
- $this->sql = $sql;
-
+ public function __construct(
+ private readonly mixed $conn,
+ private string $sql,
+ ) {
if (stripos($sql, 'INSERT INTO ') !== 0) {
return;
}
@@ -81,84 +66,16 @@ public function __construct($conn, $sql)
$this->sql .= self::LAST_INSERT_ID_SQL;
}
- /**
- * {@inheritDoc}
- */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
assert(is_int($param));
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
$this->variables[$param] = $value;
$this->types[$param] = $type;
-
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated Use {@see bindValue()} instead.
- */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
- {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- assert(is_int($param));
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- $this->variables[$param] =& $variable;
- $this->types[$param] = $type;
-
- // unset the statement resource if it exists as the new one will need to be bound to the new variable
- $this->stmt = null;
-
- return true;
}
- /**
- * {@inheritDoc}
- */
- public function execute($params = null): ResultInterface
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
-
- foreach ($params as $key => $val) {
- if (is_int($key)) {
- $this->bindValue($key + 1, $val, ParameterType::STRING);
- } else {
- $this->bindValue($key, $val, ParameterType::STRING);
- }
- }
- }
-
$this->stmt ??= $this->prepare();
if (! sqlsrv_execute($this->stmt)) {
diff --git a/doctrine/dbal/src/Driver/SQLite3/Connection.php b/doctrine/dbal/src/Driver/SQLite3/Connection.php
index 91b9b5ffe..1e9af93c9 100644
--- a/doctrine/dbal/src/Driver/SQLite3/Connection.php
+++ b/doctrine/dbal/src/Driver/SQLite3/Connection.php
@@ -1,22 +1,21 @@
connection = $connection;
}
public function prepare(string $sql): Statement
@@ -45,8 +44,7 @@ public function query(string $sql): Result
return new Result($result, $this->connection->changes());
}
- /** @inheritDoc */
- public function quote($value, $type = ParameterType::STRING): string
+ public function quote(string $value): string
{
return sprintf('\'%s\'', SQLite3::escapeString($value));
}
@@ -62,36 +60,40 @@ public function exec(string $sql): int
return $this->connection->changes();
}
- /** @inheritDoc */
- public function lastInsertId($name = null): int
+ public function lastInsertId(): int
{
- return $this->connection->lastInsertRowID();
+ $value = $this->connection->lastInsertRowID();
+ if ($value === 0) {
+ throw NoIdentityValue::new();
+ }
+
+ return $value;
}
- public function beginTransaction(): bool
+ public function beginTransaction(): void
{
try {
- return $this->connection->exec('BEGIN');
+ $this->connection->exec('BEGIN');
} catch (\Exception $e) {
- return false;
+ throw Exception::new($e);
}
}
- public function commit(): bool
+ public function commit(): void
{
try {
- return $this->connection->exec('COMMIT');
+ $this->connection->exec('COMMIT');
} catch (\Exception $e) {
- return false;
+ throw Exception::new($e);
}
}
- public function rollBack(): bool
+ public function rollBack(): void
{
try {
- return $this->connection->exec('ROLLBACK');
+ $this->connection->exec('ROLLBACK');
} catch (\Exception $e) {
- return false;
+ throw Exception::new($e);
}
}
diff --git a/doctrine/dbal/src/Driver/SQLite3/Driver.php b/doctrine/dbal/src/Driver/SQLite3/Driver.php
index fecc4819d..e6996d366 100644
--- a/doctrine/dbal/src/Driver/SQLite3/Driver.php
+++ b/doctrine/dbal/src/Driver/SQLite3/Driver.php
@@ -1,9 +1,10 @@
enableExceptions(true);
- UserDefinedFunctions::register([$connection, 'createFunction']);
-
return new Connection($connection);
}
}
diff --git a/doctrine/dbal/src/Driver/SQLite3/Exception.php b/doctrine/dbal/src/Driver/SQLite3/Exception.php
index 3ca1190bc..d4230042e 100644
--- a/doctrine/dbal/src/Driver/SQLite3/Exception.php
+++ b/doctrine/dbal/src/Driver/SQLite3/Exception.php
@@ -1,5 +1,7 @@
result = $result;
- $this->changes = $changes;
+ $this->result = $result;
}
- /** @inheritDoc */
- public function fetchNumeric()
+ public function fetchNumeric(): array|false
{
if ($this->result === null) {
return false;
@@ -31,8 +30,7 @@ public function fetchNumeric()
return $this->result->fetchArray(SQLITE3_NUM);
}
- /** @inheritDoc */
- public function fetchAssociative()
+ public function fetchAssociative(): array|false
{
if ($this->result === null) {
return false;
@@ -41,8 +39,7 @@ public function fetchAssociative()
return $this->result->fetchArray(SQLITE3_ASSOC);
}
- /** @inheritDoc */
- public function fetchOne()
+ public function fetchOne(): mixed
{
return FetchUtils::fetchOne($this);
}
diff --git a/doctrine/dbal/src/Driver/SQLite3/Statement.php b/doctrine/dbal/src/Driver/SQLite3/Statement.php
index a4166aa61..fe22e1df0 100644
--- a/doctrine/dbal/src/Driver/SQLite3/Statement.php
+++ b/doctrine/dbal/src/Driver/SQLite3/Statement.php
@@ -1,17 +1,15 @@
SQLITE3_NULL,
- ParameterType::INTEGER => SQLITE3_INTEGER,
- ParameterType::STRING => SQLITE3_TEXT,
- ParameterType::ASCII => SQLITE3_TEXT,
- ParameterType::BINARY => SQLITE3_BLOB,
- ParameterType::LARGE_OBJECT => SQLITE3_BLOB,
- ParameterType::BOOLEAN => SQLITE3_INTEGER,
- ];
-
- private SQLite3 $connection;
- private SQLite3Stmt $statement;
+ private const TYPE_BLOB = SQLITE3_BLOB;
+ private const TYPE_INTEGER = SQLITE3_INTEGER;
+ private const TYPE_NULL = SQLITE3_NULL;
+ private const TYPE_TEXT = SQLITE3_TEXT;
/** @internal The statement can be only instantiated by its driver connection. */
- public function __construct(SQLite3 $connection, SQLite3Stmt $statement)
- {
- $this->connection = $connection;
- $this->statement = $statement;
- }
-
- /**
- * @throws UnknownParameterType
- *
- * {@inheritDoc}
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindValue($param, $value, $type = ParameterType::STRING): bool
- {
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindValue() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- return $this->statement->bindValue($param, $value, $this->convertParamType($type));
+ public function __construct(
+ private readonly SQLite3 $connection,
+ private readonly SQLite3Stmt $statement,
+ ) {
}
- /**
- * @throws UnknownParameterType
- *
- * {@inheritDoc}
- *
- * @psalm-assert ParameterType::* $type
- */
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void
{
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5563',
- '%s is deprecated. Use bindValue() instead.',
- __METHOD__,
- );
-
- if (func_num_args() < 3) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5558',
- 'Not passing $type to Statement::bindParam() is deprecated.'
- . ' Pass the type corresponding to the parameter being bound.',
- );
- }
-
- return $this->statement->bindParam($param, $variable, $this->convertParamType($type));
+ $this->statement->bindValue($param, $value, $this->convertParamType($type));
}
- /** @inheritDoc */
- public function execute($params = null): Result
+ public function execute(): Result
{
- if ($params !== null) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5556',
- 'Passing $params to Statement::execute() is deprecated. Bind parameters using'
- . ' Statement::bindParam() or Statement::bindValue() instead.',
- );
-
- foreach ($params as $param => $value) {
- if (is_int($param)) {
- $this->bindValue($param + 1, $value, ParameterType::STRING);
- } else {
- $this->bindValue($param, $value, ParameterType::STRING);
- }
- }
- }
-
try {
$result = $this->statement->execute();
} catch (\Exception $e) {
@@ -120,17 +48,14 @@ public function execute($params = null): Result
return new Result($result, $this->connection->changes());
}
- /**
- * @psalm-return value-of
- *
- * @psalm-assert ParameterType::* $type
- */
- private function convertParamType(int $type): int
+ /** @psalm-return self::TYPE_* */
+ private function convertParamType(ParameterType $type): int
{
- if (! isset(self::PARAM_TYPE_MAP[$type])) {
- throw UnknownParameterType::new($type);
- }
-
- return self::PARAM_TYPE_MAP[$type];
+ return match ($type) {
+ ParameterType::NULL => self::TYPE_NULL,
+ ParameterType::INTEGER, ParameterType::BOOLEAN => self::TYPE_INTEGER,
+ ParameterType::STRING, ParameterType::ASCII => self::TYPE_TEXT,
+ ParameterType::BINARY, ParameterType::LARGE_OBJECT => self::TYPE_BLOB,
+ };
}
}
diff --git a/doctrine/dbal/src/Driver/ServerInfoAwareConnection.php b/doctrine/dbal/src/Driver/ServerInfoAwareConnection.php
deleted file mode 100644
index 5687ab0bb..000000000
--- a/doctrine/dbal/src/Driver/ServerInfoAwareConnection.php
+++ /dev/null
@@ -1,21 +0,0 @@
-execute() is called.
- *
- * As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
- * fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.
- *
- * Most parameters are input parameters, that is, parameters that are
- * used in a read-only fashion to build up the query. Some drivers support the invocation
- * of stored procedures that return data as output parameters, and some also as input/output
- * parameters that both send in data and are updated to receive it.
- *
- * @deprecated Use {@see bindValue()} instead.
- *
- * @param string|int $param Parameter identifier. For a prepared statement using named placeholders,
- * this will be a parameter name of the form :name. For a prepared statement using
- * question mark placeholders, this will be the 1-indexed position of the parameter.
- * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter.
- * @param int $type Explicit data type for the parameter using the {@see ParameterType}
+ * @param int|string $param Parameter identifier. For a prepared statement using named placeholders,
+ * this will be a parameter name of the form :name. For a prepared statement
+ * using question mark placeholders, this will be the 1-indexed position
+ * of the parameter.
+ * @param mixed $value The value to bind to the parameter.
+ * @param ParameterType $type Explicit data type for the parameter using the {@see ParameterType}
* constants.
- * @param int|null $length You must specify maxlength when using an OUT bind
- * so that PHP allocates enough memory to hold the returned value.
- *
- * @return bool TRUE on success or FALSE on failure.
*
* @throws Exception
*/
- public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null);
+ public function bindValue(int|string $param, mixed $value, ParameterType $type): void;
/**
* Executes a prepared statement
*
- * If the prepared statement included parameter markers, you must either:
- * call {@see bindParam()} to bind PHP variables to the parameter markers:
- * bound variables pass their value as input and receive the output value,
- * if any, of their associated parameter markers or pass an array of input-only
- * parameter values.
- *
- * @param mixed[]|null $params A numeric array of values with as many elements as there are
- * bound parameters in the SQL statement being executed.
- *
* @throws Exception
*/
- public function execute($params = null): Result;
+ public function execute(): Result;
}
diff --git a/doctrine/dbal/src/DriverManager.php b/doctrine/dbal/src/DriverManager.php
index 056f42084..8b41cbbe1 100644
--- a/doctrine/dbal/src/DriverManager.php
+++ b/doctrine/dbal/src/DriverManager.php
@@ -1,8 +1,9 @@
,
* driver?: key-of,
* driverClass?: class-string,
* driverOptions?: array,
* host?: string,
+ * memory?: bool,
* password?: string,
* path?: string,
* persistent?: bool,
- * platform?: Platforms\AbstractPlatform,
* port?: int,
* serverVersion?: string,
- * url?: string,
+ * sessionMode?: int,
* user?: string,
* unix_socket?: string,
+ * wrapperClass?: class-string,
* }
* @psalm-type Params = array{
* application_name?: string,
* charset?: string,
* dbname?: string,
* defaultTableOptions?: array,
- * default_dbname?: string,
* driver?: key-of,
* driverClass?: class-string,
* driverOptions?: array,
* host?: string,
- * keepSlave?: bool,
* keepReplica?: bool,
- * master?: OverrideParams,
* memory?: bool,
* password?: string,
* path?: string,
* persistent?: bool,
- * platform?: Platforms\AbstractPlatform,
* port?: int,
* primary?: OverrideParams,
* replica?: array,
* serverVersion?: string,
- * sharding?: array,
- * slaves?: array,
- * url?: string,
+ * sessionMode?: int,
* user?: string,
* wrapperClass?: class-string,
* unix_socket?: string,
@@ -79,37 +75,17 @@ final class DriverManager
* To add your own driver use the 'driverClass' parameter to {@see DriverManager::getConnection()}.
*/
private const DRIVER_MAP = [
- 'pdo_mysql' => PDO\MySQL\Driver::class,
- 'pdo_sqlite' => PDO\SQLite\Driver::class,
- 'pdo_pgsql' => PDO\PgSQL\Driver::class,
- 'pdo_oci' => PDO\OCI\Driver::class,
- 'oci8' => OCI8\Driver::class,
- 'ibm_db2' => IBMDB2\Driver::class,
- 'pdo_sqlsrv' => PDO\SQLSrv\Driver::class,
- 'mysqli' => Mysqli\Driver::class,
- 'pgsql' => PgSQL\Driver::class,
- 'sqlsrv' => SQLSrv\Driver::class,
- 'sqlite3' => SQLite3\Driver::class,
- ];
-
- /**
- * List of URL schemes from a database URL and their mappings to driver.
- *
- * @deprecated Use actual driver names instead.
- *
- * @var array
- * @psalm-var array>
- */
- private static array $driverSchemeAliases = [
- 'db2' => 'ibm_db2',
- 'mssql' => 'pdo_sqlsrv',
- 'mysql' => 'pdo_mysql',
- 'mysql2' => 'pdo_mysql', // Amazon RDS, for some weird reason
- 'postgres' => 'pdo_pgsql',
- 'postgresql' => 'pdo_pgsql',
- 'pgsql' => 'pdo_pgsql',
- 'sqlite' => 'pdo_sqlite',
- 'sqlite3' => 'pdo_sqlite',
+ 'pdo_mysql' => PDO\MySQL\Driver::class,
+ 'pdo_sqlite' => PDO\SQLite\Driver::class,
+ 'pdo_pgsql' => PDO\PgSQL\Driver::class,
+ 'pdo_oci' => PDO\OCI\Driver::class,
+ 'oci8' => OCI8\Driver::class,
+ 'ibm_db2' => IBMDB2\Driver::class,
+ 'pdo_sqlsrv' => PDO\SQLSrv\Driver::class,
+ 'mysqli' => Mysqli\Driver::class,
+ 'pgsql' => PgSQL\Driver::class,
+ 'sqlsrv' => SQLSrv\Driver::class,
+ 'sqlite3' => SQLite3\Driver::class,
];
/**
@@ -151,50 +127,32 @@ private function __construct()
* driverClass:
* The driver class to use.
*
- * @param Configuration|null $config The configuration to use.
- * @param EventManager|null $eventManager The event manager to use.
+ * @param Configuration|null $config The configuration to use.
* @psalm-param Params $params
*
* @psalm-return ($params is array{wrapperClass: class-string} ? T : Connection)
*
- * @throws Exception
- *
* @template T of Connection
*/
public static function getConnection(
#[SensitiveParameter]
array $params,
?Configuration $config = null,
- ?EventManager $eventManager = null
): Connection {
- // create default config and event manager, if not set
- $config ??= new Configuration();
- $eventManager ??= new EventManager();
- $params = self::parseDatabaseUrl($params);
-
- // URL support for PrimaryReplicaConnection
- if (isset($params['primary'])) {
- $params['primary'] = self::parseDatabaseUrl($params['primary']);
- }
-
- if (isset($params['replica'])) {
- foreach ($params['replica'] as $key => $replicaParams) {
- $params['replica'][$key] = self::parseDatabaseUrl($replicaParams);
- }
- }
-
- $driver = self::createDriver($params['driver'] ?? null, $params['driverClass'] ?? null);
+ $config ??= new Configuration();
+ $driver = self::createDriver($params['driver'] ?? null, $params['driverClass'] ?? null);
foreach ($config->getMiddlewares() as $middleware) {
$driver = $middleware->wrap($driver);
}
+ /** @var class-string $wrapperClass */
$wrapperClass = $params['wrapperClass'] ?? Connection::class;
if (! is_a($wrapperClass, Connection::class, true)) {
- throw Exception::invalidWrapperClass($wrapperClass);
+ throw InvalidWrapperClass::new($wrapperClass);
}
- return new $wrapperClass($params, $driver, $config, $eventManager);
+ return new $wrapperClass($params, $driver, $config);
}
/**
@@ -209,80 +167,25 @@ public static function getAvailableDrivers(): array
}
/**
- * @throws Exception
- *
- * @psalm-assert key-of|null $driver
- * @psalm-assert class-string|null $driverClass
+ * @param class-string|null $driverClass
+ * @param key-of|null $driver
*/
private static function createDriver(?string $driver, ?string $driverClass): Driver
{
if ($driverClass === null) {
if ($driver === null) {
- throw Exception::driverRequired();
+ throw DriverRequired::new();
}
if (! isset(self::DRIVER_MAP[$driver])) {
- throw Exception::unknownDriver($driver, array_keys(self::DRIVER_MAP));
+ throw UnknownDriver::new($driver, array_keys(self::DRIVER_MAP));
}
$driverClass = self::DRIVER_MAP[$driver];
} elseif (! is_a($driverClass, Driver::class, true)) {
- throw Exception::invalidDriverClass($driverClass);
+ throw InvalidDriverClass::new($driverClass);
}
return new $driverClass();
}
-
- /**
- * Extracts parts from a database URL, if present, and returns an
- * updated list of parameters.
- *
- * @param mixed[] $params The list of parameters.
- * @psalm-param Params $params
- *
- * @return mixed[] A modified list of parameters with info from a database
- * URL extracted into indidivual parameter parts.
- * @psalm-return Params
- *
- * @throws Exception
- */
- private static function parseDatabaseUrl(
- #[SensitiveParameter]
- array $params
- ): array {
- if (! isset($params['url'])) {
- return $params;
- }
-
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/pull/5843',
- 'The "url" connection parameter is deprecated. Please use %s to parse a database url before calling %s.',
- DsnParser::class,
- self::class,
- );
-
- $parser = new DsnParser(self::$driverSchemeAliases);
- try {
- $parsedParams = $parser->parse($params['url']);
- } catch (MalformedDsnException $e) {
- throw new Exception('Malformed parameter "url".', 0, $e);
- }
-
- if (isset($parsedParams['driver'])) {
- // The requested driver from the URL scheme takes precedence
- // over the default custom driver from the connection parameters (if any).
- unset($params['driverClass']);
- }
-
- $params = array_merge($params, $parsedParams);
-
- // If a schemeless connection URL is given, we require a default driver or default custom driver
- // as connection parameter.
- if (! isset($params['driverClass']) && ! isset($params['driver'])) {
- throw Exception::driverRequired($params['url']);
- }
-
- return $params;
- }
}
diff --git a/doctrine/dbal/src/Event/ConnectionEventArgs.php b/doctrine/dbal/src/Event/ConnectionEventArgs.php
deleted file mode 100644
index 9a69c2541..000000000
--- a/doctrine/dbal/src/Event/ConnectionEventArgs.php
+++ /dev/null
@@ -1,27 +0,0 @@
-connection = $connection;
- }
-
- /** @return Connection */
- public function getConnection()
- {
- return $this->connection;
- }
-}
diff --git a/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php b/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php
deleted file mode 100644
index 9598f43cc..000000000
--- a/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php
+++ /dev/null
@@ -1,77 +0,0 @@
- 'HH24:MI:SS',
- 'NLS_DATE_FORMAT' => 'YYYY-MM-DD HH24:MI:SS',
- 'NLS_TIMESTAMP_FORMAT' => 'YYYY-MM-DD HH24:MI:SS',
- 'NLS_TIMESTAMP_TZ_FORMAT' => 'YYYY-MM-DD HH24:MI:SS TZH:TZM',
- 'NLS_NUMERIC_CHARACTERS' => '.,',
- ];
-
- /** @param string[] $oracleSessionVars */
- public function __construct(array $oracleSessionVars = [])
- {
- $this->_defaultSessionVars = array_merge($this->_defaultSessionVars, $oracleSessionVars);
- }
-
- /**
- * @return void
- *
- * @throws Exception
- */
- public function postConnect(ConnectionEventArgs $args)
- {
- if (count($this->_defaultSessionVars) === 0) {
- return;
- }
-
- $vars = [];
- foreach (array_change_key_case($this->_defaultSessionVars, CASE_UPPER) as $option => $value) {
- if ($option === 'CURRENT_SCHEMA') {
- $vars[] = $option . ' = ' . $value;
- } else {
- $vars[] = $option . " = '" . $value . "'";
- }
- }
-
- $sql = 'ALTER SESSION SET ' . implode(' ', $vars);
- $args->getConnection()->executeStatement($sql);
- }
-
- /**
- * {@inheritDoc}
- */
- public function getSubscribedEvents()
- {
- return [Events::postConnect];
- }
-}
diff --git a/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php b/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php
deleted file mode 100644
index 4ce32d628..000000000
--- a/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php
+++ /dev/null
@@ -1,43 +0,0 @@
-sql = $sql;
- }
-
- /**
- * @return void
- *
- * @throws Exception
- */
- public function postConnect(ConnectionEventArgs $args)
- {
- $args->getConnection()->executeStatement($this->sql);
- }
-
- /**
- * {@inheritDoc}
- */
- public function getSubscribedEvents()
- {
- return [Events::postConnect];
- }
-}
diff --git a/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php b/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php
deleted file mode 100644
index 950f05f48..000000000
--- a/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php
+++ /dev/null
@@ -1,30 +0,0 @@
-getConnection()->executeStatement('PRAGMA foreign_keys=ON');
- }
-
- /**
- * {@inheritDoc}
- */
- public function getSubscribedEvents()
- {
- return [Events::postConnect];
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php b/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php
deleted file mode 100644
index 9f3ff6ea7..000000000
--- a/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php
+++ /dev/null
@@ -1,81 +0,0 @@
-column = $column;
- $this->tableDiff = $tableDiff;
- $this->platform = $platform;
- }
-
- /** @return Column */
- public function getColumn()
- {
- return $this->column;
- }
-
- /** @return TableDiff */
- public function getTableDiff()
- {
- return $this->tableDiff;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaAlterTableAddColumnEventArgs
- */
- public function addSql($sql)
- {
- if (is_array($sql)) {
- Deprecation::trigger(
- 'doctrine/dbal',
- 'https://github.com/doctrine/dbal/issues/3580',
- 'Passing multiple SQL statements as an array to SchemaAlterTableAddColumnEventaArrgs::addSql() ' .
- 'is deprecated. Pass each statement as an individual argument instead.',
- );
- }
-
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php b/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php
deleted file mode 100644
index 9ba37aade..000000000
--- a/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php
+++ /dev/null
@@ -1,71 +0,0 @@
-columnDiff = $columnDiff;
- $this->tableDiff = $tableDiff;
- $this->platform = $platform;
- }
-
- /** @return ColumnDiff */
- public function getColumnDiff()
- {
- return $this->columnDiff;
- }
-
- /** @return TableDiff */
- public function getTableDiff()
- {
- return $this->tableDiff;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaAlterTableChangeColumnEventArgs
- */
- public function addSql($sql)
- {
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php b/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php
deleted file mode 100644
index 07c065a9a..000000000
--- a/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php
+++ /dev/null
@@ -1,62 +0,0 @@
-tableDiff = $tableDiff;
- $this->platform = $platform;
- }
-
- /** @return TableDiff */
- public function getTableDiff()
- {
- return $this->tableDiff;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaAlterTableEventArgs
- */
- public function addSql($sql)
- {
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php b/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php
deleted file mode 100644
index 4122b418c..000000000
--- a/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php
+++ /dev/null
@@ -1,71 +0,0 @@
-column = $column;
- $this->tableDiff = $tableDiff;
- $this->platform = $platform;
- }
-
- /** @return Column */
- public function getColumn()
- {
- return $this->column;
- }
-
- /** @return TableDiff */
- public function getTableDiff()
- {
- return $this->tableDiff;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaAlterTableRemoveColumnEventArgs
- */
- public function addSql($sql)
- {
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php b/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php
deleted file mode 100644
index 21d3c1645..000000000
--- a/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php
+++ /dev/null
@@ -1,82 +0,0 @@
-oldColumnName = $oldColumnName;
- $this->column = $column;
- $this->tableDiff = $tableDiff;
- $this->platform = $platform;
- }
-
- /** @return string */
- public function getOldColumnName()
- {
- return $this->oldColumnName;
- }
-
- /** @return Column */
- public function getColumn()
- {
- return $this->column;
- }
-
- /** @return TableDiff */
- public function getTableDiff()
- {
- return $this->tableDiff;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaAlterTableRenameColumnEventArgs
- */
- public function addSql($sql)
- {
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php b/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php
deleted file mode 100644
index 04fcbde9c..000000000
--- a/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php
+++ /dev/null
@@ -1,87 +0,0 @@
-tableColumn = $tableColumn;
- $this->table = $table;
- $this->database = $database;
- $this->connection = $connection;
- }
-
- /**
- * Allows to clear the column which means the column will be excluded from
- * tables column list.
- *
- * @return SchemaColumnDefinitionEventArgs
- */
- public function setColumn(?Column $column = null)
- {
- $this->column = $column;
-
- return $this;
- }
-
- /** @return Column|null */
- public function getColumn()
- {
- return $this->column;
- }
-
- /** @return mixed[] */
- public function getTableColumn()
- {
- return $this->tableColumn;
- }
-
- /** @return string */
- public function getTable()
- {
- return $this->table;
- }
-
- /** @return string */
- public function getDatabase()
- {
- return $this->database;
- }
-
- /** @return Connection */
- public function getConnection()
- {
- return $this->connection;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php b/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php
deleted file mode 100644
index 54f134d14..000000000
--- a/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php
+++ /dev/null
@@ -1,71 +0,0 @@
-column = $column;
- $this->table = $table;
- $this->platform = $platform;
- }
-
- /** @return Column */
- public function getColumn()
- {
- return $this->column;
- }
-
- /** @return Table */
- public function getTable()
- {
- return $this->table;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaCreateTableColumnEventArgs
- */
- public function addSql($sql)
- {
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php b/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php
deleted file mode 100644
index a7d548deb..000000000
--- a/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php
+++ /dev/null
@@ -1,87 +0,0 @@
-table = $table;
- $this->columns = $columns;
- $this->options = $options;
- $this->platform = $platform;
- }
-
- /** @return Table */
- public function getTable()
- {
- return $this->table;
- }
-
- /** @return mixed[][] */
- public function getColumns()
- {
- return $this->columns;
- }
-
- /** @return mixed[] */
- public function getOptions()
- {
- return $this->options;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
- *
- * @param string|string[] $sql
- *
- * @return SchemaCreateTableEventArgs
- */
- public function addSql($sql)
- {
- $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
-
- return $this;
- }
-
- /** @return string[] */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php b/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php
deleted file mode 100644
index f45e3a15a..000000000
--- a/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php
+++ /dev/null
@@ -1,64 +0,0 @@
-table = $table;
- $this->platform = $platform;
- }
-
- /** @return string|Table */
- public function getTable()
- {
- return $this->table;
- }
-
- /** @return AbstractPlatform */
- public function getPlatform()
- {
- return $this->platform;
- }
-
- /**
- * @param string $sql
- *
- * @return SchemaDropTableEventArgs
- */
- public function setSql($sql)
- {
- $this->sql = $sql;
-
- return $this;
- }
-
- /** @return string|null */
- public function getSql()
- {
- return $this->sql;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaEventArgs.php b/doctrine/dbal/src/Event/SchemaEventArgs.php
deleted file mode 100644
index 77d1d3908..000000000
--- a/doctrine/dbal/src/Event/SchemaEventArgs.php
+++ /dev/null
@@ -1,29 +0,0 @@
-preventDefault = true;
-
- return $this;
- }
-
- /** @return bool */
- public function isDefaultPrevented()
- {
- return $this->preventDefault;
- }
-}
diff --git a/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php b/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php
deleted file mode 100644
index dbee55a0e..000000000
--- a/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php
+++ /dev/null
@@ -1,75 +0,0 @@
-tableIndex = $tableIndex;
- $this->table = $table;
- $this->connection = $connection;
- }
-
- /**
- * Allows to clear the index which means the index will be excluded from tables index list.
- *
- * @return SchemaIndexDefinitionEventArgs
- */
- public function setIndex(?Index $index = null)
- {
- $this->index = $index;
-
- return $this;
- }
-
- /** @return Index|null */
- public function getIndex()
- {
- return $this->index;
- }
-
- /** @return mixed[] */
- public function getTableIndex()
- {
- return $this->tableIndex;
- }
-
- /** @return string */
- public function getTable()
- {
- return $this->table;
- }
-
- /** @return Connection */
- public function getConnection()
- {
- return $this->connection;
- }
-}
diff --git a/doctrine/dbal/src/Event/TransactionBeginEventArgs.php b/doctrine/dbal/src/Event/TransactionBeginEventArgs.php
deleted file mode 100644
index be4ccdf15..000000000
--- a/doctrine/dbal/src/Event/TransactionBeginEventArgs.php
+++ /dev/null
@@ -1,10 +0,0 @@
-connection = $connection;
- }
-
- public function getConnection(): Connection
- {
- return $this->connection;
- }
-}
diff --git a/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php b/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php
deleted file mode 100644
index 9e6e650d8..000000000
--- a/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php
+++ /dev/null
@@ -1,10 +0,0 @@
-getMessage();
} else {
@@ -35,17 +34,12 @@ public function __construct(TheDriverException $driverException, ?Query $query)
}
parent::__construct($message, $driverException->getCode(), $driverException);
-
- $this->query = $query;
}
- /**
- * {@inheritDoc}
- */
- public function getSQLState()
+ public function getSQLState(): ?string
{
$previous = $this->getPrevious();
- assert($previous instanceof TheDriverException);
+ assert($previous instanceof Driver\Exception);
return $previous->getSQLState();
}
diff --git a/doctrine/dbal/src/Exception/DriverRequired.php b/doctrine/dbal/src/Exception/DriverRequired.php
new file mode 100644
index 000000000..e37ac6860
--- /dev/null
+++ b/doctrine/dbal/src/Exception/DriverRequired.php
@@ -0,0 +1,30 @@
+|array */
- private array $originalParameters;
-
- /** @var array|array */
- private array $originalTypes;
-
private int $originalParameterIndex = 0;
/** @var list */
@@ -29,28 +26,28 @@ final class ExpandArrayParameters implements Visitor
/** @var list