From 8a7c4386e094807b7e134b1a9ad17cbb1a2c0829 Mon Sep 17 00:00:00 2001 From: Mika Simanainen Date: Thu, 20 Nov 2025 13:41:47 +0200 Subject: [PATCH] remove ReflectionProperty::setAccessible --- src/MatchesSnapshots.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MatchesSnapshots.php b/src/MatchesSnapshots.php index 2127f1e..581ec4d 100644 --- a/src/MatchesSnapshots.php +++ b/src/MatchesSnapshots.php @@ -297,7 +297,6 @@ protected function rethrowExpectationFailedExceptionWithUpdateSnapshotsPrompt($e $exceptionReflection = new ReflectionObject($exception); $messageReflection = $exceptionReflection->getProperty('message'); - $messageReflection->setAccessible(true); $messageReflection->setValue($exception, $newMessage); throw $exception;