Skip to content

Commit 44ee56c

Browse files
authored
Guzzle up to 7.x (support laravel 8.x) (#14)
* Guzzle up to 7.x * change satooshi/php-coveralls library to php-coveralls/php-coveralls * fix mockery/mockery * fix phpcov * fix "The attribute 'charset' is not allowed." * add php 7.2+ to travis ci * fix php7.3+
1 parent 46ccafe commit 44ee56c

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ language: php
22

33
php:
44
- '7.1'
5+
- '7.2'
6+
- '7.3'
7+
- '7.4'
58

69
sudo: required
710

@@ -12,9 +15,6 @@ compiler:
1215
- clang
1316
- g++
1417

15-
before_install:
16-
- composer require satooshi/php-coveralls
17-
1818
before_script:
1919
- composer self-update
2020
- composer install --prefer-source --dev

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
},
2020
"require": {
2121
"php": "~7.1",
22-
"guzzlehttp/guzzle": "~6.0",
23-
"satooshi/php-coveralls": "^2.2"
22+
"guzzlehttp/guzzle": "~6.0|~7.0"
2423
},
2524
"bin": [
2625
"bin/ccat_linux",
2726
"bin/ccat_darwin"
2827
],
2928
"require-dev": {
30-
"mockery/mockery": "^0.9.9",
31-
"phpunit/php-code-coverage": "^6.0",
32-
"phpunit/phpunit": "~7.0"
29+
"mockery/mockery": "^0.9|^1.4",
30+
"phpunit/phpunit": "^7.0|^8.0|^9.0",
31+
"php-coveralls/php-coveralls": "^2.2",
32+
"phpunit/phpcov": "^5.0|^6.0|^7.0|^8.0"
3333
},
3434
"scripts": {
3535
"test": "phpunit --coverage-text --colors=never"

phpunit.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</whitelist>
2121
</filter>
2222
<logging>
23-
<log type="coverage-html" target="coverage" charset="UTF-8"/>
23+
<log type="coverage-html" target="coverage"/>
2424
</logging>
2525
<php>
2626
<const name="CLICKHOUSE_SERVER_HOST" value="127.0.0.1"/>

tests/HttpTransportTest.php

+12-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,12 @@ public function testConnectionWithPassword()
377377
$transport = $this->getTransport();
378378

379379
$this->expectException(TransportException::class);
380-
$this->expectExceptionMessageRegExp('/Authentication failed: password is incorrect/');
380+
$regularExpression = '/Authentication failed: password is incorrect/';
381+
if (method_exists($this, 'expectExceptionMessageRegExp')) {
382+
$this->expectExceptionMessageRegExp($regularExpression);
383+
} else {
384+
$this->expectErrorMessageMatches($regularExpression);
385+
}
381386

382387
$transport->read([
383388
new Query(new Server('127.0.0.1', 8123, 'default', 'default', 'pass'), 'select 1', [
@@ -391,7 +396,12 @@ public function testConnectionWithPasswordOnWrite()
391396
$transport = $this->getTransport();
392397

393398
$this->expectException(TransportException::class);
394-
$this->expectExceptionMessageRegExp('/Authentication failed: password is incorrect/');
399+
$regularExpression = '/Authentication failed: password is incorrect/';
400+
if (method_exists($this, 'expectExceptionMessageRegExp')) {
401+
$this->expectExceptionMessageRegExp($regularExpression);
402+
} else {
403+
$this->expectErrorMessageMatches($regularExpression);
404+
}
395405

396406
$transport->write([
397407
new Query(new Server('127.0.0.1', 8123, 'default', 'default', 'pass'), 'insert into table 1', [

0 commit comments

Comments
 (0)