From 0228dd1180ee3ef6c85eeb51ddbe89e0eaef7d33 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 27 Oct 2024 07:46:44 +0100 Subject: [PATCH] Don't use `die()` in PHPT `--SKIPIF--` Unlocks a performance optimization in PHPUnit 11.x see https://staabm.github.io/2024/10/19/phpunit-codesprint-munich.html --- Tests/DeprecationErrorHandler/log_file.phpt | 2 +- Tests/expectdeprecationfail.phpt | 2 +- Tests/expectnotrisky.phpt | 4 ++-- Tests/expectrisky.phpt | 4 ++-- Tests/symfonyextension.phpt | 2 +- Tests/symfonyextensionnotregistered.phpt | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/DeprecationErrorHandler/log_file.phpt b/Tests/DeprecationErrorHandler/log_file.phpt index fe14db7..12f9ed4 100644 --- a/Tests/DeprecationErrorHandler/log_file.phpt +++ b/Tests/DeprecationErrorHandler/log_file.phpt @@ -1,7 +1,7 @@ --TEST-- Test DeprecationErrorHandler with log file --SKIPIF-- -=')) die('Skipping on PHPUnit 10+'); +=')) echo 'Skipping on PHPUnit 10+'; --FILE-- =')) die('Skipping on PHPUnit 10+'); +=')) echo 'Skipping on PHPUnit 10+'; --FILE-- =')) die('Skipping on PHPUnit 10+'); +if ('\\' === DIRECTORY_SEPARATOR && !extension_loaded('mbstring')) echo 'Skipping on Windows without mbstring'; +if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) echo 'Skipping on PHPUnit 10+'; --FILE-- =')) die('Skipping on PHPUnit 10+'); +if ('\\' === DIRECTORY_SEPARATOR && !extension_loaded('mbstring')) echo 'Skipping on Windows without mbstring'; +if (!getenv('SYMFONY_PHPUNIT_VERSION') || version_compare(getenv('SYMFONY_PHPUNIT_VERSION'), '10.0', '>=')) echo 'Skipping on PHPUnit 10+'; --FILE--