From 1021371367088349bad7615a6c119bf55346c0b4 Mon Sep 17 00:00:00 2001 From: Aliaksei Sanikovich Date: Thu, 26 Sep 2024 20:27:12 +0200 Subject: [PATCH] v3.0 Release --- .github/workflows/tests.yml | 2 +- .gitignore | 2 +- README.md | 1 + composer.json | 4 ++-- phpunit.xml.dist | 22 ++++++++++++++++++++-- src/ClickHouseSchemaManager.php | 4 ++-- 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cb02c9e..68bc5d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: - php-versions: ['8.0', '8.1', '8.2'] + php-versions: ['8.1', '8.2', '8.3'] fail-fast: false services: diff --git a/.gitignore b/.gitignore index 11e3515..8feb9b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /.idea/ /vendor/ -/.phpunit.result.cache +/.phpunit.cache/ /composer.lock /phpunit.xml diff --git a/README.md b/README.md index cb81a00..5624502 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Doctrine DBAL driver for ClickHouse - an open-source column-oriented database ma **Driver is suitable for Symfony or any other framework using Doctrine.** +* [v3](https://github.com/FriendsOfDoctrine/dbal-clickhouse/releases?q=v3.) supports Doctrine DBAL 4+ and PHP 8.1+ * [v2](https://github.com/FriendsOfDoctrine/dbal-clickhouse/releases?q=v2.) supports Doctrine DBAL 3+ and PHP 8.0+ * [v1](https://github.com/FriendsOfDoctrine/dbal-clickhouse/releases?q=v1.) supports Doctrine DBAL 2+ and PHP 7.1+ diff --git a/composer.json b/composer.json index a04ccf5..a57f7bf 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ } ], "require": { - "php": "^8.0", + "php": "^8.1", "ext-pcre": "*", "ext-mbstring": "*", "doctrine/dbal": "^4.0", @@ -33,7 +33,7 @@ }, "require-dev": { "doctrine/coding-standard": "^4.0 || ^9.0", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5 || ^10.0 || ^11.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e42f2f2..2ed524e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,28 @@ - - + + tests + + + + src + + + + + + diff --git a/src/ClickHouseSchemaManager.php b/src/ClickHouseSchemaManager.php index d2bb1f5..efc6f9a 100644 --- a/src/ClickHouseSchemaManager.php +++ b/src/ClickHouseSchemaManager.php @@ -68,7 +68,7 @@ public function listTableIndexes(string $table): array $tableView = $this->_getPortableViewDefinition(['name' => $table]); preg_match( - '/MergeTree\(([\w+, \(\)]+)(?= \(((?:[^()]|\((?2)\))+)\),)/mi', + '/MergeTree\(([\w+, ()]+)(?= \(((?:[^()]|\((?2)\))+)\),)/mi', $tableView->getSql(), $matches ); @@ -80,7 +80,7 @@ public function listTableIndexes(string $table): array ); return [ - new Index( + 'primary' => new Index( current(array_reverse(explode('.', $table))) . '__pk', $indexColumns, false,