File: 0002-Make-provider-functions-static-PHPUnit-11-Fix.patch

package info (click to toggle)
php-phar-io-version 3.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 468 kB
  • sloc: php: 1,098; xml: 88; makefile: 4
file content (196 lines) | stat: -rw-r--r-- 8,105 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Mon, 30 Dec 2024 16:43:44 +0100
Subject: Make provider functions static (PHPUnit 11 Fix)

---
 tests/Integration/CompliesTest.php                        | 4 ++--
 tests/Integration/VersionConstraintParserTest.php         | 4 ++--
 tests/Unit/AnyVersionConstraintTest.php                   | 2 +-
 tests/Unit/ExactVersionConstraintTest.php                 | 4 ++--
 tests/Unit/GreaterThanOrEqualToVersionConstraintTest.php  | 2 +-
 tests/Unit/PreReleaseSuffixTest.php                       | 4 ++--
 tests/Unit/SpecificMajorAndMinorVersionConstraintTest.php | 2 +-
 tests/Unit/SpecificMajorVersionConstraintTest.php         | 2 +-
 tests/Unit/VersionTest.php                                | 8 ++++----
 9 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/Integration/CompliesTest.php b/tests/Integration/CompliesTest.php
index a9fb03a..93bfa73 100644
--- a/tests/Integration/CompliesTest.php
+++ b/tests/Integration/CompliesTest.php
@@ -31,7 +31,7 @@ class CompliesTest extends TestCase {
         );
     }
 
