diff -pruN 4.16.0-3/.laminas-ci.json 4.17.0-1/.laminas-ci.json
--- 4.16.0-3/.laminas-ci.json	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/.laminas-ci.json	2025-11-01 09:38:14.000000000 +0000
@@ -1,5 +1,6 @@
 {
   "ignore_php_platform_requirements": {
-    "8.4": true
+    "8.4": true,
+    "8.5": true
   }
 }
diff -pruN 4.16.0-3/composer.json 4.17.0-1/composer.json
--- 4.16.0-3/composer.json	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/composer.json	2025-11-01 09:38:14.000000000 +0000
@@ -9,14 +9,14 @@
     "homepage": "https://laminas.dev",
     "license": "BSD-3-Clause",
     "require": {
-        "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
+        "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
     },
     "require-dev": {
         "ext-phar": "*",
         "doctrine/annotations": "^2.0.1",
         "laminas/laminas-coding-standard": "^3.0.0",
         "laminas/laminas-stdlib": "^3.18.0",
-        "phpunit/phpunit": "^10.5.37",
+        "phpunit/phpunit": "^10.5.58",
         "psalm/plugin-phpunit": "^0.19.0",
         "vimeo/psalm": "^5.15.0"
     },
@@ -29,7 +29,7 @@
             "dealerdirect/phpcodesniffer-composer-installer": true
         },
         "platform": {
-            "php": "8.1.99"
+            "php": "8.2.99"
         },
         "sort-packages": true
     },
