From 11bd9c7d8f1fa7b636916b0abdc6a2800eeb4a77 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 14 Mar 2022 11:46:31 +0200 Subject: [PATCH] update dbal --- .../Database/DBAL/Driver/PDO/MySQL/Driver.php | 8 +- composer.json | 2 +- composer.lock | 146 +++++------------- 3 files changed, 42 insertions(+), 114 deletions(-) diff --git a/application/Espo/Core/Utils/Database/DBAL/Driver/PDO/MySQL/Driver.php b/application/Espo/Core/Utils/Database/DBAL/Driver/PDO/MySQL/Driver.php index a9e9bf9200..7f15aaa3b3 100644 --- a/application/Espo/Core/Utils/Database/DBAL/Driver/PDO/MySQL/Driver.php +++ b/application/Espo/Core/Utils/Database/DBAL/Driver/PDO/MySQL/Driver.php @@ -44,30 +44,30 @@ final class Driver extends AbstractMySQLDriver { /** * {@inheritdoc} - * * @return Connection */ public function connect(array $params) { $driverOptions = $params['driverOptions'] ?? []; - if (! empty($params['persistent'])) { + if (!empty($params['persistent'])) { $driverOptions[PDO::ATTR_PERSISTENT] = true; } - return new Connection( + $pdo = new PDO( $this->constructPdoDsn($params), $params['user'] ?? '', $params['password'] ?? '', $driverOptions ); + + return new Connection($pdo); } /** * Constructs the MySQL PDO DSN. * * @param mixed[] $params - * * @return string The DSN. */ protected function constructPdoDsn(array $params) diff --git a/composer.json b/composer.json index c59128d46e..461e417b83 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "nesbot/carbon": "^2.26", "zbateson/mail-mime-parser": "1.3.*", "phpoffice/phpspreadsheet": "^1.16", - "doctrine/dbal": "^3.1.4", + "doctrine/dbal": "^3.3.3", "league/flysystem-async-aws-s3": "^2.0", "johngrogg/ics-parser": "^3.0", "laminas/laminas-zendframework-bridge": "^1.4" diff --git a/composer.lock b/composer.lock index 95f7c4567d..8f37f228e8 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": "e42414807c7e924fd913cfc7dafdd1de", + "content-hash": "e703473276c8dc1f630d38a0bf3c9ac9", "packages": [ { "name": "async-aws/core", @@ -192,79 +192,6 @@ }, "time": "2017-12-12T00:49:31+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.1", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-11-11T10:22:58+00:00" - }, { "name": "composer/semver", "version": "3.0.0", @@ -384,16 +311,16 @@ }, { "name": "doctrine/cache", - "version": "1.10.2", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "13e3381b25847283a91948d04640543941309727" + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", - "reference": "13e3381b25847283a91948d04640543941309727", + "url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce", + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce", "shasum": "" }, "require": { @@ -404,20 +331,19 @@ }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^6.0", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^8.0", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", + "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" @@ -464,7 +390,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.10.x" + "source": "https://github.com/doctrine/cache/tree/2.1.1" }, "funding": [ { @@ -480,40 +406,42 @@ "type": "tidelift" } ], - "time": "2020-07-07T18:54:01+00:00" + "time": "2021-07-17T14:49:29+00:00" }, { "name": "doctrine/dbal", - "version": "3.1.5", + "version": "3.3.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "187916074db413f4a070a721c9d30b420a9135dd" + "reference": "82331b861727c15b1f457ef05a8729e508e7ead5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/187916074db413f4a070a721c9d30b420a9135dd", - "reference": "187916074db413f4a070a721c9d30b420a9135dd", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/82331b861727c15b1f457ef05a8729e508e7ead5", + "reference": "82331b861727c15b1f457ef05a8729e508e7ead5", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.11.99", - "doctrine/cache": "^1.0|^2.0", + "composer-runtime-api": "^2", + "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", - "php": "^7.3 || ^8.0" + "php": "^7.3 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" }, "require-dev": { "doctrine/coding-standard": "9.0.0", "jetbrains/phpstorm-stubs": "2021.1", - "phpstan/phpstan": "1.2.0", + "phpstan/phpstan": "1.4.6", "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "9.5.10", + "phpunit/phpunit": "9.5.16", "psalm/plugin-phpunit": "0.16.1", - "squizlabs/php_codesniffer": "3.6.1", + "squizlabs/php_codesniffer": "3.6.2", "symfony/cache": "^5.2|^6.0", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0", - "vimeo/psalm": "4.13.0" + "symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0", + "vimeo/psalm": "4.22.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -573,7 +501,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.1.5" + "source": "https://github.com/doctrine/dbal/tree/3.3.3" }, "funding": [ { @@ -589,7 +517,7 @@ "type": "tidelift" } ], - "time": "2021-11-25T23:30:13+00:00" + "time": "2022-03-09T15:39:50+00:00" }, { "name": "doctrine/deprecations", @@ -2971,16 +2899,16 @@ }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -3004,7 +2932,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -3015,9 +2943,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache",