Skip to content

Commit 9781bf4

Browse files
committed
Add support of php 8.4 to cloud-patches
1 parent e75a0a8 commit 9781bf4

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

src/App/GenericException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GenericException extends \Exception
1919
* @param int $code
2020
* @param Throwable|null $previous
2121
*/
22-
public function __construct(string $message ="", int $code = 0, ?Throwable $previous = null)
22+
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
2323
{
2424
parent::__construct($message, $code, $previous);
2525
}

src/Test/Unit/Command/Process/Action/ApplyOptionalActionTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ public function testExecuteSuccessful()
142142
});
143143
$this->action->execute($inputMock, $outputMock, $patchFilter);
144144
}
145-
146-
147-
145+
148146
/**
149147
* Tests successful optional patches applying.
150148
*
@@ -188,7 +186,6 @@ public function testApplyAlreadyAppliedPatch()
188186
$this->action->execute($inputMock, $outputMock, $patchFilter);
189187
}
190188

191-
192189
/**
193190
* Tests successful optional patches applying.
194191
*

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ public function testApplyWithException()
145145
->willThrowException(new ApplierException('Applier error message'));
146146

147147
$this->conflictProcessor->expects($this->once())
148-
->method('process')
149-
->with(
150-
$this->logicalOr($this->equalTo($outputMock), $this->equalTo($patch), $this->equalTo([]), $this->equalTo('Applier error message'))
151-
)
148+
->method('process')
149+
->with(
150+
$this->logicalOr($this->equalTo($outputMock), $this->equalTo($patch), $this->equalTo([]), $this->equalTo('Applier error message'))
151+
)
152152
->willThrowException(new RuntimeException('Error message'));
153-
153+
154154
$this->expectException(RuntimeException::class);
155155
$this->expectExceptionMessage('Error message');
156156

src/Test/Unit/Patch/AggregatorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public function testAggregate()
7676
$this->assertTrue(is_array($result));
7777
}
7878

79-
8079
/**
8180
* Creates patch mock.
8281
*

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,15 @@ public function testCollectSuccessful()
128128
->method('setPath')
129129
->with(
130130
$this->logicalOr(
131-
$this->equalTo(self::QUALITY_PATCH_DIR . '/MDVA-2470__fix_asset_locking_race_condition__2.2.0.patch'),
132-
$this->equalTo(self::QUALITY_PATCH_DIR . '/MDVA-2470__fix_asset_locking_race_condition__2.2.0_ee.patch'),
133-
$this->equalTo(self::QUALITY_PATCH_DIR . '/MDVA-2033__prevent_deadlock_during_db_dump__2.2.0.patch')
131+
$this->equalTo(
132+
self::QUALITY_PATCH_DIR . '/MDVA-2470__fix_asset_locking_race_condition__2.2.0.patch'
133+
),
134+
$this->equalTo(
135+
self::QUALITY_PATCH_DIR . '/MDVA-2470__fix_asset_locking_race_condition__2.2.0_ee.patch'
136+
),
137+
$this->equalTo(
138+
self::QUALITY_PATCH_DIR . '/MDVA-2033__prevent_deadlock_during_db_dump__2.2.0.patch'
139+
)
134140
)
135141
);
136142

@@ -209,7 +215,6 @@ public function patchBuilderTest()
209215
);
210216
}
211217

212-
213218
/**
214219
* Tests collecting patches - invalid configuration
215220
*/
@@ -218,7 +223,7 @@ public function testInvalidConfiguration()
218223
$config = require __DIR__ . '/Fixture/quality_config_invalid.php';
219224

220225
$expectedExceptionMessage = 'Patch MDVA-2033 has invalid configuration:' .
221-
PHP_EOL . ' - Property \'file\' is not found in \'2.2.0 - 2.2.5\'' .
226+
PHP_EOL . ' - Property \'file\' is not found in \'2.2.0 - 2.2.5\' ' .
222227
PHP_EOL . ' - Property \'require\' from \'2.2.0 - 2.2.5\' should have an array type' .
223228
PHP_EOL . ' - Property \'replaced-with\' from \'2.2.0 - 2.2.5\' should have a string type' .
224229
PHP_EOL . ' - Property \'deprecated\' from \'2.2.0 - 2.2.5\' should have a boolean type';

0 commit comments

Comments
 (0)