diff -pruN 4.16.0-3/composer.lock 4.17.0-1/composer.lock
--- 4.16.0-3/composer.lock	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/composer.lock	2025-11-01 09:38:14.000000000 +0000
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "a31c272b53ca9e0894dd1b6683dca3c2",
+    "content-hash": "abc68b3c2226ea90a6785823e6019b55",
     "packages": [],
     "packages-dev": [
         {
@@ -1008,16 +1008,16 @@
         },
         {
             "name": "myclabs/deep-copy",
-            "version": "1.12.0",
+            "version": "1.13.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
+                "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
-                "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
+                "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
                 "shasum": ""
             },
             "require": {
@@ -1056,7 +1056,7 @@
             ],
             "support": {
                 "issues": "https://github.com/myclabs/DeepCopy/issues",
-                "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
+                "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
             },
             "funding": [
                 {
@@ -1064,7 +1064,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-06-12T14:39:25+00:00"
+            "time": "2025-08-01T08:46:24+00:00"
         },
         {
             "name": "netresearch/jsonmapper",
@@ -1826,16 +1826,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "10.5.37",
+            "version": "10.5.58",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "c7cffa0efa2b70c22366523e6d804c9419eb2400"
+                "reference": "e24fb46da450d8e6a5788670513c1af1424f16ca"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c7cffa0efa2b70c22366523e6d804c9419eb2400",
-                "reference": "c7cffa0efa2b70c22366523e6d804c9419eb2400",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e24fb46da450d8e6a5788670513c1af1424f16ca",
+                "reference": "e24fb46da450d8e6a5788670513c1af1424f16ca",
                 "shasum": ""
             },
             "require": {
@@ -1845,7 +1845,7 @@
                 "ext-mbstring": "*",
                 "ext-xml": "*",
                 "ext-xmlwriter": "*",
-                "myclabs/deep-copy": "^1.12.0",
+                "myclabs/deep-copy": "^1.13.4",
                 "phar-io/manifest": "^2.0.4",
                 "phar-io/version": "^3.2.1",
                 "php": ">=8.1",
@@ -1856,13 +1856,13 @@
                 "phpunit/php-timer": "^6.0.0",
                 "sebastian/cli-parser": "^2.0.1",
                 "sebastian/code-unit": "^2.0.0",
-                "sebastian/comparator": "^5.0.3",
+                "sebastian/comparator": "^5.0.4",
                 "sebastian/diff": "^5.1.1",
                 "sebastian/environment": "^6.1.0",
-                "sebastian/exporter": "^5.1.2",
+                "sebastian/exporter": "^5.1.4",
                 "sebastian/global-state": "^6.0.2",
                 "sebastian/object-enumerator": "^5.0.0",
-                "sebastian/recursion-context": "^5.0.0",
+                "sebastian/recursion-context": "^5.0.1",
                 "sebastian/type": "^4.0.0",
                 "sebastian/version": "^4.0.1"
             },
@@ -1907,7 +1907,7 @@
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.37"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.58"
             },
             "funding": [
                 {
@@ -1919,11 +1919,19 @@
                     "type": "github"
                 },
                 {
+                    "url": "https://liberapay.com/sebastianbergmann",
+                    "type": "liberapay"
+                },
+                {
+                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
+                    "type": "thanks_dev"
+                },
+                {
                     "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-10-19T13:03:41+00:00"
+            "time": "2025-09-28T12:04:46+00:00"
         },
         {
             "name": "psalm/plugin-phpunit",
@@ -2307,16 +2315,16 @@
         },
         {
             "name": "sebastian/comparator",
-            "version": "5.0.3",
+            "version": "5.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
+                "reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
-                "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e",
+                "reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e",
                 "shasum": ""
             },
             "require": {
@@ -2372,15 +2380,27 @@
             "support": {
                 "issues": "https://github.com/sebastianbergmann/comparator/issues",
                 "security": "https://github.com/sebastianbergmann/comparator/security/policy",
-                "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
+                "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.4"
             },
             "funding": [
                 {
                     "url": "https://github.com/sebastianbergmann",
                     "type": "github"
+                },
+                {
+                    "url": "https://liberapay.com/sebastianbergmann",
+                    "type": "liberapay"
+                },
+                {
+                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
+                    "type": "thanks_dev"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator",
+                    "type": "tidelift"
                 }
             ],
-            "time": "2024-10-18T14:56:07+00:00"
+            "time": "2025-09-07T05:25:07+00:00"
         },
         {
             "name": "sebastian/complexity",
@@ -2573,16 +2593,16 @@
         },
         {
             "name": "sebastian/exporter",
-            "version": "5.1.2",
+            "version": "5.1.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "955288482d97c19a372d3f31006ab3f37da47adf"
+                "reference": "0735b90f4da94969541dac1da743446e276defa6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf",
-                "reference": "955288482d97c19a372d3f31006ab3f37da47adf",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6",
+                "reference": "0735b90f4da94969541dac1da743446e276defa6",
                 "shasum": ""
             },
             "require": {
@@ -2591,7 +2611,7 @@
                 "sebastian/recursion-context": "^5.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "^10.0"
+                "phpunit/phpunit": "^10.5"
             },
             "type": "library",
             "extra": {
@@ -2639,15 +2659,27 @@
             "support": {
                 "issues": "https://github.com/sebastianbergmann/exporter/issues",
                 "security": "https://github.com/sebastianbergmann/exporter/security/policy",
-                "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2"
+                "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4"
             },
             "funding": [
                 {
                     "url": "https://github.com/sebastianbergmann",
                     "type": "github"
+                },
+                {
+                    "url": "https://liberapay.com/sebastianbergmann",
+                    "type": "liberapay"
+                },
+                {
+                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
+                    "type": "thanks_dev"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter",
+                    "type": "tidelift"
                 }
             ],
-            "time": "2024-03-02T07:17:12+00:00"
+            "time": "2025-09-24T06:09:11+00:00"
         },
         {
             "name": "sebastian/global-state",
@@ -2883,23 +2915,23 @@
         },
         {
             "name": "sebastian/recursion-context",
-            "version": "5.0.0",
+            "version": "5.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/recursion-context.git",
-                "reference": "05909fb5bc7df4c52992396d0116aed689f93712"
+                "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712",
-                "reference": "05909fb5bc7df4c52992396d0116aed689f93712",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a",
+                "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a",
                 "shasum": ""
             },
             "require": {
                 "php": ">=8.1"
             },
             "require-dev": {
-                "phpunit/phpunit": "^10.0"
+                "phpunit/phpunit": "^10.5"
             },
             "type": "library",
             "extra": {
@@ -2934,15 +2966,28 @@
             "homepage": "https://github.com/sebastianbergmann/recursion-context",
             "support": {
                 "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
-                "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
+                "security": "https://github.com/sebastianbergmann/recursion-context/security/policy",
+                "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1"
             },
             "funding": [
                 {
                     "url": "https://github.com/sebastianbergmann",
                     "type": "github"
+                },
+                {
+                    "url": "https://liberapay.com/sebastianbergmann",
+                    "type": "liberapay"
+                },
+                {
+                    "url": "https://thanks.dev/u/gh/sebastianbergmann",
+                    "type": "thanks_dev"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context",
+                    "type": "tidelift"
                 }
             ],
-            "time": "2023-02-03T07:05:40+00:00"
+            "time": "2025-08-10T07:50:56+00:00"
         },
         {
             "name": "sebastian/type",
@@ -4258,13 +4303,13 @@
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
+        "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
     },
     "platform-dev": {
         "ext-phar": "*"
     },
     "platform-overrides": {
-        "php": "8.1.99"
+        "php": "8.2.99"
     },
     "plugin-api-version": "2.6.0"
 }
diff -pruN 4.16.0-3/debian/changelog 4.17.0-1/debian/changelog
--- 4.16.0-3/debian/changelog	2025-09-19 09:28:09.000000000 +0000
+++ 4.17.0-1/debian/changelog	2025-11-02 06:43:56.000000000 +0000
@@ -1,3 +1,14 @@
+php-zend-code (4.17.0-1) unstable; urgency=medium
+
+  [ alexchexes ]
+  * fix(MethodGenerator): Remove trailing space before return-type colon
+
+  [ Alejandro Celaya ]
+  * Add support for PHP 8.5
+  * Remove all ReflectionProperty::setAccessible() calls
+
+ -- David Prévot <taffit@debian.org>  Sun, 02 Nov 2025 07:43:56 +0100
+
 php-zend-code (4.16.0-3) unstable; urgency=medium
 
   * PHPunit 12 compatibility
diff -pruN 4.16.0-3/debian/patches/0001-PHPunit-12-compatibility.patch 4.17.0-1/debian/patches/0001-PHPunit-12-compatibility.patch
--- 4.16.0-3/debian/patches/0001-PHPunit-12-compatibility.patch	2025-09-19 09:23:42.000000000 +0000
+++ 4.17.0-1/debian/patches/0001-PHPunit-12-compatibility.patch	2025-11-02 06:43:56.000000000 +0000
@@ -8,10 +8,10 @@ Subject: PHPunit 12 compatibility
  2 files changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/test/Generator/PropertyGeneratorTest.php b/test/Generator/PropertyGeneratorTest.php
-index 87ce7cd..84fd1ae 100644
+index bb77f3a..74e4576 100644
 --- a/test/Generator/PropertyGeneratorTest.php
 +++ b/test/Generator/PropertyGeneratorTest.php
-@@ -338,7 +338,7 @@ EOS;
+@@ -336,7 +336,7 @@ EOS;
      }
  
      #[DataProvider('dataSetTypeSetValueGenerate')]
