@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

PHP 8.5: Tests: Fix usage of no-op ReflectionMethod::setAccessible()

Summary:
As of PHP 8.1.0, calling `setAccessible()` has no effect; all properties are accessible by default.

See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible and https://www.php.net/manual/en/reflectionproperty.setaccessible.php

Refs T16494

Test Plan: Run `./bin/arc unit --everything` on PHP 8.5

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16494

Differential Revision: https://we.phorge.it/D26746

+3 -1
+3 -1
src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php
··· 46 46 47 47 try { 48 48 $method = new ReflectionMethod($dao, 'establishLiveConnection'); 49 - $method->setAccessible(true); 49 + if (PHP_VERSION_ID < 80100) { 50 + $method->setAccessible(true); 51 + } 50 52 $method->invoke($dao, 'r'); 51 53 52 54 $this->assertFailure(