-    public function complyingProvider(): array {
+    public static function complyingProvider(): array {
         return [
             '1.0.0'  => ['1.0.0', '1.0.0'],
 
@@ -52,7 +52,7 @@ class CompliesTest extends TestCase {
         ];
     }
 
-    public function notComplyingProvider(): array {
+    public static function notComplyingProvider(): array {
         return [
             '1.0.0'  => ['1.0.0', '1.0.1'],
             '~4.6'   => ['~4.6', '4.5.3'],
diff --git a/tests/Integration/VersionConstraintParserTest.php b/tests/Integration/VersionConstraintParserTest.php
index 729b430..53976c7 100644
--- a/tests/Integration/VersionConstraintParserTest.php
+++ b/tests/Integration/VersionConstraintParserTest.php
@@ -39,7 +39,7 @@ class VersionConstraintParserTest extends TestCase {
         $parser->parse($versionString);
     }
 
-    public function versionStringProvider(): array {
+    public static function versionStringProvider(): array {
         return [
             ['1.0.2', new ExactVersionConstraint('1.0.2')],
             [
@@ -160,7 +160,7 @@ class VersionConstraintParserTest extends TestCase {
         ];
     }
 
-    public function unsupportedVersionStringProvider() {
+    public static function unsupportedVersionStringProvider() {
         return [
             ['foo'],
             ['+1.0.2'],
diff --git a/tests/Unit/AnyVersionConstraintTest.php b/tests/Unit/AnyVersionConstraintTest.php
index 95ccc72..873e1e1 100644
--- a/tests/Unit/AnyVersionConstraintTest.php
+++ b/tests/Unit/AnyVersionConstraintTest.php
@@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase;
  * @covers \PharIo\Version\AnyVersionConstraint
  */
 class AnyVersionConstraintTest extends TestCase {
-    public function versionProvider() {
+    public static function versionProvider() {
         return [
             [new Version('1.0.2')],
             [new Version('4.8')],
diff --git a/tests/Unit/ExactVersionConstraintTest.php b/tests/Unit/ExactVersionConstraintTest.php
index 1f92944..49998ca 100644
--- a/tests/Unit/ExactVersionConstraintTest.php
+++ b/tests/Unit/ExactVersionConstraintTest.php
@@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase;
  * @covers \PharIo\Version\ExactVersionConstraint
  */
 class ExactVersionConstraintTest extends TestCase {
-    public function compliantVersionProvider() {
+    public static function compliantVersionProvider() {
         return [
             ['1.0.2', new Version('1.0.2')],
             ['4.8.9', new Version('4.8.9')],
@@ -25,7 +25,7 @@ class ExactVersionConstraintTest extends TestCase {
         ];
     }
 
-    public function nonCompliantVersionProvider() {
+    public static function nonCompliantVersionProvider() {
         return [
             ['1.0.2', new Version('1.0.3')],
             ['4.8.9', new Version('4.7.9')],
diff --git a/tests/Unit/GreaterThanOrEqualToVersionConstraintTest.php b/tests/Unit/GreaterThanOrEqualToVersionConstraintTest.php
index d347821..defbe8b 100644
--- a/tests/Unit/GreaterThanOrEqualToVersionConstraintTest.php
+++ b/tests/Unit/GreaterThanOrEqualToVersionConstraintTest.php
@@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase;
  * @covers \PharIo\Version\GreaterThanOrEqualToVersionConstraint
  */
 class GreaterThanOrEqualToVersionConstraintTest extends TestCase {
-    public function versionProvider() {
+    public static function versionProvider() {
         return [
             // compliant versions
             [new Version('1.0.2'), new Version('1.0.2'), true],
diff --git a/tests/Unit/PreReleaseSuffixTest.php b/tests/Unit/PreReleaseSuffixTest.php
index bf47f75..cc20517 100644
--- a/tests/Unit/PreReleaseSuffixTest.php
+++ b/tests/Unit/PreReleaseSuffixTest.php
@@ -21,7 +21,7 @@ class PreReleaseSuffixTest extends TestCase {
         $this->assertSame($expectedResult, $leftSuffix->isGreaterThan($rightSuffix));
     }
 
-    public function greaterThanProvider() {
+    public static function greaterThanProvider() {
         return [
             ['alpha1', 'alpha2', false],
             ['alpha2', 'alpha1', true],
@@ -47,7 +47,7 @@ class PreReleaseSuffixTest extends TestCase {
         $this->assertEquals($suffix, $prs->asString());
     }
 
-    public function suffixProvider() {
+    public static function suffixProvider() {
         return [
             ['alpha1'],
             ['beta1'],
diff --git a/tests/Unit/SpecificMajorAndMinorVersionConstraintTest.php b/tests/Unit/SpecificMajorAndMinorVersionConstraintTest.php
index 0bae769..9dabd4f 100644
--- a/tests/Unit/SpecificMajorAndMinorVersionConstraintTest.php
+++ b/tests/Unit/SpecificMajorAndMinorVersionConstraintTest.php
@@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase;
  * @covers \PharIo\Version\SpecificMajorAndMinorVersionConstraint
  */
 class SpecificMajorAndMinorVersionConstraintTest extends TestCase {
-    public function versionProvider() {
+    public static function versionProvider() {
         return [
             // compliant versions
             [1, 0, new Version('1.0.2'), true],
diff --git a/tests/Unit/SpecificMajorVersionConstraintTest.php b/tests/Unit/SpecificMajorVersionConstraintTest.php
index 49b2417..9fc8403 100644
--- a/tests/Unit/SpecificMajorVersionConstraintTest.php
+++ b/tests/Unit/SpecificMajorVersionConstraintTest.php
@@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase;
  * @covers \PharIo\Version\SpecificMajorVersionConstraint
  */
 class SpecificMajorVersionConstraintTest extends TestCase {
-    public function versionProvider() {
+    public static function versionProvider() {
         return [
             // compliant versions
             [1, new Version('1.0.2'), true],
diff --git a/tests/Unit/VersionTest.php b/tests/Unit/VersionTest.php
index 38eb1f6..cbe4fbd 100644
--- a/tests/Unit/VersionTest.php
+++ b/tests/Unit/VersionTest.php
@@ -54,7 +54,7 @@ class VersionTest extends TestCase {
         }
     }
 
-    public function versionProvider() {
+    public static function versionProvider() {
         return [
             ['0.0.1', 0, 0, 1],
             ['0.1.2', 0, 1, 2],
@@ -97,7 +97,7 @@ class VersionTest extends TestCase {
         $this->assertSame($expectedResult, $versionA->isGreaterThan($versionB));
     }
 
-    public function versionGreaterThanProvider(): array {
+    public static function versionGreaterThanProvider(): array {
         return [
             [new Version('1.0.0'), new Version('1.0.1'), false],
             [new Version('1.0.1'), new Version('1.0.0'), true],
@@ -124,7 +124,7 @@ class VersionTest extends TestCase {
         new Version($versionString);
     }
 
-    public function invalidVersionStringProvider(): array {
+    public static function invalidVersionStringProvider(): array {
         return [
             ['foo'],
             ['1.2.3.4'],
@@ -132,7 +132,7 @@ class VersionTest extends TestCase {
         ];
     }
 
-    public function versionStringProvider() {
+    public static function versionStringProvider() {
         return [
             ['0.0.1', '0.0.1'],
             ['0.1.0', '0.1.0'],