public function activatePackage($packageKey)
{
if ($this->isPackageActive($packageKey)) {
return;
}
$package = $this->getPackage($packageKey);
$composerName = $package->getComposerName();
$this->movePackageToActivatedPackages($package->getPackagePath());
$this->packageStatesConfiguration['packages'][$composerName]['state'] = self::PACKAGE_STATE_ACTIVE;
$this->packageStatesConfiguration['packages'][$composerName]['packagePath'] = $this->buildActivePackageRelativePath($package->getPackagePath());
$this->registerPackageFromStateConfiguration($composerName, $this->packageStatesConfiguration['packages'][$composerName]);
$this->savePackageStates($this->packageStatesConfiguration);
}