Skip to content

Commit 9d064cb

Browse files
authored
Merge pull request #49 from simPod/php7.4
Require PHP 7.4
2 parents a4caec9 + 9ebee9f commit 9d064cb

17 files changed

+45
-77
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install PHP
2020
uses: shivammathur/[email protected]
2121
with:
22-
php-version: 7.3
22+
php-version: 7.4
2323
coverage: none
2424
extensions: json
2525
tools: cs2pr
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install PHP
5252
uses: shivammathur/[email protected]
5353
with:
54-
php-version: 7.3
54+
php-version: 7.4
5555
coverage: none
5656
extensions: json
5757
tools: cs2pr
@@ -90,7 +90,7 @@ jobs:
9090
- name: Install PHP
9191
uses: shivammathur/[email protected]
9292
with:
93-
php-version: 7.3
93+
php-version: 7.4
9494
coverage: pcov
9595
extensions: json
9696

@@ -122,7 +122,7 @@ jobs:
122122
runs-on: ubuntu-18.04
123123
strategy:
124124
matrix:
125-
php: [7.3, 7.4]
125+
php: [7.4]
126126
env: [
127127
'DEPENDENCIES=--prefer-lowest',
128128
'',

.github/workflows/infection.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install PHP
2424
uses: shivammathur/[email protected]
2525
with:
26-
php-version: 7.3
26+
php-version: 7.4
2727
coverage: xdebug
2828
extensions: json
2929

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"sort-packages": true
2222
},
2323
"require": {
24-
"php-64bit": "^7.3",
24+
"php-64bit": "^7.4",
2525
"guzzlehttp/promises": "^1.3",
2626
"psr/http-client": "^1.0",
2727
"psr/http-factory": "^1.0",

phpcs.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
<rule ref="Cdn77">
1616
<exclude name="SlevomatCodingStandard.Files.LineLength"/>
17-
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint" />
1817
</rule>
1918

2019
<rule ref="SlevomatCodingStandard.Files.LineLength">

src/Client/Http/RequestFactory.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515

1616
final class RequestFactory
1717
{
18-
/** @var RequestFactoryInterface */
19-
private $requestFactory;
18+
private RequestFactoryInterface $requestFactory;
2019

21-
/** @var UriFactoryInterface */
22-
private $uriFactory;
20+
private UriFactoryInterface $uriFactory;
2321

24-
/** @var StreamFactoryInterface */
25-
private $streamFactory;
22+
private StreamFactoryInterface $streamFactory;
2623

2724
public function __construct(
2825
RequestFactoryInterface $requestFactory,

src/Client/Http/RequestOptions.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66

77
final class RequestOptions
88
{
9-
/** @var string */
10-
public $sql;
9+
public string $sql;
1110

1211
/** @var array<string, float|int|string> */
13-
public $parameters;
12+
public array $parameters;
1413

1514
/**
1615
* @param array<string, float|int|string> $defaultParameters

src/Client/PsrClickHouseAsyncClient.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,18 @@
2121

2222
class PsrClickHouseAsyncClient implements ClickHouseAsyncClient
2323
{
24-
/** @var HttpAsyncClient */
25-
private $asyncClient;
24+
private HttpAsyncClient $asyncClient;
2625

27-
/** @var RequestFactory */
28-
private $requestFactory;
26+
private RequestFactory $requestFactory;
2927

30-
/** @var LoggerInterface */
31-
private $logger;
28+
private LoggerInterface $logger;
3229

33-
/** @var string */
34-
private $endpoint;
30+
private string $endpoint;
3531

3632
/** @var array<string, float|int|string> */
37-
private $defaultParameters;
33+
private array $defaultParameters;
3834

39-
/** @var SqlFactory */
40-
private $sqlFactory;
35+
private SqlFactory $sqlFactory;
4136

4237
/** @param array<string, float|int|string> $defaultParameters */
4338
public function __construct(

src/Client/PsrClickHouseClient.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,20 @@
2727

2828
class PsrClickHouseClient implements ClickHouseClient
2929
{
30-
/** @var ClientInterface */
31-
private $client;
30+
private ClientInterface $client;
3231

33-
/** @var RequestFactory */
34-
private $requestFactory;
32+
private RequestFactory $requestFactory;
3533

36-
/** @var LoggerInterface */
37-
private $logger;
34+
private LoggerInterface $logger;
3835

39-
/** @var string */
40-
private $endpoint;
36+
private string $endpoint;
4137

4238
/** @var array<string, float|int|string> */
43-
private $defaultParameters;
39+
private array $defaultParameters;
4440

45-
/** @var ValueFormatter */
46-
private $valueFormatter;
41+
private ValueFormatter $valueFormatter;
4742

48-
/** @var SqlFactory */
49-
private $sqlFactory;
43+
private SqlFactory $sqlFactory;
5044

5145
/** @param array<string, float|int|string> $defaultParameters */
5246
public function __construct(

src/Output/Json.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@
1010
final class Json implements Output
1111
{
1212
/** @var array<array<string, mixed>> */
13-
public $data;
13+
public array $data;
1414

1515
/** @var array<mixed> */
16-
public $meta;
16+
public array $meta;
1717

18-
/** @var int */
19-
public $rows;
18+
public int $rows;
2019

21-
/** @var int|null */
22-
public $rowsBeforeLimitAtLeast;
20+
public ?int $rowsBeforeLimitAtLeast = null;
2321

2422
/** @var array{elapsed: float, rows_read: int, bytes_read: int} */
25-
public $statistics;
23+
public array $statistics;
2624

2725
public function __construct(string $contentsJson)
2826
{

src/Output/JsonCompact.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@
1010
final class JsonCompact implements Output
1111
{
1212
/** @var array<array<mixed>> */
13-
public $data;
13+
public array $data;
1414

1515
/** @var array<mixed> */
16-
public $meta;
16+
public array $meta;
1717

18-
/** @var int */
19-
public $rows;
18+
public int $rows;
2019

21-
/** @var int|null */
22-
public $rowsBeforeLimitAtLeast;
20+
public ?int $rowsBeforeLimitAtLeast = null;
2321

2422
/** @var array{elapsed: float, rows_read: int, bytes_read: int} */
25-
public $statistics;
23+
public array $statistics;
2624

2725
public function __construct(string $contentsJson)
2826
{

0 commit comments

Comments
 (0)