File: 0002-Make-provider-classes-static-PHPUnit-11-fix.patch

package info (click to toggle)
php-deepcopy 1.13.4-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 612 kB
  • sloc: php: 1,793; makefile: 26
file content (138 lines) | stat: -rw-r--r-- 5,827 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 18 May 2024 14:16:40 +0200
Subject: Make provider classes static (PHPUnit 11 fix)

Bug-Debian: https://bugs.debian.org/1070527
---
 tests/DeepCopyTest/DeepCopyTest.php                              | 6 +++---
 tests/DeepCopyTest/Filter/ReplaceFilterTest.php                  | 2 +-
 tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php | 2 +-
 tests/DeepCopyTest/Matcher/PropertyMatcherTest.php               | 2 +-
 tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php           | 2 +-
 tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php           | 2 +-
 tests/DeepCopyTest/Reflection/ReflectionHelperTest.php           | 2 +-
 tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php               | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/DeepCopyTest/DeepCopyTest.php b/tests/DeepCopyTest/DeepCopyTest.php
index ae35cbc..a4cf8e1 100644
--- a/tests/DeepCopyTest/DeepCopyTest.php
+++ b/tests/DeepCopyTest/DeepCopyTest.php
@@ -54,7 +54,7 @@ class DeepCopyTest extends TestCase
         $this->assertSame($value, $copy);
     }
 
-    public function provideScalarValues()
+    public static function provideScalarValues()
     {
         return [
             [true],
@@ -103,7 +103,7 @@ class DeepCopyTest extends TestCase
         $this->assertSame($expectedVal, $copy->prop);
     }
 
-    public function provideObjectWithScalarValues()
+    public static function provideObjectWithScalarValues()
     {
         $createObject = function ($val) {
             $object = new stdClass();
@@ -117,7 +117,7 @@ class DeepCopyTest extends TestCase
             function (array $vals) use ($createObject) {
                 return [$createObject($vals[0]), $vals[0]];
             },
-            $this->provideScalarValues()
+            self::provideScalarValues()
         );
     }
 
diff --git a/tests/DeepCopyTest/Filter/ReplaceFilterTest.php b/tests/DeepCopyTest/Filter/ReplaceFilterTest.php
index a675f01..f0e0c21 100644
--- a/tests/DeepCopyTest/Filter/ReplaceFilterTest.php
+++ b/tests/DeepCopyTest/Filter/ReplaceFilterTest.php
@@ -35,7 +35,7 @@ class ReplaceFilterTest extends TestCase
         $this->assertEquals($expected, $object->data);
     }
 
-    public function provideCallbacks()
+    public static function provideCallbacks()
     {
         return [
             [
diff --git a/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php b/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php
index 38de911..30196cf 100644
--- a/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php
@@ -25,7 +25,7 @@ class DoctrineProxyMatcherTest extends TestCase
         $this->assertEquals($expected, $actual);
     }
 
-    public function providePairs()
+    public static function providePairs()
     {
         return [
             [new FooProxy(), true],
diff --git a/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php b/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php
index 7f25101..5bcb184 100644
--- a/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php
@@ -22,7 +22,7 @@ class PropertyMatcherTest extends TestCase
         $this->assertEquals($expected, $actual);
     }
 
-    public function providePairs()
+    public static function providePairs()
     {
         return [
             'matching case' => [new X(), 'foo', true],
diff --git a/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php b/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php
index d099be5..2eef4e8 100644
--- a/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php
@@ -23,7 +23,7 @@ class PropertyNameMatcherTest extends TestCase
         $this->assertEquals($expected, $actual);
     }
 
-    public function providePairs()
+    public static function providePairs()
     {
         return [
             [new stdClass(), 'foo', true],
diff --git a/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php b/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php
index 5ba58b3..269884c 100644
--- a/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php
@@ -49,7 +49,7 @@ class PropertyTypeMatcherTest extends TestCase
         $this->assertTrue($matcher->matches($object, 'date'));
     }
 
-    public function providePairs()
+    public static function providePairs()
     {
         $object1 = new PropertyTypeMatcherTestFixture1();
         $object1->foo = new PropertyTypeMatcherTestFixture2();
diff --git a/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php b/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php
index 8935f57..34800d9 100644
--- a/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php
+++ b/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php
@@ -52,7 +52,7 @@ class ReflectionHelperTest extends TestCase
         $this->assertSame($name, $property->getName());
     }
 
-    public function provideProperties()
+    public static function provideProperties()
     {
         return [
             'public property' => ['a10'],
diff --git a/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php b/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php
index cfb061b..2f18be1 100644
--- a/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php
+++ b/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php
@@ -23,7 +23,7 @@ class TypeMatcherTest extends TestCase
         $this->assertSame($expected, $actual);
     }
 
-    public function provideElements()
+    public static function provideElements()
     {
         return [
             '[class] same class as type' => ['stdClass', new stdClass(), true],