From 2b79135a9dbe6af40f90c32f366418739a250ed1 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 2 Dec 2025 10:34:48 +0100 Subject: [PATCH] test: fix deprecation for setAccessible() --- ISO4217Test.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ISO4217Test.php b/ISO4217Test.php index 88291f3..eb992a3 100644 --- a/ISO4217Test.php +++ b/ISO4217Test.php @@ -140,7 +140,9 @@ private static function getCurrencies(string $indexedBy): array { $reflected = new \ReflectionClass('Alcohol\ISO4217'); $currencies = $reflected->getProperty('currencies'); - $currencies->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $currencies->setAccessible(true); + } $currencies = $currencies->getValue(new ISO4217()); return array_reduce(