From 9aa5689d7c65cc654d453caceded52f3213acfbf Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 14:26:16 +0300 Subject: [PATCH 1/9] first commit: update phpunit Signed-off-by: olaru --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4b690eb..adf75ba 100644 --- a/composer.json +++ b/composer.json @@ -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" From 4b5eaab83a3d8952af7a1a9912ab6179e4c6e95d Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 14:48:19 +0300 Subject: [PATCH 2/9] phpunit version change Signed-off-by: olaru --- phpunit.xml | 3 +++ test/Unit/Page/Handler/PageHandlerTest.php | 10 ++++------ test/Unit/Page/RoutesDelegatorTest.php | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) 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, From 8ddb3c5ed1abef98607110b45230cfad3edf1e2e Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 14:49:43 +0300 Subject: [PATCH 3/9] remove php 8.2 Signed-off-by: olaru --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index adf75ba..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", From ec875276a30f3e510093a7b79141452832ed7942 Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 14:55:34 +0300 Subject: [PATCH 4/9] first commit: update phpunit Signed-off-by: olaru --- test/Unit/Page/RoutesDelegatorTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Unit/Page/RoutesDelegatorTest.php b/test/Unit/Page/RoutesDelegatorTest.php index bd94d63..a11eb62 100644 --- a/test/Unit/Page/RoutesDelegatorTest.php +++ b/test/Unit/Page/RoutesDelegatorTest.php @@ -32,7 +32,7 @@ public function testWillInvoke(): void $container = $this->createStub(ContainerInterface::class); $app = $this->createMock(Application::class); - +//aaa $app->method('get')->willReturn($this->createStub(Route::class)); $app ->expects($this->exactly(1)) From 645d04cacf753dc07f9da787c210acfd9854e0e3 Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 14:56:03 +0300 Subject: [PATCH 5/9] first commit: update phpunit Signed-off-by: olaru --- test/Unit/Page/RoutesDelegatorTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Unit/Page/RoutesDelegatorTest.php b/test/Unit/Page/RoutesDelegatorTest.php index a11eb62..bd94d63 100644 --- a/test/Unit/Page/RoutesDelegatorTest.php +++ b/test/Unit/Page/RoutesDelegatorTest.php @@ -32,7 +32,7 @@ public function testWillInvoke(): void $container = $this->createStub(ContainerInterface::class); $app = $this->createMock(Application::class); -//aaa + $app->method('get')->willReturn($this->createStub(Route::class)); $app ->expects($this->exactly(1)) From 90dea6c88405945580e7ef387811e5a6942779b5 Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 15:00:22 +0300 Subject: [PATCH 6/9] dco and pipeline Signed-off-by: olaru --- .github/workflows/codecov.yml | 1 - .github/workflows/qodana_code_quality.yml | 2 +- .github/workflows/static-analysis.yml | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) 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..3ee6cfa 100644 --- a/.github/workflows/qodana_code_quality.yml +++ b/.github/workflows/qodana_code_quality.yml @@ -16,7 +16,7 @@ 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 with: 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" From d66fda84aba1cd45f1c686fee2dcf97c46972432 Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 15:52:41 +0300 Subject: [PATCH 7/9] remove qodana file Signed-off-by: olaru --- .github/workflows/qodana_code_quality.yml | 49 ----------------------- 1 file changed, 49 deletions(-) delete mode 100644 .github/workflows/qodana_code_quality.yml diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml deleted file mode 100644 index 3ee6cfa..0000000 --- a/.github/workflows/qodana_code_quality.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Qodana -on: - workflow_dispatch: - pull_request: - push: - branches: - - 1.0 - - 'releases/*' - -jobs: - qodana: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - checks: write - strategy: - matrix: - php-versions: [ '8.3', '8.4', '8.5' ] - steps: - - uses: actions/checkout@v4 - with: - # to check out the actual pull request commit, not the merge commit - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 # a full history is required for pull request analysis - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: pcov - ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On - tools: composer:v2, cs2pr - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v4 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@v2025.3 - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} From bedb308b572b8b20844bb0b79280c75334cab020 Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 16:03:06 +0300 Subject: [PATCH 8/9] remove qodana file Signed-off-by: olaru --- .github/workflows/qodana_code_quality.yml | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/qodana_code_quality.yml diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml new file mode 100644 index 0000000..531412b --- /dev/null +++ b/.github/workflows/qodana_code_quality.yml @@ -0,0 +1,49 @@ +name: Qodana +on: + workflow_dispatch: + pull_request: + push: + branches: + - '1.0' + - 'releases/*' + +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + strategy: + matrix: + php-versions: [ '8.3', '8.4', '8.5' ] + steps: + - uses: actions/checkout@v6 + with: + # to check out the actual pull request commit, not the merge commit + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 # a full history is required for pull request analysis + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: pcov + ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On + tools: composer:v2, cs2pr + + - name: Determine composer cache directory + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v5 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php }}-composer- + - name: Install dependencies with composer + run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2025.3 + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} \ No newline at end of file From 9062dbc15f44f066ed741ced70daf56999a6d0ee Mon Sep 17 00:00:00 2001 From: olaru Date: Tue, 21 Apr 2026 16:06:58 +0300 Subject: [PATCH 9/9] update qodana Signed-off-by: olaru --- .github/workflows/qodana_code_quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml index 531412b..bb948f4 100644 --- a/.github/workflows/qodana_code_quality.yml +++ b/.github/workflows/qodana_code_quality.yml @@ -46,4 +46,4 @@ jobs: - name: 'Qodana Scan' uses: JetBrains/qodana-action@v2025.3 env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} \ No newline at end of file + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}