Skip to content

Commit 225e673

Browse files
authored
Merge pull request #185 from skilld-labs/fix-get-accessible
Fix deprecated Reflection*::setAccessible() for PHP 8.5
2 parents 924553d + 2654cdd commit 225e673

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/BrowserKitDriver.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,10 @@ private function mergeForms(Form $to, Form $from): void
798798
$nodeReflection = $fieldReflection->getProperty('node');
799799
$valueReflection = $fieldReflection->getProperty('value');
800800

801-
$nodeReflection->setAccessible(true);
802-
$valueReflection->setAccessible(true);
801+
if (PHP_VERSION_ID < 80100) {
802+
$nodeReflection->setAccessible(true);
803+
$valueReflection->setAccessible(true);
804+
}
803805

804806
$isIgnoredField = $field instanceof InputFormField &&
805807
in_array($nodeReflection->getValue($field)->getAttribute('type'), array('submit', 'button', 'image'), true);

0 commit comments

Comments
 (0)