From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sun, 19 May 2024 11:58:41 +0200
Subject: Make provider functions static (PHPUnit 11 Fix)

Bug-Debian: https://bugs.debian.org/1070518
---
 tests/HttpClient/AwsRetryStrategyTest.php  | 2 +-
 tests/Unit/ConfigurationTest.php           | 2 +-
 tests/Unit/Signer/SignerV4Test.php         | 2 +-
 tests/Unit/Stream/CallableStreamTest.php   | 6 +++---
 tests/Unit/Stream/FixedSizeStreamTest.php  | 6 +++---
 tests/Unit/Stream/IterableStreamTest.php   | 6 +++---
 tests/Unit/Stream/ResourceStreamTest.php   | 6 +++---
 tests/Unit/Stream/RewindableStreamTest.php | 6 +++---
 tests/Unit/Stream/StringStreamTest.php     | 6 +++---
 9 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/tests/HttpClient/AwsRetryStrategyTest.php b/tests/HttpClient/AwsRetryStrategyTest.php
index a242b23..bccae03 100644
--- a/tests/HttpClient/AwsRetryStrategyTest.php
+++ b/tests/HttpClient/AwsRetryStrategyTest.php
@@ -25,7 +25,7 @@ class AwsRetryStrategyTest extends TestCase
         self::assertSame($expected, $strategy->shouldRetry($context, $response, null));
     }
 
-    public function provideRetries(): iterable
+    public static function provideRetries(): iterable
     {
         yield [false, 200, null];
         yield [true, 429, null];
diff --git a/tests/Unit/ConfigurationTest.php b/tests/Unit/ConfigurationTest.php
index e076a82..c5b96ca 100644
--- a/tests/Unit/ConfigurationTest.php
+++ b/tests/Unit/ConfigurationTest.php
@@ -61,7 +61,7 @@ class ConfigurationTest extends TestCase
         self::assertNull($config->get('accessKeySecret'));
     }
 
-    public function provideConfiguration(): iterable
+    public static function provideConfiguration(): iterable
     {
         yield 'simple config' => [['endpoint' => 'foo'], [], ['endpoint' => 'foo']];
         yield 'empty config' => [['endpoint' => ''], [], ['endpoint' => '']];
diff --git a/tests/Unit/Signer/SignerV4Test.php b/tests/Unit/Signer/SignerV4Test.php
index 495dfb7..fe42964 100644
--- a/tests/Unit/Signer/SignerV4Test.php
+++ b/tests/Unit/Signer/SignerV4Test.php
@@ -78,7 +78,7 @@ class SignerV4Test extends TestCase
         self::assertEquals($expected, $request);
     }
 
