public unfreezePackage ( string $packageKey ) : void | ||
$packageKey | string | The package to unfreeze |
return | void |
public function unfreezePackage($packageKey)
{
if (!$this->isPackageFrozen($packageKey)) {
return;
}
if (!isset($this->packages[$packageKey])) {
return;
}
$composerName = $this->packages[$packageKey]->getComposerName();
$this->bootstrap->getObjectManager()->get(ReflectionService::class)->unfreezePackageReflection($packageKey);
unset($this->packageStatesConfiguration['packages'][$composerName]['frozen']);
$this->savePackageStates($this->packageStatesConfiguration);
}
/** * @test */ public function unfreezePackageEmitsPackageStatesUpdatedSignal() { $this->mockApplicationContext->expects($this->atLeastOnce())->method('isDevelopment')->will($this->returnValue(true)); $this->packageManager->createPackage('Some.Package', ['name' => 'some/package', 'type' => 'neos-package']); $this->packageManager->freezePackage('Some.Package'); $this->mockDispatcher->expects($this->once())->method('dispatch')->with(PackageManager::class, 'packageStatesUpdated'); $this->packageManager->unfreezePackage('Some.Package'); }