mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
test(messaging): drop deprecated ReflectionMethod::setAccessible call
The CI unit-test job runs inside the Appwrite container on PHP 8.5, where
ReflectionMethod::setAccessible() is deprecated, and the suite fails on
triggered deprecations. It is also a no-op on PHP 8.1+ (reflection invokes
private methods without it), so it was both unnecessary and the cause of the
red Tests/Unit check. Reverts the setAccessible addition from 7c8d7dcb80.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
7247b0effd
commit
e2278a7370
1 file changed
+4
-2
@@ -435,8 +435,9 @@ class MessagingFanoutTest extends TestCase
|
||||
EmailAdapter $adapter
|
||||
): void {
|
||||
$worker = new TestableMessaging($adapter);
|
||||
// No setAccessible(true): reflection invokes private methods without it on PHP 8.1+, and the call is
|
||||
// deprecated on PHP 8.5 (the CI unit-test runtime), where the suite fails on triggered deprecations.
|
||||
$method = new \ReflectionMethod(Messaging::class, 'sendExternalMessage');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$publisher = $this->createMock(UsagePublisher::class);
|
||||
$publisher->method('enqueue')->willReturn(true);
|
||||
@@ -574,8 +575,9 @@ class MessagingFanoutTest extends TestCase
|
||||
$adapter = new ConcurrencyProbeAdapter();
|
||||
|
||||
$worker = new TestableMessaging($adapter);
|
||||
// No setAccessible(true): reflection invokes private methods without it on PHP 8.1+, and the call is
|
||||
// deprecated on PHP 8.5 (the CI unit-test runtime), where the suite fails on triggered deprecations.
|
||||
$method = new \ReflectionMethod(Messaging::class, 'sendExternalMessage');
|
||||
$method->setAccessible(true);
|
||||
$publisher = $this->createMock(UsagePublisher::class);
|
||||
$device = new Local(\sys_get_temp_dir());
|
||||
$project = new Document(['$id' => 'project1', '$sequence' => '1']);
|
||||
|
||||
Reference in new issue
Block a user