Skip to content

Commit c398c11

Browse files
committed
Add support for PHP 8.0
1 parent 3803b4c commit c398c11

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,17 @@ jobs:
6666
- name: PHPCS check
6767
run: vendor/bin/phpcs
6868

69-
- name: Psalm static analysis on PHP 7.4
70-
if: matrix.php-version == '7.4'
69+
- name: Psalm static analysis
7170
run: vendor/bin/psalm --no-progress
7271

73-
- name: PHPUnit run on PHP 7.4
72+
- name: PHPUnit run with coverage on PHP 7.4
7473
if: matrix.php-version == '7.4'
7574
run: vendor/bin/phpunit --coverage-clover=coverage.clover
7675

76+
- name: PHPUnit run without coverage on PHP 8.0
77+
if: matrix.php-version == '8.0'
78+
run: vendor/bin/phpunit
79+
7780
- name: Code coverage on PHP 7.4
7881
if: matrix.php-version == '7.4'
7982
run: |

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"docs": "https://httpsoft.org/docs/emitter"
2020
},
2121
"require": {
22-
"php": "^7.4"
22+
"php": "^7.4|^8.0"
2323
},
2424
"require-dev": {
2525
"httpsoft/http-response": "^1.0",
26-
"phpunit/phpunit": "^9.1",
26+
"phpunit/phpunit": "^9.3",
2727
"squizlabs/php_codesniffer": "^3.5",
28-
"vimeo/psalm": "^3.12"
28+
"vimeo/psalm": "^3.14"
2929
},
3030
"autoload": {
3131
"psr-4": {

tests/SapiEmitterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ public function testEmitWithoutBodyTrueAndWithBufferLengthAndContentRangeHeader(
168168

169169
public function testEmitBodyWithNotReadableStream(): void
170170
{
171-
$response = new Response(200, [], fopen('data://,', 'wb'));
171+
$response = new Response(200, [], fopen('php://output', 'c'));
172172
$response->getBody()->write($contents = 'Contents');
173-
$response->getBody()->rewind();
173+
$this->expectOutputString('Contents');
174174
$this->assertFalse($response->getBody()->isReadable());
175-
$this->assertSame('data://,', $response->getBody()->getMetadata('uri'));
175+
$this->assertSame('php://output', $response->getBody()->getMetadata('uri'));
176176
$this->expectException(RuntimeException::class);
177177
$this->expectExceptionMessage('Stream is not readable');
178178
$this->assertSame($contents, $response->getBody()->getContents());

0 commit comments

Comments
 (0)