Skip to content

Commit ecc3771

Browse files
committed
Add support for PHP 8.0
1 parent bc9958e commit ecc3771

File tree

5 files changed

+22
-39
lines changed

5 files changed

+22
-39
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"docs": "https://httpsoft.org/docs/response"
2020
},
2121
"require": {
22-
"php": "^7.4",
23-
"httpsoft/http-stream": "^1.0"
22+
"php": "^7.4|^8.0",
23+
"httpsoft/http-stream": "^1.1"
2424
},
2525
"require-dev": {
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": {

src/ContentTrait.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
6+
namespace HttpSoft\Response;
7+
8+
trait ContentTrait
9+
{
10+
}

src/Response.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/ResponseFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public static function create(
3131
/**
3232
* {@inheritDoc}
3333
*/
34-
public function createResponse(int $statusCode = Response::STATUS_OK, string $reasonPhrase = ''): ResponseInterface
34+
public function createResponse(int $code = Response::STATUS_OK, string $reasonPhrase = ''): ResponseInterface
3535
{
36-
return new Response($statusCode, [], 'php://temp', '1.1', $reasonPhrase);
36+
return new Response($code, [], 'php://temp', '1.1', $reasonPhrase);
3737
}
3838
}

0 commit comments

Comments
 (0)