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
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Mon, 20 May 2024 11:35:47 +0200
Subject: Make provider functions static (PHPUnit 11 Fix)
Bug-Debian: https://bugs.debian.org/1070504
---
tests/Composer/Test/Advisory/AuditorTest.php | 4 ++--
tests/Composer/Test/Command/BaseDependencyCommandTest.php | 2 +-
tests/Composer/Test/Command/InstallCommandTest.php | 2 +-
tests/Composer/Test/Command/ReinstallCommandTest.php | 2 +-
tests/Composer/Test/Command/RequireCommandTest.php | 2 +-
tests/Composer/Test/Command/SelfUpdateCommandTest.php | 2 +-
tests/Composer/Test/Command/ShowCommandTest.php | 4 ++--
tests/Composer/Test/Command/UpdateCommandTest.php | 2 +-
tests/Composer/Test/Json/ComposerSchemaTest.php | 2 +-
tests/Composer/Test/Package/Version/VersionGuesserTest.php | 2 +-
10 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/Composer/Test/Advisory/AuditorTest.php b/tests/Composer/Test/Advisory/AuditorTest.php
index a5472f0..42e0c0c 100644
--- a/tests/Composer/Test/Advisory/AuditorTest.php
+++ b/tests/Composer/Test/Advisory/AuditorTest.php
@@ -200,7 +200,7 @@ Found 2 abandoned packages:
self::assertSame($output, trim(str_replace("\r", '', $io->getOutput())));
}
- public function ignoredIdsProvider(): \Generator
+ public static function ignoredIdsProvider(): \Generator
{
yield 'ignore by CVE' => [
[
@@ -353,7 +353,7 @@ Found 2 abandoned packages:
self::assertSame($exitCode, $result);
}
- public function ignoreSeverityProvider(): \Generator
+ public static function ignoreSeverityProvider(): \Generator
{
yield 'ignore medium' => [
[
diff --git a/tests/Composer/Test/Command/BaseDependencyCommandTest.php b/tests/Composer/Test/Command/BaseDependencyCommandTest.php
index bc85d18..120e244 100644
--- a/tests/Composer/Test/Command/BaseDependencyCommandTest.php
+++ b/tests/Composer/Test/Command/BaseDependencyCommandTest.php
@@ -440,7 +440,7 @@ OUTPUT
/**
* @return Generator<string, array{array<string, string>, string}>
*/
- public function caseWhyNotProvider(): Generator
+ public static function caseWhyNotProvider(): Generator
{
yield 'it could not found the package with a specific version' => [
['package' => 'vendor1/package1', 'version' => '3.*'],
diff --git a/tests/Composer/Test/Command/InstallCommandTest.php b/tests/Composer/Test/Command/InstallCommandTest.php
index ebaf15c..33c1a36 100644
--- a/tests/Composer/Test/Command/InstallCommandTest.php
+++ b/tests/Composer/Test/Command/InstallCommandTest.php
@@ -45,7 +45,7 @@ class InstallCommandTest extends TestCase
self::assertSame(trim($expected), trim($appTester->getDisplay(true)));
}
- public function errorCaseProvider(): Generator
+ public static function errorCaseProvider(): Generator
{
yield 'it writes an error when the dev flag is passed' => [
[
diff --git a/tests/Composer/Test/Command/ReinstallCommandTest.php b/tests/Composer/Test/Command/ReinstallCommandTest.php
index cc21ce5..4eacb68 100644
--- a/tests/Composer/Test/Command/ReinstallCommandTest.php
+++ b/tests/Composer/Test/Command/ReinstallCommandTest.php
@@ -57,7 +57,7 @@ class ReinstallCommandTest extends TestCase
self::assertSame($expected, trim($appTester->getDisplay(true)));
}
- public function caseProvider(): Generator
+ public static function caseProvider(): Generator
{
yield 'reinstall a package by name' => [
['packages' => ['root/req', 'root/anotherreq*']],
diff --git a/tests/Composer/Test/Command/RequireCommandTest.php b/tests/Composer/Test/Command/RequireCommandTest.php
index 0170061..bb5870f 100644
--- a/tests/Composer/Test/Command/RequireCommandTest.php
+++ b/tests/Composer/Test/Command/RequireCommandTest.php
@@ -327,7 +327,7 @@ OUTPUT
self::assertArrayNotHasKey($currentKey, $composer_content);
}
- public function provideInconsistentRequireKeys(): \Generator
+ public static function provideInconsistentRequireKeys(): \Generator
{
yield [
true,
diff --git a/tests/Composer/Test/Command/SelfUpdateCommandTest.php b/tests/Composer/Test/Command/SelfUpdateCommandTest.php
index 3d2341c..b0589b2 100644
--- a/tests/Composer/Test/Command/SelfUpdateCommandTest.php
+++ b/tests/Composer/Test/Command/SelfUpdateCommandTest.php
@@ -87,7 +87,7 @@ class SelfUpdateCommandTest extends TestCase
/**
* @return array<array<string>>
*/
- public function channelOptions(): array
+ public static function channelOptions(): array
{
return [
['--stable', 'stable channel'],
diff --git a/tests/Composer/Test/Command/ShowCommandTest.php b/tests/Composer/Test/Command/ShowCommandTest.php
index 4ce75a9..700e730 100644
--- a/tests/Composer/Test/Command/ShowCommandTest.php
+++ b/tests/Composer/Test/Command/ShowCommandTest.php
@@ -756,7 +756,7 @@ OUTPUT;
$appTester->run(['command' => 'show', 'package' => $package] + $options);
}
- public function provideNotExistingPackage(): \Generator
+ public static function provideNotExistingPackage(): \Generator
{
yield 'package with no options' => [
'not/existing',
@@ -819,7 +819,7 @@ OUTPUT;
self::assertSame($expected, trim($appTester->getDisplay(true)));
}
- public function providePackageAndTree(): \Generator
+ public static function providePackageAndTree(): \Generator
{
yield 'just package' => [
function () {
diff --git a/tests/Composer/Test/Command/UpdateCommandTest.php b/tests/Composer/Test/Command/UpdateCommandTest.php
index c00e49e..facbba9 100644
--- a/tests/Composer/Test/Command/UpdateCommandTest.php
+++ b/tests/Composer/Test/Command/UpdateCommandTest.php
@@ -388,7 +388,7 @@ OUTPUT;
);
}
- public function provideInteractiveUpdates(): \Generator
+ public static function provideInteractiveUpdates(): \Generator
{
yield [
['dep/pkg' => '1.0.1'],
diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php
index 8f479f8..b67d4d2 100644
--- a/tests/Composer/Test/Json/ComposerSchemaTest.php
+++ b/tests/Composer/Test/Json/ComposerSchemaTest.php
@@ -42,7 +42,7 @@ class ComposerSchemaTest extends TestCase
self::assertEquals($expectedError, $this->check($json));
}
- public function versionProvider(): array
+ public static function versionProvider(): array
{
return [
['1.0.0', true],
diff --git a/tests/Composer/Test/Package/Version/VersionGuesserTest.php b/tests/Composer/Test/Package/Version/VersionGuesserTest.php
index 9dc29a2..6b465cd4 100644
--- a/tests/Composer/Test/Package/Version/VersionGuesserTest.php
+++ b/tests/Composer/Test/Package/Version/VersionGuesserTest.php
@@ -381,7 +381,7 @@ class VersionGuesserTest extends TestCase
/**
* @return array<array{string, string}>
*/
- public function rootEnvVersionsProvider(): array
+ public static function rootEnvVersionsProvider(): array
{
return [
['1.0-dev', '1.0.x-dev'],
|