@@ -21,10 +21,10 @@ index 87ce7cd..84fd1ae 100644
          $property = new PropertyGenerator();
          $property->setDefaultValue($value, $type);
 diff --git a/test/Reflection/ParameterReflectionTest.php b/test/Reflection/ParameterReflectionTest.php
-index b1382e3..226d5cd 100644
+index bcde072..7870871 100644
 --- a/test/Reflection/ParameterReflectionTest.php
 +++ b/test/Reflection/ParameterReflectionTest.php
-@@ -169,8 +169,12 @@ class ParameterReflectionTest extends TestCase
+@@ -177,8 +177,12 @@ class ParameterReflectionTest extends TestCase
  
      #[Group('zendframework/zend-code#29')]
      #[DataProvider('docBlockHints')]
diff -pruN 4.16.0-3/psalm-baseline.xml 4.17.0-1/psalm-baseline.xml
--- 4.16.0-3/psalm-baseline.xml	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/psalm-baseline.xml	2025-11-01 09:38:14.000000000 +0000
@@ -584,14 +584,6 @@
       <code>self</code>
     </PossiblyUnusedReturnValue>
   </file>
-  <file src="src/Generator/TypeGenerator.php">
-    <InvalidArgument>
-      <code>$type</code>
-    </InvalidArgument>
-    <RedundantConditionGivenDocblockType>
-      <code>$type instanceof ReflectionNamedType</code>
-    </RedundantConditionGivenDocblockType>
-  </file>
   <file src="src/Generator/ValueGenerator.php">
     <DeprecatedMethod>
       <code>getConstants</code>
@@ -1675,9 +1667,6 @@
       <code>validClassName</code>
       <code>variadicHints</code>
     </PossiblyUnusedMethod>
