Skip to content

Commit 9a77a83

Browse files
committed
Add support of php 8.4 to cloud-patches
1 parent d376454 commit 9a77a83

File tree

7 files changed

+13
-22
lines changed

7 files changed

+13
-22
lines changed

src/Test/Unit/Command/Process/ShowStatusTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ private function createPatch(string $id, bool $isDeprecated, string $replacedWit
194194
$patch->method('isDeprecated')->willReturn($isDeprecated);
195195
$patch->method('getReplacedWith')->willReturn($replacedWith);
196196

197-
// To make mock object unique for assertions and array operations.
198-
$patch->id = microtime();
199-
200197
return $patch;
201198
}
202199
}

src/Test/Unit/Patch/AggregatorTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ private function createPatch(string $id, string $title)
8989
$patch = $this->createMock(Patch::class);
9090
$patch->method('getId')->willReturn($id);
9191
$patch->method('getTitle')->willReturn($title);
92-
93-
// To make mock object unique for assertions and array operations.
94-
$patch->id = microtime();
95-
$patch->method('__toString')->willReturn($patch->id);
92+
$patch->method('__toString')->willReturn(microtime());
9693

9794
return $patch;
9895
}

src/Test/Unit/Patch/Collector/CloudCollectorTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function testCollectSuccessful(bool $isCloud, string $expectedType)
191191
/**
192192
* @return array
193193
*/
194-
public function collectDataProvider(): array
194+
public static function collectDataProvider(): array
195195
{
196196
return [
197197
['isCloud' => false, 'expectedType' => PatchInterface::TYPE_OPTIONAL],
@@ -221,13 +221,13 @@ public function testInvalidConfigurationPatchFilename(array $invalidConfig)
221221
/**
222222
* @return array
223223
*/
224-
public function invalidPatchFilenameDataProvider(): array
224+
public static function invalidPatchFilenameDataProvider(): array
225225
{
226226
return [
227-
[$this->createConfig('fix_asset_locking_race_condition__2.1.4.patch')],
228-
[$this->createConfig('MDVA-2470__fix_asset_locking_race_condition.patch')],
229-
[$this->createConfig('MDVA-2470_fix_asset_locking_race_condition__2.1.4.patch')],
230-
[$this->createConfig('MDVA-2470__fix_asset_locking_race_condition_2.1.4.patch')],
227+
[self::createConfig('fix_asset_locking_race_condition__2.1.4.patch')],
228+
[self::createConfig('MDVA-2470__fix_asset_locking_race_condition.patch')],
229+
[self::createConfig('MDVA-2470_fix_asset_locking_race_condition__2.1.4.patch')],
230+
[self::createConfig('MDVA-2470__fix_asset_locking_race_condition_2.1.4.patch')],
231231
];
232232
}
233233

@@ -237,7 +237,7 @@ public function invalidPatchFilenameDataProvider(): array
237237
* @param string $filename
238238
* @return array
239239
*/
240-
private function createConfig(string $filename): array
240+
private static function createConfig(string $filename): array
241241
{
242242
return [
243243
'magento/magento2-base' => [
@@ -270,7 +270,7 @@ public function testInvalidConfigurationTitleSection(array $config)
270270
/**
271271
* @return array
272272
*/
273-
public function invalidTitleSectionDataProvider(): array
273+
public static function invalidTitleSectionDataProvider(): array
274274
{
275275
return [
276276
[

src/Test/Unit/Patch/Conflict/AnalyzerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function testAnalyze(array $checkApplyMap, string $expectedMessage)
107107
/**
108108
* @return array
109109
*/
110-
public function analyzeDataProvider(): array
110+
public static function analyzeDataProvider(): array
111111
{
112112
return [
113113
[

src/Test/Unit/Patch/FilterFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testCreateApplyFilter(array $inputArgument, $expectedValue)
4646
/**
4747
* @return array
4848
*/
49-
public function createApplyFilterDataProvider(): array
49+
public static function createApplyFilterDataProvider(): array
5050
{
5151
return [
5252
['inputArgument' => [], 'expectedValue' => null],
@@ -75,7 +75,7 @@ public function testCreateRevertFilter(array $inputArgument, bool $optAll, $expe
7575
/**
7676
* @return array
7777
*/
78-
public function createRevertFilterDataProvider(): array
78+
public static function createRevertFilterDataProvider(): array
7979
{
8080
return [
8181
['inputArgument' => [], 'optAll' => false, 'expectedValue' => null],

src/Test/Unit/Patch/GitConverterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testConvert(string $composerContent, string $expectedContent)
4747
* phpcs:disable
4848
* @return array
4949
*/
50-
public function convertDataProvider()
50+
public static function convertDataProvider()
5151
{
5252
return [
5353
[

src/Test/Unit/Patch/Status/OptionalResolverTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ private function createPatch(string $id, array $require = [])
248248
$aggregatedPatch->method('getRequire')->willReturn($require);
249249
$aggregatedPatch->method('getItems')->willReturn([$patch]);
250250

251-
// To make mock object unique for assertions and array operations.
252-
$aggregatedPatch->id = microtime();
253-
254251
return $aggregatedPatch;
255252
}
256253
}

0 commit comments

Comments
 (0)