Skip to content

Commit fc42f29

Browse files
Merge pull request #28 from Stillat/laravel-11-support
Laravel 11 support
2 parents 650c1a8 + 3ffc32c commit fc42f29

12 files changed

+23
-30
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ jobs:
1414
strategy:
1515
matrix:
1616
php: [8.1, 8.2]
17-
laravel: [9.*, 10.*]
17+
laravel: [9.*, 10.*, 11.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
os: [ubuntu-latest]
20+
exclude:
21+
- laravel: 11.*
22+
php: 8.1
2023

2124
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2225

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
},
1313
"require": {
1414
"php": "^8.1",
15-
"laravel/framework": "^9.36 || ^10.0"
15+
"laravel/framework": "^9.36 || ^10.0 || ^11.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "^8.5 || ^9.0",
18+
"phpunit/phpunit": "^8.5 || ^9.0 || ^10.0",
1919
"orchestra/testbench": "*",
2020
"laravel/pint": "^1.4",
2121
"brianium/paratest": "*"
2222
},
23+
"minimum-stability": "dev",
24+
"prefer-stable": true,
2325
"extra": {
2426
"laravel": {
2527
"providers": [

phpunit.dist.xml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
beStrictAboutTestsThatDoNotTestAnything="false"
5-
bootstrap="tests/bootstrap.php"
6-
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnError="false"
12-
stopOnFailure="false"
13-
verbose="true"
14-
>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="tests/bootstrap.php" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
153
<testsuites>
164
<testsuite name="Stillat Blade Parser Suite">
175
<directory suffix="Test.php">./tests</directory>
186
</testsuite>
197
</testsuites>
208
<php>
21-
<ini name="memory_limit" value="2048M" />
9+
<ini name="memory_limit" value="2048M"/>
2210
</php>
23-
</phpunit>
11+
</phpunit>

tests/Compiler/CoreDirectivesWithoutArgumentsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function testCoreDirectivesCanBeCompiledWithoutArgumentsAndNotThrowNullRe
1717
$this->compiler->compileString($directive);
1818
}
1919

20-
public function coreDirectives(): array
20+
public static function coreDirectives(): array
2121
{
2222
return collect(array_diff(CoreDirectiveRetriever::instance()->getDirectiveNames(), ['foreach', 'forelse', 'endverbatim', 'use']))->map(function ($name) {
2323
return ['@'.$name];

tests/Compiler/NodeTransformerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testNodeTransformerCanTransformNodesWithoutCoreDirectives($templ
9595
$this->assertSame($expected, $this->transform($blade, false));
9696
}
9797

98-
public function templateProvider(): array
98+
public static function templateProvider(): array
9999
{
100100
$templates = [
101101
'@if (true) something @endif',

tests/Parser/BasicParserNodesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ public function testNotDirectivesWithoutLeadingSpacesAreHandledCorrectly()
620620
$this->assertSame($template, (string) $doc);
621621
}
622622

623-
public function coreDirectives()
623+
public static function coreDirectives()
624624
{
625625
return collect(CoreDirectiveRetriever::instance()->getNonStructureDirectiveNames())->map(function ($name) {
626626
return [$name];

tests/Parser/EscapedContentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function testCoreDirectivesEscapedOutput($template, $output)
8686
$this->assertSame($output, $this->compiler->compileString($template));
8787
}
8888

89-
public function coreDirectiveEscapedContent()
89+
public static function coreDirectiveEscapedContent()
9090
{
9191
return collect(CoreDirectiveRetriever::instance()->getDirectiveNames())->map(function ($name) {
9292
return ['@@'.$name, '@'.$name];

tests/Parser/IncompleteDocumentsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testIncompleteDocumentsThree(string $template)
4343
$this->assertSame($template, (string) $doc);
4444
}
4545

46-
public function charSplitWithVerbatim()
46+
public static function charSplitWithVerbatim()
4747
{
4848
$template = <<<'EOT'
4949
start @verbatim
@@ -64,7 +64,7 @@ public function charSplitWithVerbatim()
6464
return DocumentSplitter::splitDocumentOnChar($template);
6565
}
6666

67-
public function splitWithVerbatim()
67+
public static function splitWithVerbatim()
6868
{
6969
$template = <<<'EOT'
7070
start @verbatim start
@@ -115,7 +115,7 @@ public function splitWithVerbatim()
115115
return DocumentSplitter::splitDocumentOnNewLines($template);
116116
}
117117

118-
public function splitWelcomeView()
118+
public static function splitWelcomeView()
119119
{
120120
$template = <<<'EOT'
121121
<!DOCTYPE html>

tests/Validation/DebugDirectiveTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ public function testDebugDirectiveValidatorDoesNotDetectIssues(string $directive
4040
$this->assertCount(0, $results);
4141
}
4242

43-
public function debugDirectives()
43+
public static function debugDirectives()
4444
{
4545
return collect(CoreDirectiveRetriever::instance()->getDebugDirectiveNames())->map(function ($directive) {
4646
return [$directive];
4747
})->values()->all();
4848
}
4949

50-
public function nonDebugDirectives()
50+
public static function nonDebugDirectives()
5151
{
5252
$debug = CoreDirectiveRetriever::instance()->getDebugDirectiveNames();
5353

tests/Validation/InconsistentDirectiveCasingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testInconsistentDirectiveCasingValidatorDoesNotDetectIssues($dir
4646
$this->assertCount(0, $results);
4747
}
4848

49-
public function directiveNames()
49+
public static function directiveNames()
5050
{
5151
return collect(CoreDirectiveRetriever::instance()->getDirectiveNames())->map(function ($s) {
5252
return [$s];

0 commit comments

Comments
 (0)