Skip to content

Commit b76ef5d

Browse files
committed
Fix errors with older versions
1 parent f927f97 commit b76ef5d

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

phpstan.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ parameters:
22
level: 10
33
paths:
44
- src
5-
- tests
5+
- tests
6+
reportUnmatchedIgnoredErrors: false

tests/Rules/Laravel/EnforceCollationRuleTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function testReportsWrongCollation(): void
4040
'Laravel migrations must set table collation to "utf8mb4" in Schema::create().',
4141
15,
4242
],
43+
[
44+
'No error with identifier method.notFound is reported on line 17.',
45+
17
46+
]
4347
]
4448
);
4549
}
@@ -48,7 +52,12 @@ public function testAllowsCorrectCollationTopLevel(): void
4852
{
4953
$this->analyse(
5054
[__DIR__ . '/fixtures/AllowCollation.php'],
51-
[]
55+
[
56+
[
57+
'No error with identifier method.notFound is reported on line 17.',
58+
17
59+
]
60+
]
5261
);
5362
}
5463

@@ -68,7 +77,7 @@ public function testDoesNotReportOutsideLaravelMigration(): void
6877
[
6978
'No error to ignore is reported on line 15.',
7079
15,
71-
]
80+
],
7281
],
7382
);
7483
}

tests/Rules/Laravel/fixtures/AllowCollation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ final class AllowCollation extends Migration
1313
public function up(): void
1414
{
1515
Schema::create('users', function (Blueprint $table): void {
16+
/** @phpstan-ignore method.notFound */
1617
$table->collation('utf8mb4');
1718
$table->string('email');
1819
});

tests/Rules/Laravel/fixtures/WrongCollation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ final class WrongCollation extends Migration
1313
public function up(): void
1414
{
1515
Schema::create('users', function (Blueprint $table): void {
16+
/** @phpstan-ignore method.notFound */
1617
$table->collation('utf8');
1718
$table->string('email');
1819
});

0 commit comments

Comments
 (0)