From 513b37916f9cf4f51f719a8d4c1daa82aa7c1fbc Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 7 Jan 2026 15:13:07 +0100 Subject: [PATCH 1/2] fix(image): Remove NOP imagedestroy call This is NOP since 8.0 and deprecated since 8.5 Signed-off-by: Carl Schwan --- lib/private/Image.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/private/Image.php b/lib/private/Image.php index eb5812c8785..7e6a7621dcf 100644 --- a/lib/private/Image.php +++ b/lib/private/Image.php @@ -1137,9 +1137,6 @@ class Image implements IImage { * Destroys the current image and resets the object */ public function destroy(): void { - if ($this->valid()) { - imagedestroy($this->resource); - } $this->resource = false; } From bd815595d4a234692b37da58f2135431035c59f3 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 7 Jan 2026 15:23:20 +0100 Subject: [PATCH 2/2] fix: Remove NOP ReflectionProperty::setAccessible calls Doesn't do anything since PHP 8.1 and is deprecated since PHP 8.5 --- tests/lib/Files/Mount/RootMountProviderTest.php | 1 - tests/lib/Files/ViewTest.php | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/lib/Files/Mount/RootMountProviderTest.php b/tests/lib/Files/Mount/RootMountProviderTest.php index fedd62d5663..70a02dbce47 100644 --- a/tests/lib/Files/Mount/RootMountProviderTest.php +++ b/tests/lib/Files/Mount/RootMountProviderTest.php @@ -117,7 +117,6 @@ class RootMountProviderTest extends TestCase { $class = new \ReflectionClass($storage); $prop = $class->getProperty('objectStore'); - $prop->setAccessible(true); /** @var S3 $objectStore */ $objectStore = $prop->getValue($storage); $this->assertEquals('nextcloud0', $objectStore->getBucket()); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 274f8cb6d09..16562cee7d2 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1539,7 +1539,6 @@ class ViewTest extends \Test\TestCase { public function testHookPaths($root, $path, $shouldEmit): void { $filesystemReflection = new \ReflectionClass(Filesystem::class); $defaultRootValue = $filesystemReflection->getProperty('defaultInstance'); - $defaultRootValue->setAccessible(true); $oldRoot = $defaultRootValue->getValue(); $defaultView = new View('/foo/files'); $defaultRootValue->setValue(null, $defaultView);