Skip to content

Commit

Permalink
Merge pull request #3901 from oat-sa/feat/REL-1275/rebuild-di-container
Browse files Browse the repository at this point in the history
feat: use new container rebuild function that restarts as well
  • Loading branch information
augustas authored Oct 10, 2023
2 parents e5a114a + 602321c commit 86fb138
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
4 changes: 1 addition & 3 deletions actions/class.ExtensionsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ protected function getExtensionManager()

private function forceRebuildDependencyInjectionContainer(): void
{
$this->getServiceManager()
->getContainerBuilder()
->forceBuild();
$this->getServiceManager()->rebuildContainer();
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"oat-sa/jig": "~0.2",
"oat-sa/composer-npm-bridge": "~0.4.2||dev-master",
"oat-sa/oatbox-extension-installer": "~1.1||dev-master",
"oat-sa/generis": ">=15.25",
"oat-sa/generis": ">=15.29",
"composer/package-versions-deprecated": "^1.11",
"paragonie/random_compat": "^2.0",
"phpdocumentor/reflection-docblock": "^5.2",
Expand Down
4 changes: 1 addition & 3 deletions install/class.Installator.php
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,6 @@ private function setInstallationFinished()

private function recreateDependencyInjectionContainerCache(): void
{
ServiceManager::getServiceManager()
->getContainerBuilder()
->forceBuild();
ServiceManager::getServiceManager()->rebuildContainer();
}
}
4 changes: 1 addition & 3 deletions scripts/installExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@

InstallHelper::installRecursively([$extId]);

ServiceManager::getServiceManager()
->getContainerBuilder()
->forceBuild();
ServiceManager::getServiceManager()->rebuildContainer();
2 changes: 1 addition & 1 deletion scripts/taoUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$action->setServiceLocator($serviceManager);
$report = $action->__invoke([]);

$serviceManager->getContainerBuilder()->forceBuild();
$serviceManager->rebuildContainer();

/** @var FeatureFlagRepositoryInterface $featureFlagChecker */
$featureFlagChecker = $serviceManager->getContainer()->get(FeatureFlagRepositoryInterface::class);
Expand Down
3 changes: 1 addition & 2 deletions scripts/uninstallExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
$uninstaller = new tao_install_ExtensionUninstaller($extension);
$uninstaller->uninstall();

$serviceManager->getContainerBuilder()
->forceBuild();
$serviceManager->rebuildContainer();

$message = __('Uninstalled %s', $extId);
} catch (common_Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/update/MigrateWebhooksConfigsFromFileToRdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __invoke($params): Report
OntologyUpdater::syncModels();

$serviceManager = $this->getServiceManager();
$serviceManager->getContainerBuilder()->forceBuild();
$serviceManager->rebuildContainer();

try {
/** @var WebhookFileRegistry $fileRegistry */
Expand Down

0 comments on commit 86fb138

Please sign in to comment.