Skip to content

Commit 29613bc

Browse files
Update dependency phpunit/phpunit to v11 (#41)
--------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Frank Dekker <fdekker@123inkt.nl>
1 parent 96b59cf commit 29613bc

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"phpstan/phpstan-phpunit": "^1.3",
5151
"phpstan/phpstan-strict-rules": "^1.5",
5252
"phpstan/phpstan-symfony": "^1.3",
53-
"phpunit/phpunit": "^10.5.6",
53+
"phpunit/phpunit": "^10.5 || ^11.0",
5454
"roave/security-advisories": "dev-latest",
5555
"squizlabs/php_codesniffer": "^3.6",
5656
"symfony/browser-kit": "^6.0||^7.0",

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
45
requireCoverageMetadata="true"
56
failOnRisky="true"
67
failOnWarning="true"

tests/bootstrap.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\ErrorHandler\ErrorHandler;
6+
use Symfony\Component\Filesystem\Filesystem;
7+
8+
// cleanup kernel cache
9+
(new Filesystem())->remove(__DIR__ . '/.kernel');
10+
11+
// PHPUnit 11 keeps track of which error handler are added and removed. Until this is fixed, we need to register the error handler
12+
// before PHPUnit registration.
13+
ErrorHandler::register(null, false);

0 commit comments

Comments
 (0)