Skip to content

Commit fbec15e

Browse files
authored
Support 8.5 (#122)
* Fix PHP warning in test We will render template.phtml before failing the when rendering the layout template, so ensure that the variable defined in template.phtml is defined to avoid the PHP warning. * Add PHP 8,4 and 8.5 to the CI test matrix
1 parent 5a5e593 commit fbec15e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
12+
php: [ 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5 ]
1313

1414
steps:
1515
- name: Checkout

tests/PhpRendererTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ public function testExceptionInLayout(): void
139139
$body = $this->createStream();
140140
$response = new Response(200, $headers, $body);
141141
try {
142-
$newResponse = $renderer->render($response, 'template.phtml');
142+
$newResponse = $renderer->render($response, 'template.phtml', [
143+
'hello' => 'Hi'
144+
]);
143145
} catch (Throwable $t) {
144146
// PHP 7+
145147
// Simulates an error template

0 commit comments

Comments
 (0)