Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- ubuntu-latest

php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- 1.0
- '1.0'
- 'releases/*'

jobs:
Expand All @@ -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 }}
Expand All @@ -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') }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- ubuntu-latest

php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<testsuites>
<testsuite name="UnitTests">
Expand Down
10 changes: 4 additions & 6 deletions test/Unit/Page/Handler/PageHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand All @@ -31,22 +31,20 @@ 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')
->willReturn($routeName);

$request
->method('getAttribute')
->with(RouteResult::class)
->willReturn($routeResult);

$template
->method('render')
->with($routeName)
->willReturn('<p>' . $routeName . '</p>');

$handler = new GetPageViewHandler($template);
Expand Down
6 changes: 3 additions & 3 deletions test/Unit/Page/RoutesDelegatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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,
Expand Down
Loading