Skip to content

Commit 591f3cc

Browse files
authored
Merge pull request #42 from Crell/php84
Test on GHA on PHP 8.4.
2 parents 0773119 + 466bf22 commit 591f3cc

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.github/workflows/quality-assurance.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
14+
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
1515
composer-flags: [ '' ]
1616
phpunit-flags: [ '--coverage-text' ]
1717
steps:

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
}
2222
},
2323
"require": {
24-
"php": "^7.1 || ^8.0"
24+
"php": "^7.4 || ^8.0"
2525
},
2626
"suggest": {
2727
"psr/http-message": "Common interface for HTTP messages",
2828
"psr/http-factory": "Common interfaces for PSR-7 HTTP message factories"
2929
},
3030
"require-dev": {
31+
"nyholm/psr7": "^1.8",
3132
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
3233
"psr/http-factory": "^1.0",
3334
"psr/http-message": "1.*",
34-
"laminas/laminas-diactoros": "^2.0",
3535
"phpstan/phpstan": "^1.3"
3636
},
3737
"extra": {

docker/php/81/Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
FROM php:8.1.1-cli
1+
FROM php:8.1-cli
22
WORKDIR /usr/src/myapp
33

4+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
5+
46
RUN apt-get update && apt-get install zip unzip git -y \
57
&& pecl install xdebug \
6-
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
7-
&& php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
8-
&& php composer-setup.php --install-dir=/usr/bin --filename=composer \
9-
&& php -r "unlink('composer-setup.php');" \
10-
&& mkdir /.composer && chmod 777 /.composer
8+
&& pecl install pcov

tests/HttpConverterTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace Crell\ApiProblem;
66

7+
use Nyholm\Psr7\Response;
78
use PHPUnit\Framework\TestCase;
89
use Psr\Http\Message\ResponseFactoryInterface;
910
use Psr\Http\Message\ResponseInterface;
10-
use Laminas\Diactoros\Response;
1111

1212
class HttpConverterTest extends TestCase
1313
{
@@ -18,7 +18,7 @@ protected function getMockResponseFactory() : ResponseFactoryInterface
1818
{
1919
public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
2020
{
21-
return new Response('php://memory', $code);
21+
return new Response($code);
2222
}
2323
};
2424
}

0 commit comments

Comments
 (0)