From ed38fb644fa7b64a00587fe4379489a935728b90 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 20 Aug 2025 07:58:51 +0100 Subject: [PATCH] release: 4.0.0 rc 1 --- src/Logging/TeamCity/TeamCityLogger.php | 1 - src/Pest.php | 2 +- src/Subscribers/EnsureIgnorableTestCasesAreIgnored.php | 2 -- src/Support/Reflection.php | 6 ------ .../Help/visual_snapshot_of_help_command_output.snap | 9 ++++++++- .../Version/visual_snapshot_of_help_command_output.snap | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Logging/TeamCity/TeamCityLogger.php b/src/Logging/TeamCity/TeamCityLogger.php index d111041f..19a7be69 100644 --- a/src/Logging/TeamCity/TeamCityLogger.php +++ b/src/Logging/TeamCity/TeamCityLogger.php @@ -232,7 +232,6 @@ final class TeamCityLogger $reflector = new ReflectionClass($telemetry); $property = $reflector->getProperty('current'); - $property->setAccessible(true); $snapshot = $property->getValue($telemetry); assert($snapshot instanceof Snapshot); diff --git a/src/Pest.php b/src/Pest.php index df6ce9aa..5037bea8 100644 --- a/src/Pest.php +++ b/src/Pest.php @@ -6,7 +6,7 @@ namespace Pest; function version(): string { - return '4.0.0-beta.3'; + return '4.0.0-rc.1'; } function testDirectory(string $file = ''): string diff --git a/src/Subscribers/EnsureIgnorableTestCasesAreIgnored.php b/src/Subscribers/EnsureIgnorableTestCasesAreIgnored.php index a6e837bf..45a7823d 100644 --- a/src/Subscribers/EnsureIgnorableTestCasesAreIgnored.php +++ b/src/Subscribers/EnsureIgnorableTestCasesAreIgnored.php @@ -23,14 +23,12 @@ final class EnsureIgnorableTestCasesAreIgnored implements StartedSubscriber { $reflection = new ReflectionClass(Facade::class); $property = $reflection->getProperty('collector'); - $property->setAccessible(true); $collector = $property->getValue(); assert($collector instanceof Collector); $reflection = new ReflectionClass($collector); $property = $reflection->getProperty('testRunnerTriggeredWarningEvents'); - $property->setAccessible(true); /** @var array $testRunnerTriggeredWarningEvents */ $testRunnerTriggeredWarningEvents = $property->getValue($collector); diff --git a/src/Support/Reflection.php b/src/Support/Reflection.php index d5526069..d4f5f133 100644 --- a/src/Support/Reflection.php +++ b/src/Support/Reflection.php @@ -34,8 +34,6 @@ final class Reflection try { $reflectionMethod = $reflectionClass->getMethod($method); - $reflectionMethod->setAccessible(true); - return $reflectionMethod->invoke($object, ...$args); } catch (ReflectionException $exception) { if (method_exists($object, '__call')) { @@ -113,8 +111,6 @@ final class Reflection } } - $reflectionProperty->setAccessible(true); - return $reflectionProperty->getValue($object); } @@ -144,8 +140,6 @@ final class Reflection } } } - - $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($object, $value); } diff --git a/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap b/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap index 3831fed4..478aa138 100644 --- a/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap +++ b/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap @@ -1,5 +1,5 @@ - Pest Testing Framework 4.0.0-beta.3. + Pest Testing Framework 4.0.0-rc.1. USAGE: pest [options] @@ -68,6 +68,7 @@ --fail-on-risky Signal failure using shell exit code when a test was considered risky --fail-on-deprecation Signal failure using shell exit code when a deprecation was triggered --fail-on-phpunit-deprecation Signal failure using shell exit code when a PHPUnit deprecation was triggered + --fail-on-phpunit-notice Signal failure using shell exit code when a PHPUnit notice was triggered --fail-on-phpunit-warning Signal failure using shell exit code when a PHPUnit warning was triggered --fail-on-notice Signal failure using shell exit code when a notice was triggered --fail-on-skipped Signal failure using shell exit code when a test was skipped @@ -78,6 +79,7 @@ --do-not-fail-on-risky Do not signal failure using shell exit code when a test was considered risky --do-not-fail-on-deprecation Do not signal failure using shell exit code when a deprecation was triggered --do-not-fail-on-phpunit-deprecation Do not signal failure using shell exit code when a PHPUnit deprecation was triggered + --do-not-fail-on-phpunit-notice Do not signal failure using shell exit code when a PHPUnit notice was triggered --do-not-fail-on-phpunit-warning Do not signal failure using shell exit code when a PHPUnit warning was triggered --do-not-fail-on-notice Do not signal failure using shell exit code when a notice was triggered --do-not-fail-on-skipped Do not signal failure using shell exit code when a test was skipped @@ -99,6 +101,7 @@ --display-skipped ........................ Display details for skipped tests --display-deprecations . Display details for deprecations triggered by tests --display-phpunit-deprecations .... Display details for PHPUnit deprecations + --display-phpunit-notices .............. Display details for PHPUnit notices --display-errors ............. Display details for errors triggered by tests --display-notices ........... Display details for notices triggered by tests --display-warnings ......... Display details for warnings triggered by tests @@ -108,10 +111,13 @@ --testdox ................ Replace default result output with TestDox format --testdox-summary Repeat TestDox output for tests with errors, failures, or issues --debug Replace default progress and result output with debugging information + --with-telemetry Include telemetry information in debugging information output --compact ................ Replace default result output with Compact format LOGGING OPTIONS: --log-junit [file] .......... Write test results in JUnit XML format to file + --log-otr [file] Write test results in Open Test Reporting XML format to file + --include-git-information Include Git information in Open Test Reporting XML logfile --log-teamcity [file] ........ Write test results in TeamCity format to file --testdox-html [file] .. Write test results in TestDox format (HTML) to file --testdox-text [file] Write test results in TestDox format (plain text) to file @@ -123,6 +129,7 @@ --coverage ..... Generate code coverage report and output to standard output --coverage --min Set the minimum required coverage percentage, and fail if not met --coverage-clover [file] Write code coverage report in Clover XML format to file + --coverage-openclover [file] Write code coverage report in OpenClover XML format to file --coverage-cobertura [file] Write code coverage report in Cobertura XML format to file --coverage-crap4j [file] Write code coverage report in Crap4J XML format to file --coverage-html [dir] Write code coverage report in HTML format to directory diff --git a/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap b/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap index 471fdc7f..cff9eedf 100644 --- a/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap +++ b/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap @@ -1,3 +1,3 @@ - Pest Testing Framework 4.0.0-beta.3. + Pest Testing Framework 4.0.0-rc.1.