diff --git a/.github/workflows/quality-assurance.yaml b/.github/workflows/quality-assurance.yaml index 0d46c32..bc7aea1 100644 --- a/.github/workflows/quality-assurance.yaml +++ b/.github/workflows/quality-assurance.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] composer-flags: [ '' ] phpunit-flags: [ '--coverage-text' ] steps: diff --git a/composer.json b/composer.json index 602e99e..ef87742 100644 --- a/composer.json +++ b/composer.json @@ -21,17 +21,17 @@ } }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "suggest": { "psr/http-message": "Common interface for HTTP messages", "psr/http-factory": "Common interfaces for PSR-7 HTTP message factories" }, "require-dev": { + "nyholm/psr7": "^1.8", "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "psr/http-factory": "^1.0", "psr/http-message": "1.*", - "laminas/laminas-diactoros": "^2.0", "phpstan/phpstan": "^1.3" }, "extra": { diff --git a/docker/php/81/Dockerfile b/docker/php/81/Dockerfile index 96acc23..0625db1 100644 --- a/docker/php/81/Dockerfile +++ b/docker/php/81/Dockerfile @@ -1,10 +1,8 @@ -FROM php:8.1.1-cli +FROM php:8.1-cli WORKDIR /usr/src/myapp +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + RUN apt-get update && apt-get install zip unzip git -y \ && pecl install xdebug \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ - && php composer-setup.php --install-dir=/usr/bin --filename=composer \ - && php -r "unlink('composer-setup.php');" \ - && mkdir /.composer && chmod 777 /.composer + && pecl install pcov diff --git a/tests/HttpConverterTest.php b/tests/HttpConverterTest.php index f818996..4de674c 100644 --- a/tests/HttpConverterTest.php +++ b/tests/HttpConverterTest.php @@ -4,10 +4,10 @@ namespace Crell\ApiProblem; +use Nyholm\Psr7\Response; use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseFactoryInterface; use Psr\Http\Message\ResponseInterface; -use Laminas\Diactoros\Response; class HttpConverterTest extends TestCase { @@ -18,7 +18,7 @@ protected function getMockResponseFactory() : ResponseFactoryInterface { public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface { - return new Response('php://memory', $code); + return new Response($code); } }; }