Skip to content

Commit

Permalink
Merge pull request #42 from Crell/php84
Browse files Browse the repository at this point in the history
Test on GHA on PHP 8.4.
  • Loading branch information
Crell authored Sep 30, 2024
2 parents 0773119 + 466bf22 commit 591f3cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/quality-assurance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
10 changes: 4 additions & 6 deletions docker/php/81/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tests/HttpConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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);
}
};
}
Expand Down

0 comments on commit 591f3cc

Please sign in to comment.