Skip to content

Commit f96ea45

Browse files
Chris8934alcohol
authored andcommitted
test: fix deprecation for setAccessible()
1 parent e322942 commit f96ea45

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ISO4217Test.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ private static function getCurrencies(string $indexedBy): array
140140
{
141141
$reflected = new \ReflectionClass('Alcohol\ISO4217');
142142
$currencies = $reflected->getProperty('currencies');
143-
$currencies->setAccessible(true);
143+
if (PHP_VERSION_ID < 80100) {
144+
$currencies->setAccessible(true);
145+
}
144146
$currencies = $currencies->getValue(new ISO4217());
145147

146148
return array_reduce(

0 commit comments

Comments
 (0)