From 01ac9b1990f9979412e94457fb204af7c3d3c55f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 10 Feb 2021 22:38:35 +0100 Subject: [PATCH 1/2] Re-enable triggering deprecations about return types --- phpunit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpunit b/phpunit index 619ba4674a..1cb49096f4 100755 --- a/phpunit +++ b/phpunit @@ -16,6 +16,9 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) { putenv('SYMFONY_PHPUNIT_VERSION=9.5'); } } +if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70200) { + putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1'); +} if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) { putenv('SYMFONY_DEPRECATIONS_HELPER=disabled'); } From 9fa7dbd568d8b06893f0efe1b250a151d22f1648 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 10 Feb 2021 23:00:54 +0100 Subject: [PATCH 2/2] Cleanup phpunit script --- phpunit | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/phpunit b/phpunit index 1cb49096f4..a8f6674eb9 100755 --- a/phpunit +++ b/phpunit @@ -8,15 +8,13 @@ if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) { exit(1); } if (!getenv('SYMFONY_PHPUNIT_VERSION')) { - if (\PHP_VERSION_ID < 70200) { - putenv('SYMFONY_PHPUNIT_VERSION=7.5'); - } elseif (\PHP_VERSION_ID < 70300) { + if (\PHP_VERSION_ID < 70300) { putenv('SYMFONY_PHPUNIT_VERSION=8.5'); } else { putenv('SYMFONY_PHPUNIT_VERSION=9.5'); } } -if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') && \PHP_VERSION_ID >= 70200) { +if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) { putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1'); } if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {