Skip to content

Commit 20abd84

Browse files
committed
allow php 7.1
1 parent bdf8940 commit 20abd84

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"nette/utils": ">=2.4.0"
99
},
1010
"require-dev": {
11-
"editorconfig-checker/editorconfig-checker": "^10.2",
11+
"editorconfig-checker/editorconfig-checker": "^8.0",
1212
"phpstan/phpstan": "^0.12.94",
1313
"phpstan/phpstan-phpunit": "^0.12.22",
1414
"phpstan/phpstan-strict-rules": "^0.12.10",
15-
"phpunit/phpunit": "^9.5",
15+
"phpunit/phpunit": "^7.5",
1616
"slevomat/coding-standard": "^7.0"
1717
},
1818
"config": {
@@ -29,6 +29,6 @@
2929
}
3030
},
3131
"scripts": {
32-
"check": "ec && phpcs && phpstan analyse -vvv && phpunit -vvv tests"
32+
"check": "editorconfig-checker src/* tests/* *.dist && phpcs && phpstan analyse -vvv && phpunit -vvv tests"
3333
}
3434
}

phpcs.xml.dist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@
245245
</rule>
246246

247247
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
248-
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference" />
248+
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference">
249+
<exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall"/> <!-- after bumping to PHP8 -->
250+
</rule>
249251
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" />
250252
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
251253
<properties>

phpstan.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ includes:
22
- phar://phpstan.phar/conf/config.levelmax.neon
33
- phar://phpstan.phar/conf/bleedingEdge.neon
44
- ./vendor/phpstan/phpstan-strict-rules/rules.neon
5+
- ./vendor/phpstan/phpstan-phpunit/extension.neon
6+
- ./vendor/phpstan/phpstan-phpunit/rules.neon
57

68
parameters:
79
paths:

tests/Doctrine/MySql/UseIndexSqlWalkerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testWalker(string $dql, callable $configureQueryCallback, ?strin
2424
{
2525
if ($expectedError !== null) {
2626
$this->expectException(LogicException::class);
27-
$this->expectExceptionMessageMatches($expectedError);
27+
$this->expectExceptionMessageRegExp($expectedError);
2828
}
2929

3030
$entityManagerMock = $this->createEntityManagerMock();
@@ -105,7 +105,7 @@ static function (Query $query): void {
105105
static function (Query $query): void {
106106
$query->setHint(
107107
UseIndexSqlWalker::class,
108-
[IndexHint::use('IDX_FOO', Account::TABLE_NAME, 'a')],
108+
[IndexHint::use('IDX_FOO', Account::TABLE_NAME, 'a')]
109109
);
110110
},
111111
'SELECT u0_.id AS id_0, u0_.account_id AS account_id_1'
@@ -121,7 +121,7 @@ static function (Query $query): void {
121121
[
122122
IndexHint::use('IDX_FOO', Account::TABLE_NAME, 'a'),
123123
IndexHint::ignore('IDX_BAR', Account::TABLE_NAME, 'a'),
124-
],
124+
]
125125
);
126126
},
127127
'SELECT u0_.id AS id_0, u0_.account_id AS account_id_1'
@@ -137,7 +137,7 @@ static function (Query $query): void {
137137
[
138138
IndexHint::use('IDX_FOO', Account::TABLE_NAME, 'a'),
139139
IndexHint::use('IDX_BAR', Account::TABLE_NAME, 'a'),
140-
],
140+
]
141141
);
142142
},
143143
'SELECT u0_.id AS id_0, u0_.account_id AS account_id_1'
@@ -155,7 +155,7 @@ static function (Query $query): void {
155155
IndexHint::use('IDX_FOO', Account::TABLE_NAME, 'a'),
156156
IndexHint::use('IDX_BAR', Account::TABLE_NAME, 'ma'),
157157
IndexHint::use('IDX_BAZ', Account::TABLE_NAME, 'ma'),
158-
],
158+
]
159159
);
160160
},
161161
'SELECT u0_.id AS id_0, u0_.account_id AS account_id_1'
@@ -193,7 +193,7 @@ static function (Query $query): void {
193193
UseIndexSqlWalker::class,
194194
[
195195
IndexHint::use('IDX_FOO', 'unknown_table'),
196-
],
196+
]
197197
);
198198
},
199199
null,
@@ -207,7 +207,7 @@ static function (Query $query): void {
207207
UseIndexSqlWalker::class,
208208
[
209209
IndexHint::use('IDX_FOO', User::TABLE_NAME, 'unknown_alias'),
210-
],
210+
]
211211
);
212212
},
213213
null,
@@ -219,7 +219,7 @@ static function (Query $query): void {
219219
static function (Query $query): void {
220220
$query->setHint(
221221
UseIndexSqlWalker::class,
222-
IndexHint::use('IDX_FOO', User::TABLE_NAME),
222+
IndexHint::use('IDX_FOO', User::TABLE_NAME)
223223
);
224224
},
225225
null,
@@ -233,7 +233,7 @@ static function (Query $query): void {
233233
UseIndexSqlWalker::class,
234234
[
235235
new stdClass(),
236-
],
236+
]
237237
);
238238
},
239239
null,
@@ -245,7 +245,7 @@ static function (Query $query): void {
245245
static function (Query $query): void {
246246
$query->setHint(
247247
UseIndexSqlWalker::class,
248-
[IndexHint::use('IDX_FOO', Account::TABLE_NAME)],
248+
[IndexHint::use('IDX_FOO', Account::TABLE_NAME)]
249249
);
250250
},
251251
null,

0 commit comments

Comments
 (0)