[pkg-php-pear] Bug#1061536: php-doctrine-deprecations: FTBFS for PHP 8.3

Athos Ribeiro athos.ribeiro at canonical.com
Fri Jan 26 02:06:16 GMT 2024


Source: php-doctrine-deprecations
Version: 1.1.2-1
Severity: normal
Tags: patch
X-Debbugs-Cc: athos.ribeiro at canonical.com

Dear Maintainer,

This package FTBFS with PHP 8.3 (in experimental) due to the deprecation
mentioned in
https://www.php.net/manual/en/reflectionproperty.setvalue.php.

I am attaching a patch to fix the issue, which was also forwarded
upstream at https://github.com/doctrine/deprecations/pull/64.
-------------- next part --------------
Description: adjust tests for PHP 8.3
  As of PHP 8.3.0, calling ReflectionProperty::setValue with a single argument
  is deprecated.
  See https://www.php.net/manual/en/reflectionproperty.setvalue.php for further
  reference.
Author: Athos Ribeiro <athos.ribeiro at canonical.com>
Forwarded: https://github.com/doctrine/deprecations/pull/64
Last-Update: 2024-01-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/tests/Doctrine/Deprecations/DeprecationTest.php
+++ b/tests/Doctrine/Deprecations/DeprecationTest.php
@@ -28,11 +28,11 @@
         // reset the global state of Deprecation class across tests
         $reflectionProperty = new ReflectionProperty(Deprecation::class, 'ignoredPackages');
         $reflectionProperty->setAccessible(true);
-        $reflectionProperty->setValue([]);
+        $reflectionProperty->setValue(null, []);
 
         $reflectionProperty = new ReflectionProperty(Deprecation::class, 'triggeredDeprecations');
         $reflectionProperty->setAccessible(true);
-        $reflectionProperty->setValue([]);
+        $reflectionProperty->setValue(null, []);
 
         Deprecation::disable();
 
@@ -277,12 +277,12 @@
     {
         $reflectionProperty = new ReflectionProperty(Deprecation::class, 'type');
         $reflectionProperty->setAccessible(true);
-        $reflectionProperty->setValue(null);
+        $reflectionProperty->setValue(null, null);
 
         Deprecation::trigger('Foo', 'link', 'message');
         $this->assertSame(0, Deprecation::getUniqueTriggeredDeprecationsCount());
 
-        $reflectionProperty->setValue(null);
+        $reflectionProperty->setValue(null, null);
         $_SERVER['DOCTRINE_DEPRECATIONS'] = 'track';
 
         Deprecation::trigger('Foo', __METHOD__, 'message');
@@ -293,7 +293,7 @@
     {
         $reflectionProperty = new ReflectionProperty(Deprecation::class, 'type');
         $reflectionProperty->setAccessible(true);
-        $reflectionProperty->setValue(null);
+        $reflectionProperty->setValue(null, null);
         $_ENV['DOCTRINE_DEPRECATIONS'] = 'trigger';
 
         $this->expectErrorHandler(


More information about the pkg-php-pear mailing list