Skip to content

Commit e23c914

Browse files
committed
Fix unfreezing when editing packages that are gone
1 parent 5a92e7b commit e23c914

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Entity/Package.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,11 @@ public function setRepository(string $repoUrl): void
537537
$this->remoteId = parse_url($this->repository, PHP_URL_HOST).'/'.$repoData['id'];
538538
}
539539
}
540+
541+
// when a package URL is updated to a new one we should assume it is now valid and not gone anymore
542+
if ($this->isFrozen() && $this->getFreezeReason() === PackageFreezeReason::Gone) {
543+
$this->unfreeze();
544+
}
540545
} catch (\Exception $e) {
541546
$this->vcsDriverError = '['.get_class($e).'] '.$e->getMessage();
542547
}

0 commit comments

Comments
 (0)