-    <UnusedMethodCall>
-      <code>setAccessible</code>
-    </UnusedMethodCall>
   </file>
   <file src="test/Generator/PropertyGeneratorTest.php">
     <ArgumentTypeCoercion>
@@ -1742,9 +1731,6 @@
     <RedundantConditionGivenDocblockType>
       <code>assertIsArray</code>
     </RedundantConditionGivenDocblockType>
-    <UnusedMethodCall>
-      <code>setAccessible</code>
-    </UnusedMethodCall>
   </file>
   <file src="test/Generator/PropertyValueGeneratorTest.php">
     <MissingReturnType>
@@ -1798,9 +1784,6 @@
       <code>true</code>
       <code>true</code>
     </InvalidArgument>
-    <UnusedMethodCall>
-      <code>setAccessible</code>
-    </UnusedMethodCall>
   </file>
   <file src="test/Generator/TypeGenerator/CompositeTypeTest.php">
     <PossiblyUnusedMethod>
diff -pruN 4.16.0-3/src/Generator/ClassGenerator.php 4.17.0-1/src/Generator/ClassGenerator.php
--- 4.16.0-3/src/Generator/ClassGenerator.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/src/Generator/ClassGenerator.php	2025-11-01 09:38:14.000000000 +0000
@@ -18,7 +18,6 @@ use function is_array;
 use function is_scalar;
 use function is_string;
 use function ltrim;
-use function method_exists;
 use function rtrim;
 use function sprintf;
 use function str_contains;
@@ -89,10 +88,7 @@ class ClassGenerator extends AbstractGen
 
         $cg->setAbstract($classReflection->isAbstract());
         $cg->setFinal($classReflection->isFinal());
