Skip to content

Commit 8573890

Browse files
committed
Add custom exception handler and update dependencies
Added a custom exception handler in a new autoload file under the tests directory. The PHPUnit bootstrap configuration was updated to use the new autoload file. Also, the dependency 'matthiasnoback/symfony-config-test' was switched to a 'dev-phpunit-11' version and the source repository for this dependency was added under the 'repositories' section in composer.json.
1 parent 3c9b0aa commit 8573890

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"ekino/phpstan-banned-code": "^1.0",
6969
"ergebnis/phpunit-slow-test-detector": "^2.14",
7070
"infection/infection": "^0.28|^0.29",
71-
"matthiasnoback/symfony-config-test": "^5.0",
71+
"matthiasnoback/symfony-config-test": "dev-phpunit-11",
7272
"paragonie/sodium_compat": "^1.20|^2.0",
7373
"php-parallel-lint/php-parallel-lint": "^1.3",
7474
"phpbench/phpbench": "^1.2",
@@ -118,5 +118,11 @@
118118
"php-http/discovery": true,
119119
"infection/extension-installer": false
120120
}
121+
},
122+
"repositories": {
123+
"wickedOne_SymfonyConfigTest": {
124+
"type": "vcs",
125+
"url": "git@github.com:wickedOne/SymfonyConfigTest.git"
126+
}
121127
}
122128
}

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
backupGlobals="false"
55
processIsolation="false"
66
stopOnFailure="false"
7-
bootstrap="vendor/autoload.php"
7+
bootstrap="tests/autoload.php"
88
beStrictAboutTestsThatDoNotTestAnything="false"
99
colors="true"
1010
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"

tests/autoload.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\ErrorHandler\ErrorHandler;
6+
7+
require dirname(__DIR__).'/vendor/autoload.php';
8+
9+
set_exception_handler([new ErrorHandler(), 'handleException']);

0 commit comments

Comments
 (0)