Skip to content

Commit 3ba4388

Browse files
authored
Revert already check for applied patches
1 parent c51a459 commit 3ba4388

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/internal/Magento/Framework/Setup/Patch/PatchApplier.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function revertDataPatches($moduleName = null)
245245
'\\' . $dataPatch,
246246
['moduleDataSetup' => $this->moduleDataSetup]
247247
);
248-
if ($dataPatch instanceof PatchRevertableInterface && $this->isApplied($dataPatch)) {
248+
if ($dataPatch instanceof PatchRevertableInterface) {
249249
try {
250250
$adapter->beginTransaction();
251251
/** @var PatchRevertableInterface|DataPatchInterface $dataPatch */
@@ -269,7 +269,7 @@ public function revertDataPatches($moduleName = null)
269269
* @param string $patchType
270270
* @return PatchRegistry
271271
*/
272-
private function prepareRegistry($moduleName, $patchType)
272+
private function prepareRegistry(string $moduleName, string $patchType): PatchRegistry
273273
{
274274
$reader = $patchType === self::DATA_PATCH ? $this->dataPatchReader : $this->schemaPatchReader;
275275
$registry = $this->patchRegistryFactory->create();
@@ -293,6 +293,8 @@ private function prepareRegistry($moduleName, $patchType)
293293

294294
/**
295295
* Apply the given patch. The patch is and its aliases are added to the history.
296+
*
297+
* @param PatchInterface $patch
296298
*/
297299
private function applyPatch(PatchInterface $patch): void
298300
{
@@ -307,6 +309,8 @@ private function applyPatch(PatchInterface $patch): void
307309

308310
/**
309311
* Check wether the given patch or any of its aliases are already applied or not.
312+
*
313+
* @param PatchInterface $patch
310314
*/
311315
private function isApplied(PatchInterface $patch): bool
312316
{

0 commit comments

Comments
 (0)