diff --git a/composer.json b/composer.json
index 959671e48..3ec03e80e 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
"cweagans/composer-patches": "^1.7",
"deepdiver/zipstreamer": "^2.0.3",
"deepdiver1975/tarstreamer": "^2.1.0",
- "doctrine/dbal": "^3.9.4",
+ "doctrine/dbal": "^3.10.2",
"egulias/email-validator": "^4.0.2",
"fusonic/opengraph": "^2.3.0",
"giggsey/libphonenumber-for-php-lite": "^8.13.48",
diff --git a/composer.lock b/composer.lock
index 315710136..f9ddc32a9 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": "ff948a53dee4ee0f40bff45c2f0c369d",
+ "content-hash": "52bf86ecb611033d85ec172eab991cd6",
"packages": [
{
"name": "aws/aws-crt-php",
@@ -433,131 +433,41 @@
},
"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.9.4",
+ "version": "3.10.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "ec16c82f20be1a7224e65ac67144a29199f87959"
+ "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959",
- "reference": "ec16c82f20be1a7224e65ac67144a29199f87959",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/c6c16cf787eaba3112203dfcd715fa2059c62282",
+ "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282",
"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",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
+ "conflict": {
+ "doctrine/cache": "< 1.11"
+ },
"require-dev": {
- "doctrine/coding-standard": "12.0.0",
+ "doctrine/cache": "^1.11|^2.0",
+ "doctrine/coding-standard": "13.0.1",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2023.1",
- "phpstan/phpstan": "2.1.1",
+ "phpstan/phpstan": "2.1.22",
"phpstan/phpstan-strict-rules": "^2",
- "phpunit/phpunit": "9.6.22",
- "slevomat/coding-standard": "8.13.1",
- "squizlabs/php_codesniffer": "3.10.2",
+ "phpunit/phpunit": "9.6.23",
+ "slevomat/coding-standard": "8.16.2",
+ "squizlabs/php_codesniffer": "3.13.1",
"symfony/cache": "^5.4|^6.0|^7.0",
"symfony/console": "^4.4|^5.4|^6.0|^7.0"
},
@@ -619,7 +529,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.9.4"
+ "source": "https://github.com/doctrine/dbal/tree/3.10.2"
},
"funding": [
{
@@ -635,7 +545,7 @@
"type": "tidelift"
}
],
- "time": "2025-01-16T08:28:55+00:00"
+ "time": "2025-09-04T23:51:27+00:00"
},
{
"name": "doctrine/deprecations",
@@ -6350,15 +6260,15 @@
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^8.1"
},
- "platform-dev": [],
+ "platform-dev": {},
"platform-overrides": {
"php": "8.1.0"
},
- "plugin-api-version": "2.3.0"
+ "plugin-api-version": "2.6.0"
}
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index f564e93bd..88930c59d 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -1233,19 +1233,6 @@
'DateMalformedStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php',
'DateObjectError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php',
'DateRangeError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.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',
@@ -1337,6 +1324,7 @@
'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\\PDOConnect' => $vendorDir . '/doctrine/dbal/src/Driver/PDO/PDOConnect.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',
@@ -1437,6 +1425,7 @@
'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\\MariaDb117Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MariaDb117Keywords.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\\MySQL84Keywords' => $vendorDir . '/doctrine/dbal/src/Platforms/Keywords/MySQL84Keywords.php',
@@ -1455,6 +1444,7 @@
'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\\MariaDb110700Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MariaDb110700Platform.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\\MySQL84Platform' => $vendorDir . '/doctrine/dbal/src/Platforms/MySQL84Platform.php',
diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php
index 89dce0cfd..f3e90d336 100644
--- a/composer/autoload_psr4.php
+++ b/composer/autoload_psr4.php
@@ -80,7 +80,6 @@
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/src'),
'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'),
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index eafab4a9c..4da262325 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -172,7 +172,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'Doctrine\\Deprecations\\' => 22,
'Doctrine\\DBAL\\' => 14,
'Doctrine\\Common\\Lexer\\' => 22,
- 'Doctrine\\Common\\Cache\\' => 22,
'Doctrine\\Common\\' => 16,
),
'C' =>
@@ -488,10 +487,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',
@@ -1766,19 +1761,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'DateMalformedStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php',
'DateObjectError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php',
'DateRangeError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.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',
@@ -1870,6 +1852,7 @@ 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\\PDOConnect' => __DIR__ . '/..' . '/doctrine/dbal/src/Driver/PDO/PDOConnect.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',
@@ -1970,6 +1953,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'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\\MariaDb117Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MariaDb117Keywords.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\\MySQL84Keywords' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/Keywords/MySQL84Keywords.php',
@@ -1988,6 +1972,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'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\\MariaDb110700Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MariaDb110700Platform.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\\MySQL84Platform' => __DIR__ . '/..' . '/doctrine/dbal/src/Platforms/MySQL84Platform.php',
diff --git a/composer/installed.json b/composer/installed.json
index 9f6f27a02..56ab1e331 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -448,142 +448,49 @@
},
"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.9.4",
- "version_normalized": "3.9.4.0",
+ "version": "3.10.2",
+ "version_normalized": "3.10.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "ec16c82f20be1a7224e65ac67144a29199f87959"
+ "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959",
- "reference": "ec16c82f20be1a7224e65ac67144a29199f87959",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/c6c16cf787eaba3112203dfcd715fa2059c62282",
+ "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282",
"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",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
+ "conflict": {
+ "doctrine/cache": "< 1.11"
+ },
"require-dev": {
- "doctrine/coding-standard": "12.0.0",
+ "doctrine/cache": "^1.11|^2.0",
+ "doctrine/coding-standard": "13.0.1",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2023.1",
- "phpstan/phpstan": "2.1.1",
+ "phpstan/phpstan": "2.1.22",
"phpstan/phpstan-strict-rules": "^2",
- "phpunit/phpunit": "9.6.22",
- "slevomat/coding-standard": "8.13.1",
- "squizlabs/php_codesniffer": "3.10.2",
+ "phpunit/phpunit": "9.6.23",
+ "slevomat/coding-standard": "8.16.2",
+ "squizlabs/php_codesniffer": "3.13.1",
"symfony/cache": "^5.4|^6.0|^7.0",
"symfony/console": "^4.4|^5.4|^6.0|^7.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
- "time": "2025-01-16T08:28:55+00:00",
+ "time": "2025-09-04T23:51:27+00:00",
"bin": [
"bin/doctrine-dbal"
],
@@ -640,7 +547,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.9.4"
+ "source": "https://github.com/doctrine/dbal/tree/3.10.2"
},
"funding": [
{
diff --git a/composer/installed.php b/composer/installed.php
index 5ff4abcc4..921c42771 100644
--- a/composer/installed.php
+++ b/composer/installed.php
@@ -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.9.4',
- 'version' => '3.9.4.0',
- 'reference' => 'ec16c82f20be1a7224e65ac67144a29199f87959',
+ 'pretty_version' => '3.10.2',
+ 'version' => '3.10.2.0',
+ 'reference' => 'c6c16cf787eaba3112203dfcd715fa2059c62282',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/dbal',
'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/Cache/QueryCacheProfile.php b/doctrine/dbal/src/Cache/QueryCacheProfile.php
index 1601a9828..71d5b04c4 100644
--- a/doctrine/dbal/src/Cache/QueryCacheProfile.php
+++ b/doctrine/dbal/src/Cache/QueryCacheProfile.php
@@ -8,8 +8,10 @@
use Doctrine\DBAL\Types\Type;
use Doctrine\Deprecations\Deprecation;
use Psr\Cache\CacheItemPoolInterface;
+use RuntimeException;
use TypeError;
+use function class_exists;
use function get_class;
use function hash;
use function serialize;
@@ -82,7 +84,19 @@ public function getResultCacheDriver()
__METHOD__,
);
- return $this->resultCache !== null ? DoctrineProvider::wrap($this->resultCache) : null;
+ if ($this->resultCache === null) {
+ return null;
+ }
+
+ if (! class_exists(DoctrineProvider::class)) {
+ throw new RuntimeException(sprintf(
+ 'Calling %s() is not supported if the doctrine/cache package is not installed. '
+ . 'Try running "composer require doctrine/cache" or migrate cache access to PSR-6.',
+ __METHOD__,
+ ));
+ }
+
+ return DoctrineProvider::wrap($this->resultCache);
}
/** @return int */
diff --git a/doctrine/dbal/src/Configuration.php b/doctrine/dbal/src/Configuration.php
index 5cdae8135..106eccae8 100644
--- a/doctrine/dbal/src/Configuration.php
+++ b/doctrine/dbal/src/Configuration.php
@@ -10,8 +10,12 @@
use Doctrine\DBAL\Schema\SchemaManagerFactory;
use Doctrine\Deprecations\Deprecation;
use Psr\Cache\CacheItemPoolInterface;
+use RuntimeException;
+use function class_exists;
use function func_num_args;
+use function interface_exists;
+use function sprintf;
/**
* Configuration container for the Doctrine DBAL.
@@ -129,6 +133,14 @@ public function getResultCacheImpl(): ?Cache
__METHOD__,
);
+ if ($this->resultCache !== null && ! interface_exists(Cache::class)) {
+ throw new RuntimeException(sprintf(
+ 'Calling %s() is not supported if the doctrine/cache package is not installed. '
+ . 'Try running "composer require doctrine/cache" or migrate cache access to PSR-6.',
+ __METHOD__,
+ ));
+ }
+
return $this->resultCacheImpl;
}
@@ -137,8 +149,11 @@ public function getResultCacheImpl(): ?Cache
*/
public function setResultCache(CacheItemPoolInterface $cache): void
{
- $this->resultCacheImpl = DoctrineProvider::wrap($cache);
- $this->resultCache = $cache;
+ if (class_exists(DoctrineProvider::class)) {
+ $this->resultCacheImpl = DoctrineProvider::wrap($cache);
+ }
+
+ $this->resultCache = $cache;
}
/**
diff --git a/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php b/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php
index fdfc75a77..10507afd7 100644
--- a/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php
+++ b/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php
@@ -22,6 +22,8 @@
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Query;
+use function strpos;
+
/** @internal */
final class ExceptionConverter implements ExceptionConverterInterface
{
@@ -85,6 +87,15 @@ public function convert(Exception $exception, ?Query $query): DriverException
case 1626:
return new SyntaxErrorException($exception, $query);
+ case 1524:
+ if (strpos($exception->getMessage(), 'Plugin \'mysql_native_password\' is not loaded') === false) {
+ break;
+ }
+
+ // Workaround for MySQL 8.4 if we request an unknown user.
+ // https://bugs.mysql.com/bug.php?id=114876
+ return new ConnectionException($exception, $query);
+
case 1044:
case 1045:
case 1046:
diff --git a/doctrine/dbal/src/Driver/AbstractMySQLDriver.php b/doctrine/dbal/src/Driver/AbstractMySQLDriver.php
index f8c3b3996..1bb327033 100644
--- a/doctrine/dbal/src/Driver/AbstractMySQLDriver.php
+++ b/doctrine/dbal/src/Driver/AbstractMySQLDriver.php
@@ -13,6 +13,7 @@
use Doctrine\DBAL\Platforms\MariaDb1043Platform;
use Doctrine\DBAL\Platforms\MariaDb1052Platform;
use Doctrine\DBAL\Platforms\MariaDb1060Platform;
+use Doctrine\DBAL\Platforms\MariaDb110700Platform;
use Doctrine\DBAL\Platforms\MySQL57Platform;
use Doctrine\DBAL\Platforms\MySQL80Platform;
use Doctrine\DBAL\Platforms\MySQL84Platform;
@@ -42,6 +43,10 @@ public function createDatabasePlatformForVersion($version)
if ($mariadb) {
$mariaDbVersion = $this->getMariaDbMysqlVersionNumber($version);
+ if (version_compare($mariaDbVersion, '11.7.0', '>=')) {
+ return new MariaDb110700Platform();
+ }
+
if (version_compare($mariaDbVersion, '10.10.0', '>=')) {
return new MariaDb1010Platform();
}
diff --git a/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php b/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php
index 2492698b4..4a006daad 100644
--- a/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/MySQL/Driver.php
@@ -5,12 +5,15 @@
use Doctrine\DBAL\Driver\AbstractMySQLDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
use Doctrine\DBAL\Driver\PDO\Exception;
+use Doctrine\DBAL\Driver\PDO\PDOConnect;
use PDO;
use PDOException;
use SensitiveParameter;
final class Driver extends AbstractMySQLDriver
{
+ use PDOConnect;
+
/**
* {@inheritDoc}
*
@@ -30,7 +33,7 @@ public function connect(
unset($safeParams['password'], $safeParams['url']);
try {
- $pdo = new PDO(
+ $pdo = $this->doConnect(
$this->constructPdoDsn($safeParams),
$params['user'] ?? '',
$params['password'] ?? '',
diff --git a/doctrine/dbal/src/Driver/PDO/OCI/Driver.php b/doctrine/dbal/src/Driver/PDO/OCI/Driver.php
index 10ada9f0e..a66a5cde8 100644
--- a/doctrine/dbal/src/Driver/PDO/OCI/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/OCI/Driver.php
@@ -5,12 +5,15 @@
use Doctrine\DBAL\Driver\AbstractOracleDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
use Doctrine\DBAL\Driver\PDO\Exception;
+use Doctrine\DBAL\Driver\PDO\PDOConnect;
use PDO;
use PDOException;
use SensitiveParameter;
final class Driver extends AbstractOracleDriver
{
+ use PDOConnect;
+
/**
* {@inheritDoc}
*
@@ -30,7 +33,7 @@ public function connect(
unset($safeParams['password'], $safeParams['url']);
try {
- $pdo = new PDO(
+ $pdo = $this->doConnect(
$this->constructPdoDsn($params),
$params['user'] ?? '',
$params['password'] ?? '',
diff --git a/doctrine/dbal/src/Driver/PDO/PDOConnect.php b/doctrine/dbal/src/Driver/PDO/PDOConnect.php
new file mode 100644
index 000000000..346c6cd59
--- /dev/null
+++ b/doctrine/dbal/src/Driver/PDO/PDOConnect.php
@@ -0,0 +1,27 @@
+ $options */
+ private function doConnect(
+ string $dsn,
+ string $username,
+ string $password,
+ array $options
+ ): PDO {
+ if (PHP_VERSION_ID < 80400) {
+ return new PDO($dsn, $username, $password, $options);
+ }
+
+ return PDO::connect($dsn, $username, $password, $options);
+ }
+}
diff --git a/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php b/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php
index 5bfcd730c..b62c62318 100644
--- a/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php
@@ -5,13 +5,19 @@
use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
use Doctrine\DBAL\Driver\PDO\Exception;
+use Doctrine\DBAL\Driver\PDO\PDOConnect;
use Doctrine\Deprecations\Deprecation;
use PDO;
+use Pdo\Pgsql;
use PDOException;
use SensitiveParameter;
+use const PHP_VERSION_ID;
+
final class Driver extends AbstractPostgreSQLDriver
{
+ use PDOConnect;
+
/**
* {@inheritDoc}
*
@@ -31,7 +37,7 @@ public function connect(
unset($safeParams['password'], $safeParams['url']);
try {
- $pdo = new PDO(
+ $pdo = $this->doConnect(
$this->constructPdoDsn($safeParams),
$params['user'] ?? '',
$params['password'] ?? '',
@@ -41,11 +47,14 @@ public function connect(
throw Exception::new($exception);
}
+ $disablePreparesAttr = PHP_VERSION_ID >= 80400
+ ? Pgsql::ATTR_DISABLE_PREPARES
+ : PDO::PGSQL_ATTR_DISABLE_PREPARES;
if (
- ! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
- || $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES] === true
+ ! isset($driverOptions[$disablePreparesAttr])
+ || $driverOptions[$disablePreparesAttr] === true
) {
- $pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
+ $pdo->setAttribute($disablePreparesAttr, true);
}
$connection = new Connection($pdo);
diff --git a/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php b/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php
index 63eabb71a..fe2064aab 100644
--- a/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php
@@ -7,6 +7,7 @@
use Doctrine\DBAL\Driver\Exception;
use Doctrine\DBAL\Driver\PDO\Connection as PDOConnection;
use Doctrine\DBAL\Driver\PDO\Exception as PDOException;
+use Doctrine\DBAL\Driver\PDO\PDOConnect;
use PDO;
use SensitiveParameter;
@@ -15,6 +16,8 @@
final class Driver extends AbstractSQLServerDriver
{
+ use PDOConnect;
+
/**
* {@inheritDoc}
*
@@ -44,7 +47,7 @@ public function connect(
unset($safeParams['password'], $safeParams['url']);
try {
- $pdo = new PDO(
+ $pdo = $this->doConnect(
$this->constructDsn($safeParams, $dsnOptions),
$params['user'] ?? '',
$params['password'] ?? '',
diff --git a/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php b/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php
index 2e97788e6..2fa0e700c 100644
--- a/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php
+++ b/doctrine/dbal/src/Driver/PDO/SQLite/Driver.php
@@ -6,8 +6,9 @@
use Doctrine\DBAL\Driver\API\SQLite\UserDefinedFunctions;
use Doctrine\DBAL\Driver\PDO\Connection;
use Doctrine\DBAL\Driver\PDO\Exception;
+use Doctrine\DBAL\Driver\PDO\PDOConnect;
use Doctrine\Deprecations\Deprecation;
-use PDO;
+use Pdo\Sqlite;
use PDOException;
use SensitiveParameter;
@@ -15,6 +16,8 @@
final class Driver extends AbstractSQLiteDriver
{
+ use PDOConnect;
+
/**
* {@inheritDoc}
*
@@ -40,7 +43,7 @@ public function connect(
}
try {
- $pdo = new PDO(
+ $pdo = $this->doConnect(
$this->constructPdoDsn(array_intersect_key($params, ['path' => true, 'memory' => true])),
$params['user'] ?? '',
$params['password'] ?? '',
@@ -51,7 +54,7 @@ public function connect(
}
UserDefinedFunctions::register(
- [$pdo, 'sqliteCreateFunction'],
+ $pdo instanceof Sqlite ? [$pdo, 'createFunction'] : [$pdo, 'sqliteCreateFunction'],
$userDefinedFunctions,
);
diff --git a/doctrine/dbal/src/Driver/PgSQL/Driver.php b/doctrine/dbal/src/Driver/PgSQL/Driver.php
index 6377499a7..1cdaee1f2 100644
--- a/doctrine/dbal/src/Driver/PgSQL/Driver.php
+++ b/doctrine/dbal/src/Driver/PgSQL/Driver.php
@@ -15,6 +15,7 @@
use function func_get_args;
use function implode;
use function pg_connect;
+use function preg_match;
use function restore_error_handler;
use function set_error_handler;
use function sprintf;
@@ -64,9 +65,18 @@ private function constructConnectionString(
#[SensitiveParameter]
array $params
): string {
+ // pg_connect used by Doctrine DBAL does not support [...] notation,
+ // but requires the host address in plain form like `aa:bb:99...`
+ $matches = [];
+ if (isset($params['host']) && preg_match('/^\[(.+)\]$/', $params['host'], $matches) === 1) {
+ $params['hostaddr'] = $matches[1];
+ unset($params['host']);
+ }
+
$components = array_filter(
[
'host' => $params['host'] ?? null,
+ 'hostaddr' => $params['hostaddr'] ?? null,
'port' => $params['port'] ?? null,
'dbname' => $params['dbname'] ?? 'postgres',
'user' => $params['user'] ?? null,
diff --git a/doctrine/dbal/src/Driver/PgSQL/Statement.php b/doctrine/dbal/src/Driver/PgSQL/Statement.php
index ca6aa3b10..43af9f1b6 100644
--- a/doctrine/dbal/src/Driver/PgSQL/Statement.php
+++ b/doctrine/dbal/src/Driver/PgSQL/Statement.php
@@ -81,8 +81,17 @@ public function bindValue($param, $value, $type = ParameterType::STRING): bool
throw UnknownParameter::new((string) $param);
}
- $this->parameters[$this->parameterMap[$param]] = $value;
- $this->parameterTypes[$this->parameterMap[$param]] = $type;
+ if ($value === null) {
+ $type = ParameterType::NULL;
+ }
+
+ if ($type === ParameterType::BOOLEAN) {
+ $this->parameters[$this->parameterMap[$param]] = (bool) $value === false ? 'f' : 't';
+ $this->parameterTypes[$this->parameterMap[$param]] = ParameterType::STRING;
+ } else {
+ $this->parameters[$this->parameterMap[$param]] = $value;
+ $this->parameterTypes[$this->parameterMap[$param]] = $type;
+ }
return true;
}
diff --git a/doctrine/dbal/src/Driver/SQLSrv/Result.php b/doctrine/dbal/src/Driver/SQLSrv/Result.php
index db17e928d..6c0a368df 100644
--- a/doctrine/dbal/src/Driver/SQLSrv/Result.php
+++ b/doctrine/dbal/src/Driver/SQLSrv/Result.php
@@ -106,7 +106,7 @@ public function free(): void
// @link http://php.net/manual/en/pdostatement.closecursor.php
// @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075
// deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them
- while (sqlsrv_fetch($this->statement)) {
+ while (sqlsrv_fetch($this->statement) === true) {
}
}
diff --git a/doctrine/dbal/src/Platforms/Keywords/MariaDb102Keywords.php b/doctrine/dbal/src/Platforms/Keywords/MariaDb102Keywords.php
index f9b50de54..24b824045 100644
--- a/doctrine/dbal/src/Platforms/Keywords/MariaDb102Keywords.php
+++ b/doctrine/dbal/src/Platforms/Keywords/MariaDb102Keywords.php
@@ -11,7 +11,7 @@
*
* @link https://mariadb.com/kb/en/the-mariadb-library/reserved-words/
*/
-final class MariaDb102Keywords extends MariaDBKeywords
+class MariaDb102Keywords extends MariaDBKeywords
{
/** @deprecated */
public function getName(): string
diff --git a/doctrine/dbal/src/Platforms/Keywords/MariaDb117Keywords.php b/doctrine/dbal/src/Platforms/Keywords/MariaDb117Keywords.php
new file mode 100644
index 000000000..a33dcb946
--- /dev/null
+++ b/doctrine/dbal/src/Platforms/Keywords/MariaDb117Keywords.php
@@ -0,0 +1,46 @@
+getDropConstraintSQL($constraintName, $table);
}
+ if ($table !== null) {
+ $indexName = $index instanceof Index ? $index->getQuotedName($this) : $index;
+ $tableName = $table instanceof Table ? $table->getQuotedName($this) : $table;
+
+ if (strpos($tableName, '.') !== false) {
+ [$schema] = explode('.', $tableName);
+ $index = $schema . '.' . $indexName;
+ }
+ }
+
return parent::getDropIndexSQL($index, $table);
}
diff --git a/doctrine/dbal/src/Platforms/SQLServerPlatform.php b/doctrine/dbal/src/Platforms/SQLServerPlatform.php
index 16d7bd4e7..eed1cbab4 100644
--- a/doctrine/dbal/src/Platforms/SQLServerPlatform.php
+++ b/doctrine/dbal/src/Platforms/SQLServerPlatform.php
@@ -38,6 +38,7 @@
use function preg_match;
use function preg_match_all;
use function sprintf;
+use function str_contains;
use function str_ends_with;
use function str_replace;
use function str_starts_with;
@@ -1777,11 +1778,17 @@ private function generateIdentifierName($identifier): string
protected function getCommentOnTableSQL(string $tableName, ?string $comment): string
{
+ if (str_contains($tableName, '.')) {
+ [$schemaName, $tableName] = explode('.', $tableName);
+ } else {
+ $schemaName = 'dbo';
+ }
+
return $this->getAddExtendedPropertySQL(
'MS_Description',
$comment,
'SCHEMA',
- $this->quoteStringLiteral('dbo'),
+ $this->quoteStringLiteral($schemaName),
'TABLE',
$this->quoteStringLiteral($this->unquoteSingleIdentifier($tableName)),
);
diff --git a/doctrine/dbal/src/Platforms/SqlitePlatform.php b/doctrine/dbal/src/Platforms/SqlitePlatform.php
index 39ce5d90d..b2e1280d0 100644
--- a/doctrine/dbal/src/Platforms/SqlitePlatform.php
+++ b/doctrine/dbal/src/Platforms/SqlitePlatform.php
@@ -908,7 +908,7 @@ public function getTemporaryTableName($tableName)
*/
public function canEmulateSchemas()
{
- Deprecation::trigger(
+ Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/4805',
'SqlitePlatform::canEmulateSchemas() is deprecated.',
diff --git a/doctrine/dbal/src/SQL/Parser.php b/doctrine/dbal/src/SQL/Parser.php
index ae0d4428f..418af799f 100644
--- a/doctrine/dbal/src/SQL/Parser.php
+++ b/doctrine/dbal/src/SQL/Parser.php
@@ -7,14 +7,9 @@
use Doctrine\DBAL\SQL\Parser\Visitor;
use function array_merge;
-use function assert;
-use function current;
use function implode;
-use function key;
-use function next;
use function preg_last_error;
use function preg_match;
-use function reset;
use function sprintf;
use function strlen;
@@ -45,6 +40,7 @@ final class Parser
private const OTHER = '[^' . self::SPECIAL_CHARS . ']+';
private string $sqlPattern;
+ private string $tokenPattern;
public function __construct(bool $mySQLStringEscaping)
{
@@ -69,7 +65,12 @@ public function __construct(bool $mySQLStringEscaping)
self::OTHER,
]);
- $this->sqlPattern = sprintf('(%s)', implode('|', $patterns));
+ $this->sqlPattern = sprintf('(%s)', implode('|', $patterns));
+ $this->tokenPattern = '~\\G'
+ . '(?P' . self::NAMED_PARAMETER . ')'
+ . '|(?P' . self::POSITIONAL_PARAMETER . ')'
+ . '|(?P' . $this->sqlPattern . '|' . self::SPECIAL . ')'
+ . '~s';
}
/**
@@ -79,40 +80,26 @@ public function __construct(bool $mySQLStringEscaping)
*/
public function parse(string $sql, Visitor $visitor): void
{
- /** @var array $patterns */
- $patterns = [
- self::NAMED_PARAMETER => static function (string $sql) use ($visitor): void {
- $visitor->acceptNamedParameter($sql);
- },
- self::POSITIONAL_PARAMETER => static function (string $sql) use ($visitor): void {
- $visitor->acceptPositionalParameter($sql);
- },
- $this->sqlPattern => static function (string $sql) use ($visitor): void {
- $visitor->acceptOther($sql);
- },
- self::SPECIAL => static function (string $sql) use ($visitor): void {
- $visitor->acceptOther($sql);
- },
- ];
-
$offset = 0;
-
- while (($handler = current($patterns)) !== false) {
- if (preg_match('~\G' . key($patterns) . '~s', $sql, $matches, 0, $offset) === 1) {
- $handler($matches[0]);
- reset($patterns);
-
- $offset += strlen($matches[0]);
+ $length = strlen($sql);
+ while ($offset < $length) {
+ if (preg_match($this->tokenPattern, $sql, $matches, 0, $offset) === 1) {
+ $match = $matches[0];
+ if ($matches['named'] !== '') {
+ $visitor->acceptNamedParameter($match);
+ } elseif ($matches['positional'] !== '') {
+ $visitor->acceptPositionalParameter($match);
+ } else {
+ $visitor->acceptOther($match);
+ }
+
+ $offset += strlen($match);
} elseif (preg_last_error() !== PREG_NO_ERROR) {
// @codeCoverageIgnoreStart
throw RegularExpressionError::new();
// @codeCoverageIgnoreEnd
- } else {
- next($patterns);
}
}
-
- assert($offset === strlen($sql));
}
private function getMySQLStringLiteralPattern(string $delimiter): string
diff --git a/doctrine/dbal/src/Schema/ForeignKeyConstraint.php b/doctrine/dbal/src/Schema/ForeignKeyConstraint.php
index 2f0311cd6..dc69c629a 100644
--- a/doctrine/dbal/src/Schema/ForeignKeyConstraint.php
+++ b/doctrine/dbal/src/Schema/ForeignKeyConstraint.php
@@ -251,6 +251,10 @@ public function getUnqualifiedForeignTableName()
$name = substr($name, $position + 1);
}
+ if ($this->isIdentifierQuoted($name)) {
+ $name = $this->trimQuotes($name);
+ }
+
return strtolower($name);
}
diff --git a/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php b/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php
index 1716249fc..0510d1a82 100644
--- a/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php
+++ b/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php
@@ -294,9 +294,16 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName = null
foreach ($tableIndexes as $row) {
$colNumbers = array_map('intval', explode(' ', $row['indkey']));
$columnNameSql = sprintf(
- 'SELECT attnum, attname FROM pg_attribute WHERE attrelid=%d AND attnum IN (%s) ORDER BY attnum ASC',
+ <<<'SQL'
+ SELECT attnum,
+ quote_ident(attname) AS attname
+ FROM pg_attribute
+ WHERE attrelid = %d
+ AND attnum IN (%s)
+ ORDER BY attnum
+ SQL,
$row['indrelid'],
- implode(' ,', $colNumbers),
+ implode(', ', $colNumbers),
);
$indexColumns = $this->_conn->fetchAllAssociative($columnNameSql);
@@ -602,6 +609,8 @@ protected function selectTableNames(string $databaseName): Result
AND table_name != 'geometry_columns'
AND table_name != 'spatial_ref_sys'
AND table_type = 'BASE TABLE'
+ORDER BY
+ quote_ident(table_name)
SQL;
return $this->_conn->executeQuery($sql, [$databaseName]);
@@ -612,7 +621,7 @@ protected function selectTableColumns(string $databaseName, ?string $tableName =
$sql = 'SELECT';
if ($tableName === null) {
- $sql .= ' c.relname AS table_name, n.nspname AS schema_name,';
+ $sql .= ' quote_ident(c.relname) AS table_name, quote_ident(n.nspname) AS schema_name,';
}
$sql .= sprintf(<<<'SQL'
@@ -664,7 +673,7 @@ protected function selectIndexColumns(string $databaseName, ?string $tableName =
$sql = 'SELECT';
if ($tableName === null) {
- $sql .= ' tc.relname AS table_name, tn.nspname AS schema_name,';
+ $sql .= ' quote_ident(tc.relname) AS table_name, quote_ident(tn.nspname) AS schema_name,';
}
$sql .= <<<'SQL'
@@ -688,7 +697,7 @@ protected function selectIndexColumns(string $databaseName, ?string $tableName =
'c.relnamespace = n.oid',
], $this->buildQueryConditions($tableName));
- $sql .= ' WHERE ' . implode(' AND ', $conditions) . ')';
+ $sql .= ' WHERE ' . implode(' AND ', $conditions) . ') ORDER BY quote_ident(ic.relname)';
return $this->_conn->executeQuery($sql);
}
@@ -698,7 +707,7 @@ protected function selectForeignKeyColumns(string $databaseName, ?string $tableN
$sql = 'SELECT';
if ($tableName === null) {
- $sql .= ' tc.relname AS table_name, tn.nspname AS schema_name,';
+ $sql .= ' quote_ident(tc.relname) AS table_name, quote_ident(tn.nspname) AS schema_name,';
}
$sql .= <<<'SQL'
@@ -715,7 +724,7 @@ protected function selectForeignKeyColumns(string $databaseName, ?string $tableN
$conditions = array_merge(['n.oid = c.relnamespace'], $this->buildQueryConditions($tableName));
- $sql .= ' WHERE ' . implode(' AND ', $conditions) . ") AND r.contype = 'f'";
+ $sql .= ' WHERE ' . implode(' AND ', $conditions) . ") AND r.contype = 'f' ORDER BY quote_ident(r.conname)";
return $this->_conn->executeQuery($sql);
}
@@ -726,7 +735,8 @@ protected function selectForeignKeyColumns(string $databaseName, ?string $tableN
protected function fetchTableOptionsByTable(string $databaseName, ?string $tableName = null): array
{
$sql = <<<'SQL'
-SELECT c.relname,
+SELECT n.nspname AS schema_name,
+ c.relname AS table_name,
CASE c.relpersistence WHEN 'u' THEN true ELSE false END as unlogged,
obj_description(c.oid, 'pg_class') AS comment
FROM pg_class c
@@ -738,7 +748,12 @@ protected function fetchTableOptionsByTable(string $databaseName, ?string $table
$sql .= ' WHERE ' . implode(' AND ', $conditions);
- return $this->_conn->fetchAllAssociativeIndexed($sql);
+ $tableOptions = [];
+ foreach ($this->_conn->iterateAssociative($sql) as $row) {
+ $tableOptions[$this->_getPortableTableDefinition($row)] = $row;
+ }
+
+ return $tableOptions;
}
/**
diff --git a/doctrine/dbal/src/Schema/SQLServerSchemaManager.php b/doctrine/dbal/src/Schema/SQLServerSchemaManager.php
index acef511ab..e82ccded1 100644
--- a/doctrine/dbal/src/Schema/SQLServerSchemaManager.php
+++ b/doctrine/dbal/src/Schema/SQLServerSchemaManager.php
@@ -197,7 +197,7 @@ protected function _getPortableTableColumnDefinition($tableColumn)
private function parseDefaultExpression(string $value): ?string
{
- while (preg_match('/^\((.*)\)$/s', $value, $matches)) {
+ while (preg_match('/^\((.*)\)$/s', $value, $matches) === 1) {
$value = $matches[1];
}
@@ -227,9 +227,15 @@ protected function _getPortableTableForeignKeysList($tableForeignKeys)
$name = $tableForeignKey['ForeignKey'];
if (! isset($foreignKeys[$name])) {
+ $referencedTableName = $tableForeignKey['ReferenceTableName'];
+
+ if ($tableForeignKey['ReferenceSchemaName'] !== 'dbo') {
+ $referencedTableName = $tableForeignKey['ReferenceSchemaName'] . '.' . $referencedTableName;
+ }
+
$foreignKeys[$name] = [
'local_columns' => [$tableForeignKey['ColumnName']],
- 'foreign_table' => $tableForeignKey['ReferenceTableName'],
+ 'foreign_table' => $referencedTableName,
'foreign_columns' => [$tableForeignKey['ReferenceColumnName']],
'name' => $name,
'options' => [
@@ -556,31 +562,29 @@ protected function fetchTableOptionsByTable(string $databaseName, ?string $table
{
$sql = <<<'SQL'
SELECT
- tbl.name,
+ scm.name AS schema_name,
+ tbl.name AS table_name,
p.value AS [table_comment]
FROM
sys.tables AS tbl
+ JOIN sys.schemas AS scm
+ ON tbl.schema_id = scm.schema_id
INNER JOIN sys.extended_properties AS p ON p.major_id=tbl.object_id AND p.minor_id=0 AND p.class=1
SQL;
- $conditions = ["SCHEMA_NAME(tbl.schema_id) = N'dbo'", "p.name = N'MS_Description'"];
- $params = [];
+ $conditions = ["p.name = N'MS_Description'"];
if ($tableName !== null) {
- $conditions[] = "tbl.name = N'" . $tableName . "'";
+ $conditions[] = $this->getTableWhereClause($tableName, 'scm.name', 'tbl.name');
}
$sql .= ' WHERE ' . implode(' AND ', $conditions);
- /** @var array> $metadata */
- $metadata = $this->_conn->executeQuery($sql, $params)
- ->fetchAllAssociativeIndexed();
-
$tableOptions = [];
- foreach ($metadata as $table => $data) {
+ foreach ($this->_conn->iterateAssociative($sql) as $data) {
$data = array_change_key_case($data, CASE_LOWER);
- $tableOptions[$table] = [
+ $tableOptions[$this->_getPortableTableDefinition($data)] = [
'comment' => $data['table_comment'],
];
}
diff --git a/doctrine/dbal/src/Schema/SqliteSchemaManager.php b/doctrine/dbal/src/Schema/SqliteSchemaManager.php
index 3b464f21a..4b96739e1 100644
--- a/doctrine/dbal/src/Schema/SqliteSchemaManager.php
+++ b/doctrine/dbal/src/Schema/SqliteSchemaManager.php
@@ -715,7 +715,9 @@ protected function selectTableColumns(string $databaseName, ?string $tableName =
if ($tableName !== null) {
$conditions[] = 't.name = ?';
- $params[] = str_replace('.', '__', $tableName);
+ $params[] = $this->_platform->canEmulateSchemas()
+ ? str_replace('.', '__', $tableName)
+ : $tableName;
}
$sql .= ' WHERE ' . implode(' AND ', $conditions) . ' ORDER BY t.name, c.cid';
@@ -740,7 +742,9 @@ protected function selectIndexColumns(string $databaseName, ?string $tableName =
if ($tableName !== null) {
$conditions[] = 't.name = ?';
- $params[] = str_replace('.', '__', $tableName);
+ $params[] = $this->_platform->canEmulateSchemas()
+ ? str_replace('.', '__', $tableName)
+ : $tableName;
}
$sql .= ' WHERE ' . implode(' AND ', $conditions) . ' ORDER BY t.name, i.seq';
@@ -766,7 +770,9 @@ protected function selectForeignKeyColumns(string $databaseName, ?string $tableN
if ($tableName !== null) {
$conditions[] = 't.name = ?';
- $params[] = str_replace('.', '__', $tableName);
+ $params[] = $this->_platform->canEmulateSchemas()
+ ? str_replace('.', '__', $tableName)
+ : $tableName;
}
$sql .= ' WHERE ' . implode(' AND ', $conditions) . ' ORDER BY t.name, p.id DESC, p.seq';
diff --git a/doctrine/dbal/src/Tools/Console/Command/CommandCompatibility.php b/doctrine/dbal/src/Tools/Console/Command/CommandCompatibility.php
index 562b5ce45..0ef081c74 100644
--- a/doctrine/dbal/src/Tools/Console/Command/CommandCompatibility.php
+++ b/doctrine/dbal/src/Tools/Console/Command/CommandCompatibility.php
@@ -9,10 +9,32 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-if ((new ReflectionMethod(Command::class, 'execute'))->hasReturnType()) {
+// Symfony 8
+if ((new ReflectionMethod(Command::class, 'configure'))->hasReturnType()) {
/** @internal */
trait CommandCompatibility
{
+ protected function configure(): void
+ {
+ $this->doConfigure();
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ return $this->doExecute($input, $output);
+ }
+ }
+// Symfony 7
+} elseif ((new ReflectionMethod(Command::class, 'execute'))->hasReturnType()) {
+ /** @internal */
+ trait CommandCompatibility
+ {
+ /** @return void */
+ protected function configure()
+ {
+ $this->doConfigure();
+ }
+
protected function execute(InputInterface $input, OutputInterface $output): int
{
return $this->doExecute($input, $output);
@@ -22,6 +44,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
/** @internal */
trait CommandCompatibility
{
+ /** @return void */
+ protected function configure()
+ {
+ $this->doConfigure();
+ }
+
/**
* {@inheritDoc}
*
diff --git a/doctrine/dbal/src/Tools/Console/Command/ReservedWordsCommand.php b/doctrine/dbal/src/Tools/Console/Command/ReservedWordsCommand.php
index 2204b2e2a..238af5ed6 100644
--- a/doctrine/dbal/src/Tools/Console/Command/ReservedWordsCommand.php
+++ b/doctrine/dbal/src/Tools/Console/Command/ReservedWordsCommand.php
@@ -7,6 +7,7 @@
use Doctrine\DBAL\Platforms\Keywords\DB2Keywords;
use Doctrine\DBAL\Platforms\Keywords\KeywordList;
use Doctrine\DBAL\Platforms\Keywords\MariaDb102Keywords;
+use Doctrine\DBAL\Platforms\Keywords\MariaDb117Keywords;
use Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords;
use Doctrine\DBAL\Platforms\Keywords\MySQL80Keywords;
use Doctrine\DBAL\Platforms\Keywords\MySQL84Keywords;
@@ -57,6 +58,7 @@ public function __construct(ConnectionProvider $connectionProvider)
$this->keywordLists = [
'db2' => new DB2Keywords(),
'mariadb102' => new MariaDb102Keywords(),
+ 'mariadb117' => new MariaDb117Keywords(),
'mysql' => new MySQLKeywords(),
'mysql57' => new MySQL57Keywords(),
'mysql80' => new MySQL80Keywords(),
@@ -97,8 +99,7 @@ public function setKeywordListClass($name, $class)
$this->keywordLists[$name] = new $class();
}
- /** @return void */
- protected function configure()
+ private function doConfigure(): void
{
$this
->setName('dbal:reserved-words')
@@ -129,6 +130,7 @@ protected function configure()
* db2
* mariadb102
+ * mariadb117
* mysql
* mysql57
* mysql80
diff --git a/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php b/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php
index 4e5681e27..64913be67 100644
--- a/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php
+++ b/doctrine/dbal/src/Tools/Console/Command/RunSqlCommand.php
@@ -37,8 +37,7 @@ public function __construct(ConnectionProvider $connectionProvider)
$this->connectionProvider = $connectionProvider;
}
- /** @return void */
- protected function configure()
+ private function doConfigure(): void
{
$this
->setName('dbal:run-sql')
diff --git a/doctrine/dbal/src/Types/ArrayType.php b/doctrine/dbal/src/Types/ArrayType.php
index c2aa2f4de..83940bf1e 100644
--- a/doctrine/dbal/src/Types/ArrayType.php
+++ b/doctrine/dbal/src/Types/ArrayType.php
@@ -35,7 +35,6 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform)
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
- // @todo 3.0 - $value === null check to save real NULL in database
return serialize($value);
}