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..aa1933b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,27 @@ - - + + 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,