diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c0fbc53..9652006 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,14 +15,14 @@ jobs: - ubuntu-latest php: - - "8.2" - "8.3" - "8.4" - "8.5" + - "8.6" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -36,7 +36,7 @@ jobs: run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - name: Cache dependencies installed with composer - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ${{ env.COMPOSER_CACHE_DIR }} key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} @@ -50,6 +50,6 @@ jobs: run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml - name: Send code coverage report to Codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v7 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 9976515..2763b9c 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -15,14 +15,14 @@ jobs: - ubuntu-latest php: - - "8.2" - "8.3" - "8.4" - "8.5" + - "8.6" steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -36,7 +36,7 @@ jobs: run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - name: Cache dependencies installed with composer - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: ${{ env.COMPOSER_CACHE_DIR }} key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/README.md b/README.md index f70b795..fe4b2d3 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ Documentation is available at: https://docs.dotkernel.org/dot-response-header/. [![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-response-header)](https://github.com/dotkernel/dot-response-header/stargazers) [![GitHub license](https://img.shields.io/github/license/dotkernel/dot-response-header)](https://github.com/dotkernel/dot-response-header/blob/3.0/LICENSE) -[![Build Static](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml) +[![Build Static](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml/badge.svg?branch=3.x)](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml) [![codecov](https://codecov.io/gh/dotkernel/dot-response-header/graph/badge.svg?token=NNRZN0FBF2)](https://codecov.io/gh/dotkernel/dot-response-header) -[![PHPStan](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml) +[![PHPStan](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml/badge.svg?branch=3.x)](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml) ## Requirements diff --git a/composer.json b/composer.json index 0ad6170..1338aa3 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ "mezzio" ], "require": { - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "mezzio/mezzio-router": "^3.16", + "php": "~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0", + "mezzio/mezzio-router": "^3.16 || ^4.0", "psr/http-client": "^1.0", "psr/http-message": "^1.0 || ^2.0" }, @@ -29,7 +29,7 @@ "laminas/laminas-diactoros": "^3.1", "phpstan/phpstan": "^2.1", "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.2" + "phpunit/phpunit": "^12.5.22" }, "autoload": { "psr-4": { diff --git a/docs/book/v3/overview.md b/docs/book/v3/overview.md index 250c78a..1e11aba 100644 --- a/docs/book/v3/overview.md +++ b/docs/book/v3/overview.md @@ -12,6 +12,6 @@ [![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-response-header)](https://github.com/dotkernel/dot-response-header/stargazers) [![GitHub license](https://img.shields.io/github/license/dotkernel/dot-response-header)](https://github.com/dotkernel/dot-response-header/blob/3.0/LICENSE) -[![Build Static](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml) +[![Build Static](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml/badge.svg?branch=3.x)](https://github.com/dotkernel/dot-response-header/actions/workflows/continuous-integration.yml) [![codecov](https://codecov.io/gh/dotkernel/dot-response-header/graph/badge.svg?token=NNRZN0FBF2)](https://codecov.io/gh/dotkernel/dot-response-header) -[![PHPStan](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml) +[![PHPStan](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml/badge.svg?branch=3.x)](https://github.com/dotkernel/dot-response-header/actions/workflows/static-analysis.yml) diff --git a/phpunit.xml b/phpunit.xml index cf5ba32..f302e12 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,5 +1,5 @@ - + ./test diff --git a/test/Middleware/ResponseHeaderMiddlewareTest.php b/test/Middleware/ResponseHeaderMiddlewareTest.php index b423b0c..64a911a 100644 --- a/test/Middleware/ResponseHeaderMiddlewareTest.php +++ b/test/Middleware/ResponseHeaderMiddlewareTest.php @@ -7,7 +7,7 @@ use Dot\ResponseHeader\Middleware\ResponseHeaderMiddleware; use Laminas\Diactoros\Response; use PHPUnit\Framework\MockObject\Exception; -use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\MockObject\Stub; use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -16,8 +16,8 @@ class ResponseHeaderMiddlewareTest extends TestCase { private ResponseHeaderMiddleware $responseHeader; - private ServerRequestInterface|MockObject $serverRequest; - private RequestHandlerInterface|MockObject $requestHandler; + private ServerRequestInterface|Stub $serverRequest; + private RequestHandlerInterface|Stub $requestHandler; /** * @throws Exception @@ -25,8 +25,8 @@ class ResponseHeaderMiddlewareTest extends TestCase public function setUp(): void { $this->responseHeader = new ResponseHeaderMiddleware([]); - $this->serverRequest = $this->createMock(ServerRequestInterface::class); - $this->requestHandler = $this->createMock(RequestHandlerInterface::class); + $this->serverRequest = $this->createStub(ServerRequestInterface::class); + $this->requestHandler = $this->createStub(RequestHandlerInterface::class); } public function testProcess(): void