diff --git a/composer.json b/composer.json index 8a577fcce..adf0eba87 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.10.2", + "doctrine/dbal": "^3.10.4", "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 1b5783f3e..2f8efbef8 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": "8110f8f87497db7a91ff9663391fa167", + "content-hash": "0172cd7ac737d55f3d837974dd95e92c", "packages": [ { "name": "aws/aws-crt-php", @@ -435,16 +435,16 @@ }, { "name": "doctrine/dbal", - "version": "3.10.2", + "version": "3.10.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282" + "reference": "63a46cb5aa6f60991186cc98c1d1b50c09311868" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c6c16cf787eaba3112203dfcd715fa2059c62282", - "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/63a46cb5aa6f60991186cc98c1d1b50c09311868", + "reference": "63a46cb5aa6f60991186cc98c1d1b50c09311868", "shasum": "" }, "require": { @@ -460,16 +460,16 @@ }, "require-dev": { "doctrine/cache": "^1.11|^2.0", - "doctrine/coding-standard": "13.0.1", + "doctrine/coding-standard": "14.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "2.1.22", + "phpstan/phpstan": "2.1.30", "phpstan/phpstan-strict-rules": "^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" + "phpunit/phpunit": "9.6.29", + "slevomat/coding-standard": "8.24.0", + "squizlabs/php_codesniffer": "4.0.0", + "symfony/cache": "^5.4|^6.0|^7.0|^8.0", + "symfony/console": "^4.4|^5.4|^6.0|^7.0|^8.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -529,7 +529,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.10.2" + "source": "https://github.com/doctrine/dbal/tree/3.10.4" }, "funding": [ { @@ -545,7 +545,7 @@ "type": "tidelift" } ], - "time": "2025-09-04T23:51:27+00:00" + "time": "2025-11-29T10:46:08+00:00" }, { "name": "doctrine/deprecations", diff --git a/composer/installed.json b/composer/installed.json index 50a6a3225..d893772b3 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -450,17 +450,17 @@ }, { "name": "doctrine/dbal", - "version": "3.10.2", - "version_normalized": "3.10.2.0", + "version": "3.10.4", + "version_normalized": "3.10.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282" + "reference": "63a46cb5aa6f60991186cc98c1d1b50c09311868" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c6c16cf787eaba3112203dfcd715fa2059c62282", - "reference": "c6c16cf787eaba3112203dfcd715fa2059c62282", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/63a46cb5aa6f60991186cc98c1d1b50c09311868", + "reference": "63a46cb5aa6f60991186cc98c1d1b50c09311868", "shasum": "" }, "require": { @@ -476,21 +476,21 @@ }, "require-dev": { "doctrine/cache": "^1.11|^2.0", - "doctrine/coding-standard": "13.0.1", + "doctrine/coding-standard": "14.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "2.1.22", + "phpstan/phpstan": "2.1.30", "phpstan/phpstan-strict-rules": "^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" + "phpunit/phpunit": "9.6.29", + "slevomat/coding-standard": "8.24.0", + "squizlabs/php_codesniffer": "4.0.0", + "symfony/cache": "^5.4|^6.0|^7.0|^8.0", + "symfony/console": "^4.4|^5.4|^6.0|^7.0|^8.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." }, - "time": "2025-09-04T23:51:27+00:00", + "time": "2025-11-29T10:46:08+00:00", "bin": [ "bin/doctrine-dbal" ], @@ -547,7 +547,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.10.2" + "source": "https://github.com/doctrine/dbal/tree/3.10.4" }, "funding": [ { diff --git a/composer/installed.php b/composer/installed.php index 89266720e..52691d9da 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -74,9 +74,9 @@ 'dev_requirement' => false, ), 'doctrine/dbal' => array( - 'pretty_version' => '3.10.2', - 'version' => '3.10.2.0', - 'reference' => 'c6c16cf787eaba3112203dfcd715fa2059c62282', + 'pretty_version' => '3.10.4', + 'version' => '3.10.4.0', + 'reference' => '63a46cb5aa6f60991186cc98c1d1b50c09311868', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/dbal', 'aliases' => array(), diff --git a/doctrine/dbal/src/Driver/AbstractDB2Driver.php b/doctrine/dbal/src/Driver/AbstractDB2Driver.php index 81d84328c..682ed7a19 100644 --- a/doctrine/dbal/src/Driver/AbstractDB2Driver.php +++ b/doctrine/dbal/src/Driver/AbstractDB2Driver.php @@ -18,7 +18,7 @@ use function version_compare; /** - * Abstract base implementation of the {@see Driver} interface for IBM DB2 based drivers. + * Abstract base implementation of the {@see Driver} interface for Db2 based drivers. */ abstract class AbstractDB2Driver implements VersionAwarePlatformDriver { @@ -66,17 +66,17 @@ public function createDatabasePlatformForVersion($version) 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.', + 'Db2 < 11.1 support is deprecated and will be removed in DBAL 4.' + . ' Consider upgrading to Db2 11.1 or later.', ); return $this->getDatabasePlatform(); } /** - * Detects IBM DB2 server version + * Detects Db2 server version * - * @param string $versionString Version string as returned by IBM DB2 server, i.e. 'DB2/LINUXX8664 11.5.8.0' + * @param string $versionString Version string as returned by Db2 server, i.e. 'DB2/LINUXX8664 11.5.8.0' * * @throws DBALException */ diff --git a/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php b/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php index 124a6f6db..1840b8a3a 100644 --- a/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php +++ b/doctrine/dbal/src/Driver/IBMDB2/DataSourceName.php @@ -11,7 +11,7 @@ use function strpos; /** - * IBM DB2 DSN + * Db2 DSN */ final class DataSourceName { diff --git a/doctrine/dbal/src/Driver/IBMDB2/Statement.php b/doctrine/dbal/src/Driver/IBMDB2/Statement.php index 699e236d7..be5831fba 100644 --- a/doctrine/dbal/src/Driver/IBMDB2/Statement.php +++ b/doctrine/dbal/src/Driver/IBMDB2/Statement.php @@ -174,7 +174,8 @@ private function bindLobs(): array foreach ($this->lobs as $param => $value) { if (is_resource($value)) { $handle = $handles[] = $this->createTemporaryFile(); - $path = stream_get_meta_data($handle)['uri']; + $path = stream_get_meta_data($handle)['uri'] ?? null; + assert($path !== null); $this->copyStreamToStream($value, $handle); diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php index f5755932b..731a6aa94 100644 --- a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php +++ b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionError.php @@ -9,6 +9,8 @@ use mysqli_sql_exception; use ReflectionProperty; +use const PHP_VERSION_ID; + /** @internal */ final class ConnectionError extends AbstractException { @@ -20,7 +22,9 @@ 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); + if (PHP_VERSION_ID < 80100) { + $p->setAccessible(true); + } return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception); } diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php index 051f141fd..414bf3d06 100644 --- a/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php +++ b/doctrine/dbal/src/Driver/Mysqli/Exception/ConnectionFailed.php @@ -11,6 +11,8 @@ use function assert; +use const PHP_VERSION_ID; + /** @internal */ final class ConnectionFailed extends AbstractException { @@ -25,7 +27,9 @@ 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); + if (PHP_VERSION_ID < 80100) { + $p->setAccessible(true); + } return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception); } diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php b/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php index 71a5bc60b..21c78b6fa 100644 --- a/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php +++ b/doctrine/dbal/src/Driver/Mysqli/Exception/InvalidCharset.php @@ -11,6 +11,8 @@ use function sprintf; +use const PHP_VERSION_ID; + /** @internal */ final class InvalidCharset extends AbstractException { @@ -26,7 +28,9 @@ 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); + if (PHP_VERSION_ID < 80100) { + $p->setAccessible(true); + } return new self( sprintf('Failed to set charset "%s": %s', $charset, $exception->getMessage()), diff --git a/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php b/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php index 716e2cd24..d099d254a 100644 --- a/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php +++ b/doctrine/dbal/src/Driver/Mysqli/Exception/StatementError.php @@ -9,6 +9,8 @@ use mysqli_stmt; use ReflectionProperty; +use const PHP_VERSION_ID; + /** @internal */ final class StatementError extends AbstractException { @@ -20,7 +22,9 @@ 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); + if (PHP_VERSION_ID < 80100) { + $p->setAccessible(true); + } return new self($exception->getMessage(), $p->getValue($exception), (int) $exception->getCode(), $exception); } diff --git a/doctrine/dbal/src/Driver/PDO/PDOConnect.php b/doctrine/dbal/src/Driver/PDO/PDOConnect.php index 346c6cd59..43bb3c93b 100644 --- a/doctrine/dbal/src/Driver/PDO/PDOConnect.php +++ b/doctrine/dbal/src/Driver/PDO/PDOConnect.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Driver\PDO; use PDO; +use SensitiveParameter; use const PHP_VERSION_ID; @@ -13,8 +14,10 @@ trait PDOConnect { /** @param array $options */ private function doConnect( + #[SensitiveParameter] string $dsn, string $username, + #[SensitiveParameter] string $password, array $options ): PDO { diff --git a/doctrine/dbal/src/Platforms/DB2111Platform.php b/doctrine/dbal/src/Platforms/DB2111Platform.php index 40ab42f6e..c1087151f 100644 --- a/doctrine/dbal/src/Platforms/DB2111Platform.php +++ b/doctrine/dbal/src/Platforms/DB2111Platform.php @@ -7,9 +7,9 @@ use function sprintf; /** - * Provides the behavior, features and SQL dialect of the IBM DB2 11.1 (11.1 GA) database platform. + * Provides the behavior, features and SQL dialect of the Db2 11.1 (11.1 GA) database platform. * - * @deprecated This class will be merged with {@see DB2Platform} in 4.0 because support for IBM DB2 + * @deprecated This class will be merged with {@see DB2Platform} in 4.0 because support for Db2 * releases prior to 11.1 will be dropped. * * @see https://www.ibm.com/docs/en/db2/11.1?topic=database-whats-new-db2-version-111-ga diff --git a/doctrine/dbal/src/Platforms/DB2Platform.php b/doctrine/dbal/src/Platforms/DB2Platform.php index 69234f410..18d19bb26 100644 --- a/doctrine/dbal/src/Platforms/DB2Platform.php +++ b/doctrine/dbal/src/Platforms/DB2Platform.php @@ -26,7 +26,7 @@ use function strpos; /** - * Provides the behavior, features and SQL dialect of the IBM DB2 database platform of the oldest supported version. + * Provides the behavior, features and SQL dialect of the Db2 database platform of the oldest supported version. */ class DB2Platform extends AbstractPlatform { @@ -104,7 +104,7 @@ public function getBinaryDefaultLength() */ public function getVarcharTypeDeclarationSQL(array $column) { - // for IBM DB2, the CHAR max length is less than VARCHAR default length + // for Db2, the CHAR max length is less than VARCHAR default length if (! isset($column['length']) && ! empty($column['fixed'])) { $column['length'] = $this->getCharMaxLength(); } @@ -175,7 +175,7 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed/*, $lengt Deprecation::trigger( 'doctrine/dbal', 'https://github.com/doctrine/dbal/issues/3263', - 'Relying on the default string column length on IBM DB2 is deprecated' + 'Relying on the default string column length on Db2 is deprecated' . ', specify the length explicitly.', ); } @@ -193,8 +193,8 @@ protected function getBinaryTypeDeclarationSQLSnippet($length, $fixed/*, $length Deprecation::trigger( 'doctrine/dbal', 'https://github.com/doctrine/dbal/issues/3263', - 'Relying on the default binary column length on IBM DB2 is deprecated' - . ', specify the length explicitly.', + 'Relying on the default binary column length on Db2 is deprecated' + . ', specify the length explicitly.', ); } @@ -1004,9 +1004,9 @@ public function getDummySelectSQL() /** * {@inheritDoc} * - * DB2 supports savepoints, but they work semantically different than on other vendor platforms. + * Db2 supports savepoints, but they work semantically different than on other vendor platforms. * - * TODO: We have to investigate how to get DB2 up and running with savepoints. + * TODO: We have to investigate how to get Db2 up and running with savepoints. */ public function supportsSavepoints() { diff --git a/doctrine/dbal/src/Platforms/Keywords/DB2Keywords.php b/doctrine/dbal/src/Platforms/Keywords/DB2Keywords.php index d5dbbd734..9e3ab367d 100644 --- a/doctrine/dbal/src/Platforms/Keywords/DB2Keywords.php +++ b/doctrine/dbal/src/Platforms/Keywords/DB2Keywords.php @@ -5,7 +5,7 @@ use Doctrine\Deprecations\Deprecation; /** - * DB2 Keywords. + * Db2 Keywords. */ class DB2Keywords extends KeywordList { diff --git a/doctrine/dbal/src/Schema/DB2SchemaManager.php b/doctrine/dbal/src/Schema/DB2SchemaManager.php index a07136fec..8f6e55f92 100644 --- a/doctrine/dbal/src/Schema/DB2SchemaManager.php +++ b/doctrine/dbal/src/Schema/DB2SchemaManager.php @@ -21,7 +21,7 @@ use const CASE_LOWER; /** - * IBM Db2 Schema Manager. + * Db2 Schema Manager. * * @extends AbstractSchemaManager */ diff --git a/doctrine/dbal/src/Schema/Visitor/DropSchemaSqlCollector.php b/doctrine/dbal/src/Schema/Visitor/DropSchemaSqlCollector.php index ddec6b4ae..d746b2aee 100644 --- a/doctrine/dbal/src/Schema/Visitor/DropSchemaSqlCollector.php +++ b/doctrine/dbal/src/Schema/Visitor/DropSchemaSqlCollector.php @@ -42,7 +42,7 @@ public function __construct(AbstractPlatform $platform) */ public function acceptTable(Table $table) { - $this->tables->attach($table); + $this->tables->offsetSet($table); } /** @@ -54,7 +54,7 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons throw SchemaException::namedForeignKeyRequired($localTable, $fkConstraint); } - $this->constraints->attach($fkConstraint, $localTable); + $this->constraints->offsetSet($fkConstraint, $localTable); } /** @@ -62,7 +62,7 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons */ public function acceptSequence(Sequence $sequence) { - $this->sequences->attach($sequence); + $this->sequences->offsetSet($sequence); } /** @return void */