Skip to content

Commit d04d87a

Browse files
committed
Restore PHP 8.1 support
1 parent 5be4a34 commit d04d87a

File tree

12 files changed

+28
-28
lines changed

12 files changed

+28
-28
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
php-versions: ['8.2', '8.3', '8.4']
19+
php-versions: ['8.1', '8.2', '8.3', '8.4']
2020

2121
steps:
2222
- uses: actions/checkout@v4

src/Attributes/ExamplesSetup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
namespace TH\DocTest\Attributes;
44

55
#[\Attribute]
6-
final readonly class ExamplesSetup
6+
final class ExamplesSetup
77
{
88
public function __construct(
99
/** @var class-string */
10-
public string $setupClass,
10+
public readonly string $setupClass,
1111
) {
1212
}
1313
}

src/Event/AfterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use TH\DocTest\TestCase;
66

7-
final readonly class AfterTest
7+
final class AfterTest
88
{
99
public function __construct(
10-
public TestCase $test,
10+
public readonly TestCase $test,
1111
) {
1212
}
1313
}

src/Event/AfterTestFailure.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
use TH\DocTest\TestCase;
66

7-
final readonly class AfterTestFailure
7+
final class AfterTestFailure
88
{
99
public function __construct(
10-
public TestCase $test,
11-
public \Throwable $failure,
10+
public readonly TestCase $test,
11+
public readonly \Throwable $failure,
1212
) {
1313
}
1414
}

src/Event/AfterTestSuccess.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use TH\DocTest\TestCase;
66

7-
final readonly class AfterTestSuccess
7+
final class AfterTestSuccess
88
{
99
public function __construct(
10-
public TestCase $test,
10+
public readonly TestCase $test,
1111
) {
1212
}
1313
}

src/Event/AfterTestSuite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use TH\DocTest\TestOutcome;
66

7-
final readonly class AfterTestSuite
7+
final class AfterTestSuite
88
{
99
public function __construct(
10-
public TestOutcome $outcome,
10+
public readonly TestOutcome $outcome,
1111
) {
1212
}
1313
}

src/Event/BeforeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use TH\DocTest\TestCase;
66

7-
final readonly class BeforeTest
7+
final class BeforeTest
88
{
99
public function __construct(
10-
public TestCase $test,
10+
public readonly TestCase $test,
1111
) {
1212
}
1313
}

src/Event/ExecuteTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use TH\DocTest\TestCase;
66

7-
final readonly class ExecuteTest
7+
final class ExecuteTest
88
{
99
public function __construct(
10-
public TestCase $test,
10+
public readonly TestCase $test,
1111
) {
1212
}
1313
}

src/Iterator/Comment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use TH\DocTest\Location;
66

7-
final readonly class Comment
7+
final class Comment
88
{
99
public function __construct(
10-
public string $text,
11-
public Location\CodeLocation $location,
10+
public readonly string $text,
11+
public readonly Location\CodeLocation $location,
1212
) {}
1313
}

src/TestCase/Example.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
use TH\DocTest\TestCase;
77
use Webmozart\Assert\Assert;
88

9-
final readonly class Example implements TestCase
9+
final class Example implements TestCase
1010
{
1111
public function __construct(
12-
public string $code,
13-
private CodeLocation $location,
12+
public readonly string $code,
13+
private readonly CodeLocation $location,
1414
) {}
1515

1616
public function location(): CodeLocation

0 commit comments

Comments
 (0)