-    public function provideRequests()
+    public static function provideRequests()
     {
         return [
             // POST headers should be signed.
diff --git a/tests/Unit/Stream/CallableStreamTest.php b/tests/Unit/Stream/CallableStreamTest.php
index fb14d53..dcfce89 100644
--- a/tests/Unit/Stream/CallableStreamTest.php
+++ b/tests/Unit/Stream/CallableStreamTest.php
@@ -39,14 +39,14 @@ class CallableStreamTest extends TestCase
         self::assertSame($expected, iterator_to_array($stream));
     }
 
-    public function provideLengths(): iterable
+    public static function provideLengths(): iterable
     {
         yield [function () {
             return 'Hello world';
         }, null];
     }
 
-    public function provideStrings(): iterable
+    public static function provideStrings(): iterable
     {
         $f = static function (string ...$items) {
             return static function () use (&$items) {
@@ -58,7 +58,7 @@ class CallableStreamTest extends TestCase
         yield [$f('Hello', ' ', '', 'world'), 'Hello '];
     }
 
-    public function provideChunks(): iterable
+    public static function provideChunks(): iterable
     {
         $f = static function (string ...$items) {
             return static function () use (&$items) {
diff --git a/tests/Unit/Stream/FixedSizeStreamTest.php b/tests/Unit/Stream/FixedSizeStreamTest.php
index 85a585a..a8cec77 100644
--- a/tests/Unit/Stream/FixedSizeStreamTest.php
+++ b/tests/Unit/Stream/FixedSizeStreamTest.php
@@ -53,19 +53,19 @@ class FixedSizeStreamTest extends TestCase
         self::assertSame($expected, iterator_to_array($stream));
     }
 
-    public function provideLengths(): iterable
+    public static function provideLengths(): iterable
     {
         yield [StringStream::create('Hello world'), 11];
         yield [CallableStream::create(function () {}), null];
     }
 
-    public function provideStrings(): iterable
+    public static function provideStrings(): iterable
     {
         yield [StringStream::create('Hello world'), 'Hello world'];
         yield [IterableStream::create((function () { yield 'Hello world'; })()), 'Hello world'];
     }
 
-    public function provideChunks(): iterable
+    public static function provideChunks(): iterable
     {
         yield [StringStream::create('Hello world'), 3, ['Hel', 'lo ', 'wor', 'ld']];
         yield [IterableStream::create((function () {
diff --git a/tests/Unit/Stream/IterableStreamTest.php b/tests/Unit/Stream/IterableStreamTest.php
index 72dc3cd..e43cdbf 100644
--- a/tests/Unit/Stream/IterableStreamTest.php
+++ b/tests/Unit/Stream/IterableStreamTest.php
@@ -39,14 +39,14 @@ class IterableStreamTest extends TestCase
         self::assertSame($expected, iterator_to_array($stream));
     }
 
-    public function provideLengths(): iterable
+    public static function provideLengths(): iterable
     {
         yield [(function () {
             yield 'Hello world';
         })(), null];
     }
 
-    public function provideStrings(): iterable
+    public static function provideStrings(): iterable
     {
         yield [(function () {
             yield 'Hello world';
@@ -65,7 +65,7 @@ class IterableStreamTest extends TestCase
         })(), 'Hello world'];
     }
 
-    public function provideChunks(): iterable
+    public static function provideChunks(): iterable
     {
         yield [(function () {
             yield 'Hello world';
diff --git a/tests/Unit/Stream/ResourceStreamTest.php b/tests/Unit/Stream/ResourceStreamTest.php
index 86d5ddf..b97bc36 100644
--- a/tests/Unit/Stream/ResourceStreamTest.php
+++ b/tests/Unit/Stream/ResourceStreamTest.php
@@ -38,7 +38,7 @@ class ResourceStreamTest extends TestCase
         self::assertSame($expected, iterator_to_array($stream));
     }
 
-    public function provideLengths(): iterable
+    public static function provideLengths(): iterable
     {
         $resource = fopen(__DIR__ . '/../../../LICENSE', 'r');
         yield [$resource, 1099];
@@ -53,7 +53,7 @@ class ResourceStreamTest extends TestCase
         yield [$resource, 11];
     }
 
-    public function provideStrings(): iterable
+    public static function provideStrings(): iterable
     {
         $resource = fopen('php://temp', 'rw+');
         fwrite($resource, 'Hello World');
@@ -65,7 +65,7 @@ class ResourceStreamTest extends TestCase
         yield [$resource, 'Hello World'];
     }
 
-    public function provideChunks(): iterable
+    public static function provideChunks(): iterable
     {
         $resource = fopen('php://temp', 'rw+');
         fwrite($resource, 'Hello World');
diff --git a/tests/Unit/Stream/RewindableStreamTest.php b/tests/Unit/Stream/RewindableStreamTest.php
index fca7aac..2bc5242 100644
--- a/tests/Unit/Stream/RewindableStreamTest.php
+++ b/tests/Unit/Stream/RewindableStreamTest.php
@@ -60,19 +60,19 @@ class RewindableStreamTest extends TestCase
         self::assertSame(2, $count);
     }
 
-    public function provideLengths(): iterable
+    public static function provideLengths(): iterable
     {
         yield [StringStream::create('Hello world'), 11];
         yield [CallableStream::create(function () {}), null];
     }
 
-    public function provideStrings(): iterable
+    public static function provideStrings(): iterable
     {
         yield [StringStream::create('Hello world'), 'Hello world'];
         yield [IterableStream::create((function () { yield 'Hello world'; })()), 'Hello world'];
     }
 
-    public function provideChunks(): iterable
+    public static function provideChunks(): iterable
     {
         yield [StringStream::create('Hello world'), ['Hello world']];
     }
diff --git a/tests/Unit/Stream/StringStreamTest.php b/tests/Unit/Stream/StringStreamTest.php
index 2455beb..80aed35 100644
--- a/tests/Unit/Stream/StringStreamTest.php
+++ b/tests/Unit/Stream/StringStreamTest.php
@@ -39,19 +39,19 @@ class StringStreamTest extends TestCase
         self::assertSame($expected, iterator_to_array($stream));
     }
 
-    public function provideLengths(): iterable
+    public static function provideLengths(): iterable
     {
         yield ['Hello world', 11];
         yield ['H', 1];
         yield ['é', 2];
     }
 
-    public function provideStrings(): iterable
+    public static function provideStrings(): iterable
     {
         yield ['Hello world', 'Hello world'];
     }
 
-    public function provideChunks(): iterable
+    public static function provideChunks(): iterable
     {
         yield ['Hello world', ['Hello world']];
     }
