diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 97589f2..a6c8900 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,7 +15,6 @@ jobs: - ubuntu-latest php: - - "8.2" - "8.3" - "8.4" - "8.5" diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml index 217b7ee..bb948f4 100644 --- a/.github/workflows/qodana_code_quality.yml +++ b/.github/workflows/qodana_code_quality.yml @@ -4,7 +4,7 @@ on: pull_request: push: branches: - - 1.0 + - '1.0' - 'releases/*' jobs: @@ -16,9 +16,9 @@ jobs: checks: write strategy: matrix: - php-versions: [ '8.2', '8.3', '8.4', '8.5' ] + php-versions: [ '8.3', '8.4', '8.5' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: # to check out the actual pull request commit, not the merge commit ref: ${{ github.event.pull_request.head.sha }} @@ -35,7 +35,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@v5 with: path: ${{ env.COMPOSER_CACHE_DIR }} key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index b414e19..7a74499 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -15,7 +15,6 @@ jobs: - ubuntu-latest php: - - "8.2" - "8.3" - "8.4" - "8.5" diff --git a/composer.json b/composer.json index 4b690eb..a3a6c98 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ } }, "require": { - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "php": "~8.3.0 || ~8.4.0 || ~8.5.0", "dotkernel/dot-errorhandler": "^4.4.0", "laminas/laminas-component-installer": "^3.5.0", "laminas/laminas-config-aggregator": "^1.17.0", @@ -40,7 +40,7 @@ "laminas/laminas-development-mode": "^3.13.0", "phpstan/phpstan": "^2.1.2", "phpstan/phpstan-phpunit": "^2.0.4", - "phpunit/phpunit": "^10.5.45", + "phpunit/phpunit": "^12.5.23", "roave/security-advisories": "dev-master", "symfony/var-dumper": "^7.2.3", "vincentlanglet/twig-cs-fixer": "^3.5.1" diff --git a/phpunit.xml b/phpunit.xml index a34d806..b98b821 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -3,6 +3,9 @@ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" + displayDetailsOnPhpunitNotices="true" + displayDetailsOnTestsThatTriggerDeprecations="true" + displayDetailsOnPhpunitDeprecations="true" stopOnError="true"> diff --git a/test/Unit/Page/Handler/PageHandlerTest.php b/test/Unit/Page/Handler/PageHandlerTest.php index 2f5950f..61400db 100644 --- a/test/Unit/Page/Handler/PageHandlerTest.php +++ b/test/Unit/Page/Handler/PageHandlerTest.php @@ -20,7 +20,7 @@ class PageHandlerTest extends TestCase */ public function testWillInstantiate(): void { - $handler = $this->createMock(GetPageViewHandler::class); + $handler = $this->createStub(GetPageViewHandler::class); $this->assertContainsOnlyInstancesOf(RequestHandlerInterface::class, [$handler]); } @@ -31,9 +31,9 @@ public function testWillInstantiate(): void public function testHandle(): void { $routeName = 'test_route_name'; - $request = $this->createMock(ServerRequestInterface::class); - $template = $this->createMock(TemplateRendererInterface::class); - $routeResult = $this->createMock(RouteResult::class); + $request = $this->createStub(ServerRequestInterface::class); + $template = $this->createStub(TemplateRendererInterface::class); + $routeResult = $this->createStub(RouteResult::class); $routeResult ->method('getMatchedRouteName') @@ -41,12 +41,10 @@ public function testHandle(): void $request ->method('getAttribute') - ->with(RouteResult::class) ->willReturn($routeResult); $template ->method('render') - ->with($routeName) ->willReturn('

' . $routeName . '

'); $handler = new GetPageViewHandler($template); diff --git a/test/Unit/Page/RoutesDelegatorTest.php b/test/Unit/Page/RoutesDelegatorTest.php index 5039256..bd94d63 100644 --- a/test/Unit/Page/RoutesDelegatorTest.php +++ b/test/Unit/Page/RoutesDelegatorTest.php @@ -30,10 +30,10 @@ public function testWillInvoke(): void $routeUri = sprintf('/%s/%s', $moduleName, $routeName); $templateName = sprintf('%s::%s', $moduleName, $routeName); - $container = $this->createMock(ContainerInterface::class); + $container = $this->createStub(ContainerInterface::class); $app = $this->createMock(Application::class); - $app->method('get')->willReturn($this->createMock(Route::class)); + $app->method('get')->willReturn($this->createStub(Route::class)); $app ->expects($this->exactly(1)) ->method('get') @@ -43,7 +43,7 @@ public function testWillInvoke(): void $this->assertSame($templateName, $args[2]); }); - $container->method('get')->with('config')->willReturn([ + $container->method('get')->willReturn([ 'routes' => [ $moduleName => [ $routeName => $routeName,