Skip to content

Commit d2927af

Browse files
authored
v3.0 Release (#70)
v3.0 supports Doctrine DBAL 4+ and PHP 8.1+
1 parent f7d0dda commit d2927af

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
php-versions: ['8.0', '8.1', '8.2']
22+
php-versions: ['8.1', '8.2', '8.3']
2323
fail-fast: false
2424

2525
services:

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/.idea/
22
/vendor/
3-
/.phpunit.result.cache
3+
/.phpunit.cache/
44
/composer.lock
55
/phpunit.xml

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Doctrine DBAL driver for ClickHouse - an open-source column-oriented database ma
1010

1111
**Driver is suitable for Symfony or any other framework using Doctrine.**
1212

13+
* [v3](https://github.com/FriendsOfDoctrine/dbal-clickhouse/releases?q=v3.) supports Doctrine DBAL 4+ and PHP 8.1+
1314
* [v2](https://github.com/FriendsOfDoctrine/dbal-clickhouse/releases?q=v2.) supports Doctrine DBAL 3+ and PHP 8.0+
1415
* [v1](https://github.com/FriendsOfDoctrine/dbal-clickhouse/releases?q=v1.) supports Doctrine DBAL 2+ and PHP 7.1+
1516

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
}
2626
],
2727
"require": {
28-
"php": "^8.0",
28+
"php": "^8.1",
2929
"ext-pcre": "*",
3030
"ext-mbstring": "*",
3131
"doctrine/dbal": "^4.0",
3232
"smi2/phpclickhouse": "^1.0"
3333
},
3434
"require-dev": {
3535
"doctrine/coding-standard": "^4.0 || ^9.0",
36-
"phpunit/phpunit": "^9.5"
36+
"phpunit/phpunit": "^9.5 || ^10.0 || ^11.0"
3737
},
3838
"autoload": {
3939
"psr-4": {

phpunit.xml.dist

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<phpunit bootstrap="vendor/autoload.php" colors="true">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheResultFile=".phpunit.cache/test-results"
6+
beStrictAboutOutputDuringTests="true"
7+
beStrictAboutTodoAnnotatedTests="true"
8+
failOnRisky="true"
9+
failOnWarning="true">
310
<testsuites>
411
<testsuite name="ClickHouse">
512
<directory>tests</directory>
613
</testsuite>
714
</testsuites>
15+
16+
<source>
17+
<include>
18+
<directory suffix=".php">src</directory>
19+
</include>
20+
</source>
21+
22+
<coverage cacheDirectory=".phpunit.cache/code-coverage">
23+
</coverage>
24+
825
<php>
926
<const name="phpunit_ch_host" value="localhost"/>
1027
<const name="phpunit_ch_port" value="8123"/>

src/ClickHouseSchemaManager.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function listTableIndexes(string $table): array
6868
$tableView = $this->_getPortableViewDefinition(['name' => $table]);
6969

7070
preg_match(
71-
'/MergeTree\(([\w+, \(\)]+)(?= \(((?:[^()]|\((?2)\))+)\),)/mi',
71+
'/MergeTree\(([\w+, ()]+)(?= \(((?:[^()]|\((?2)\))+)\),)/mi',
7272
$tableView->getSql(),
7373
$matches
7474
);
@@ -80,7 +80,7 @@ public function listTableIndexes(string $table): array
8080
);
8181

8282
return [
83-
new Index(
83+
'primary' => new Index(
8484
current(array_reverse(explode('.', $table))) . '__pk',
8585
$indexColumns,
8686
false,

0 commit comments

Comments
 (0)