-
-        if (method_exists($classReflection, 'isReadonly')) {
-            $cg->setReadonly((bool) $classReflection->isReadonly());
-        }
+        $cg->setReadonly($classReflection->isReadonly());
 
         // set the namespace
         if ($classReflection->inNamespace()) {
diff -pruN 4.16.0-3/src/Generator/MethodGenerator.php 4.17.0-1/src/Generator/MethodGenerator.php
--- 4.16.0-3/src/Generator/MethodGenerator.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/src/Generator/MethodGenerator.php	2025-11-01 09:38:14.000000000 +0000
@@ -376,7 +376,7 @@ class MethodGenerator extends AbstractMe
         $output .= ')';
 
         if ($this->returnType) {
-            $output .= ' : ' . $this->returnType->generate();
+            $output .= ': ' . $this->returnType->generate();
         }
 
         if ($this->isAbstract()) {
diff -pruN 4.16.0-3/test/Generator/ClassGeneratorTest.php 4.17.0-1/test/Generator/ClassGeneratorTest.php
--- 4.16.0-3/test/Generator/ClassGeneratorTest.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/test/Generator/ClassGeneratorTest.php	2025-11-01 09:38:14.000000000 +0000
@@ -805,7 +805,7 @@ class TestSampleSingleClass
      *
      * @return bool
      */
-    protected function withParamsAndReturnType($mixed, array $array, ?callable $callable = null, ?int $int = 0) : bool
+    protected function withParamsAndReturnType($mixed, array $array, ?callable $callable = null, ?int $int = 0): bool
     {
         /* test test */
         return true;
diff -pruN 4.16.0-3/test/Generator/MethodGeneratorTest.php 4.17.0-1/test/Generator/MethodGeneratorTest.php
--- 4.16.0-3/test/Generator/MethodGeneratorTest.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/test/Generator/MethodGeneratorTest.php	2025-11-01 09:38:14.000000000 +0000
@@ -127,7 +127,7 @@ class MethodGeneratorTest extends TestCa
 
         $methodGenerator = MethodGenerator::copyMethodSignature($ref);
         $target          = <<<'EOS'
-    protected function withParamsAndReturnType($mixed, array $array, ?callable $callable = null, ?int $int = 0) : bool
+    protected function withParamsAndReturnType($mixed, array $array, ?callable $callable = null, ?int $int = 0): bool
     {
     }
 
@@ -373,7 +373,7 @@ CODE;
         $methodGenerator->setReturnType('bar');
 
         $expected = <<<'PHP'
-    public function foo() : \bar
+    public function foo(): \bar
     {
     }
 
@@ -409,7 +409,7 @@ PHP;
     {
         $methodGenerator = MethodGenerator::fromReflection(new MethodReflection($className, $methodName));
 
-        self::assertStringMatchesFormat('%A) : ' . $expectedReturnSignature . '%w{%A', $methodGenerator->generate());
+        self::assertStringMatchesFormat('%A): ' . $expectedReturnSignature . '%w{%A', $methodGenerator->generate());
     }
 
     /**
diff -pruN 4.16.0-3/test/Generator/ParameterGeneratorTest.php 4.17.0-1/test/Generator/ParameterGeneratorTest.php
--- 4.16.0-3/test/Generator/ParameterGeneratorTest.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/test/Generator/ParameterGeneratorTest.php	2025-11-01 09:38:14.000000000 +0000
@@ -220,8 +220,6 @@ class ParameterGeneratorTest extends Tes
 
         $reflectionOmitDefaultValue = new ReflectionProperty($parameterGenerator, 'omitDefaultValue');
 
-        $reflectionOmitDefaultValue->setAccessible(true);
-
         self::assertTrue($reflectionOmitDefaultValue->getValue($parameterGenerator));
     }
 
diff -pruN 4.16.0-3/test/Generator/PropertyGeneratorTest.php 4.17.0-1/test/Generator/PropertyGeneratorTest.php
--- 4.16.0-3/test/Generator/PropertyGeneratorTest.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/test/Generator/PropertyGeneratorTest.php	2025-11-01 09:38:14.000000000 +0000
@@ -296,8 +296,6 @@ EOS;
         self::assertInstanceOf(TypeGenerator::class, $propertyGenerator->getType());
         $reflectionOmitDefaultValue = new ReflectionProperty($propertyGenerator, 'omitDefaultValue');
 
-        $reflectionOmitDefaultValue->setAccessible(true);
-
         self::assertTrue($reflectionOmitDefaultValue->getValue($propertyGenerator));
     }
 
diff -pruN 4.16.0-3/test/Generator/TraitGeneratorTest.php 4.17.0-1/test/Generator/TraitGeneratorTest.php
--- 4.16.0-3/test/Generator/TraitGeneratorTest.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/test/Generator/TraitGeneratorTest.php	2025-11-01 09:38:14.000000000 +0000
@@ -534,7 +534,6 @@ CODE;
         $reflectedClass = new ReflectionClass($classGenerator);
 
         $reflection = $reflectedClass->getProperty('flags');
-        $reflection->setAccessible(true);
 
         return $reflection->getValue($classGenerator);
     }
diff -pruN 4.16.0-3/test/Reflection/ParameterReflectionTest.php 4.17.0-1/test/Reflection/ParameterReflectionTest.php
--- 4.16.0-3/test/Reflection/ParameterReflectionTest.php	2024-11-20 13:15:13.000000000 +0000
+++ 4.17.0-1/test/Reflection/ParameterReflectionTest.php	2025-11-01 09:38:14.000000000 +0000
@@ -14,6 +14,8 @@ use PHPUnit\Framework\Attributes\Group;
 use PHPUnit\Framework\TestCase;
 use ReflectionType;
 
+use const PHP_VERSION_ID;
+
 #[Group('Laminas_Reflection')]
 #[Group('Laminas_Reflection_Parameter')]
 class ParameterReflectionTest extends TestCase
@@ -159,7 +161,13 @@ class ParameterReflectionTest extends Te
             [InternalHintsClass::class, 'floatParameter', 'foo', 'float'],
             [InternalHintsClass::class, 'stringParameter', 'foo', 'string'],
             [InternalHintsClass::class, 'boolParameter', 'foo', 'bool'],
-            [ClassTypeHintedClass::class, 'selfParameter', 'foo', 'self'],
+            [
+                ClassTypeHintedClass::class,
+                'selfParameter',
+                'foo',
+                // In PHP >=8.5, `ReflectionType::getName()` does not return 'self'
+                PHP_VERSION_ID >= 80500 ? ClassTypeHintedClass::class : 'self',
+            ],
             [ClassTypeHintedClass::class, 'classParameter', 'foo', ClassTypeHintedClass::class],
             [ClassTypeHintedClass::class, 'otherClassParameter', 'foo', InternalHintsClass::class],
             [ClassTypeHintedClass::class, 'closureParameter', 'foo', Closure::class],
