From a9d381eca7bd64b9cca7c59bb2ff9deb20aede68 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 28 Jul 2023 13:16:13 +0200 Subject: [PATCH] TASK: Remove getService method --- .../Tests/Behavior/Features/Bootstrap/FeatureContext.php | 4 ++-- .../Command/PerformanceMeasurementCommandController.php | 2 +- .../Tests/Behavior/Bootstrap/FeatureContext.php | 4 ++-- .../Tests/Behavior/Features/Bootstrap/MigrationsTrait.php | 2 +- .../Features/Bootstrap/StructureAdjustmentsTrait.php | 2 +- .../Classes/Command/CrCommandController.php | 4 ++-- .../Classes/Command/ContentStreamCommandController.php | 4 ++-- .../Classes/Command/CrCommandController.php | 8 ++++---- .../Classes/Command/MigrateEventsCommandController.php | 2 +- .../Classes/Command/NodeMigrationCommandController.php | 2 +- .../Command/StructureAdjustmentsCommandController.php | 4 ++-- .../Classes/Command/WorkspaceCommandController.php | 2 +- .../AssetUsage/Command/AssetUsageCommandController.php | 2 +- Neos.Neos/Classes/Command/CrCommandController.php | 4 ++-- .../Module/Administration/DimensionController.php | 2 +- .../Controller/Module/Management/WorkspacesController.php | 2 +- .../Controller/Service/ContentDimensionsController.php | 2 +- Neos.Neos/Classes/Domain/Service/SiteService.php | 4 ++-- .../Classes/Fusion/DimensionsMenuItemsImplementation.php | 2 +- Neos.Neos/Classes/View/FusionExceptionView.php | 2 +- .../Tests/Behavior/Features/Bootstrap/FeatureContext.php | 4 ++-- 21 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php index 2f9c0ba77fe..883aba1f0ad 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -128,7 +128,7 @@ protected function initCleanContentRepository(array $adapterKeys): void $this->contentRepository->setUp(); self::$wasContentRepositorySetupCalled = true; } - $this->contentRepositoryInternals = $this->contentRepositoryRegistry->getService( + $this->contentRepositoryInternals = $this->contentRepositoryRegistry->buildService( $this->contentRepositoryId, new ContentRepositoryInternalsFactory() ); @@ -150,7 +150,7 @@ protected function getContentRepositoryService( $contentRepositoryRegistry = $this->contentRepositoryRegistry ?: $this->objectManager->get(ContentRepositoryRegistry::class); - return $contentRepositoryRegistry->getService( + return $contentRepositoryRegistry->buildService( $contentRepositoryId, $factory ); diff --git a/Neos.ContentRepository.BehavioralTests/Classes/Command/PerformanceMeasurementCommandController.php b/Neos.ContentRepository.BehavioralTests/Classes/Command/PerformanceMeasurementCommandController.php index 64fbd771645..5423f286e0f 100644 --- a/Neos.ContentRepository.BehavioralTests/Classes/Command/PerformanceMeasurementCommandController.php +++ b/Neos.ContentRepository.BehavioralTests/Classes/Command/PerformanceMeasurementCommandController.php @@ -28,7 +28,7 @@ public function __construct( ContentRepositoryRegistry $contentRepositoryRegistry, PerformanceMeasurementServiceFactory $performanceMeasurementServiceFactory ) { - $this->performanceMeasurementService = $contentRepositoryRegistry->getService( + $this->performanceMeasurementService = $contentRepositoryRegistry->buildService( ContentRepositoryId::fromString('default'), $performanceMeasurementServiceFactory ); diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php index 22dde978324..2ae865f9dfd 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php @@ -168,7 +168,7 @@ protected function initCleanContentRepository(array $adapterKeys): void $this->contentRepository->setUp(); self::$wasContentRepositorySetupCalled = true; } - $this->contentRepositoryInternals = $this->contentRepositoryRegistry->getService($this->contentRepositoryId, new ContentRepositoryInternalsFactory()); + $this->contentRepositoryInternals = $this->contentRepositoryRegistry->buildService($this->contentRepositoryId, new ContentRepositoryInternalsFactory()); $availableContentGraphs = []; $availableContentGraphs['DoctrineDBAL'] = $this->contentRepository->getContentGraph(); @@ -201,7 +201,7 @@ protected function getEnvironment() protected function getContentRepositoryService(ContentRepositoryId $contentRepositoryId, ContentRepositoryServiceFactoryInterface $factory): ContentRepositoryServiceInterface { - return $this->getContentRepositoryRegistry()->getService($contentRepositoryId, $factory); + return $this->getContentRepositoryRegistry()->buildService($contentRepositoryId, $factory); } protected function getDbalClient(): DbalClientInterface diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php index 56b6f56bebc..063b50b490b 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/MigrationsTrait.php @@ -42,7 +42,7 @@ public function iRunTheFollowingNodeMigration(string $workspaceName, string $con $migrationConfiguration = new MigrationConfiguration(Yaml::parse($string->getRaw())); $contentStreamIds = array_map(fn (string $cs) => ContentStreamId::fromString($cs), explode(',', $contentStreams)); $command = new ExecuteMigration($migrationConfiguration, WorkspaceName::fromString($workspaceName), $contentStreamIds); - $nodeMigrationService = $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new NodeMigrationServiceFactory()); + $nodeMigrationService = $this->getContentRepositoryRegistry()->buildService($this->getContentRepositoryId(), new NodeMigrationServiceFactory()); $nodeMigrationService->executeMigration($command); } diff --git a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php index a520555ee5c..267b17dbe50 100644 --- a/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php +++ b/Neos.ContentRepository.Core/Tests/Behavior/Features/Bootstrap/StructureAdjustmentsTrait.php @@ -32,7 +32,7 @@ abstract protected function getContentRepositoryRegistry(): ContentRepositoryReg protected function getStructureAdjustmentService(): StructureAdjustmentService { - return $this->getContentRepositoryRegistry()->getService($this->getContentRepositoryId(), new StructureAdjustmentServiceFactory()); + return $this->getContentRepositoryRegistry()->buildService($this->getContentRepositoryId(), new StructureAdjustmentServiceFactory()); } /** diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/CrCommandController.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/CrCommandController.php index 78e6f5e6564..4e38b77998c 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/CrCommandController.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/Command/CrCommandController.php @@ -129,13 +129,13 @@ public function migrateLegacyDataCommand(bool $verbose = false, string $config = $this->connection->executeStatement('TRUNCATE ' . $connection->quoteIdentifier($eventTableName)); // we also need to reset the projections; in order to ensure the system runs deterministically. We // do this by replaying the just-truncated event stream. - $projectionService = $this->contentRepositoryRegistry->getService($contentRepositoryId, $this->projectionReplayServiceFactory); + $projectionService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, $this->projectionReplayServiceFactory); $projectionService->replayAllProjections(); $this->outputLine('Truncated events'); $liveContentStreamId = ContentStreamId::create(); - $legacyMigrationService = $this->contentRepositoryRegistry->getService( + $legacyMigrationService = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new LegacyMigrationServiceFactory( $connection, diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php index b16a562ba76..be280963538 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/ContentStreamCommandController.php @@ -128,7 +128,7 @@ public function importCommand(string $contentStream, string $file = null): void public function pruneCommand(string $contentRepositoryIdentifier = 'default', bool $removeTemporary = false): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepositoryIdentifier); - $contentStreamPruner = $this->contentRepositoryRegistry->getService($contentRepositoryId, new ContentStreamPrunerFactory()); + $contentStreamPruner = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new ContentStreamPrunerFactory()); $unusedContentStreams = $contentStreamPruner->prune($removeTemporary); $unusedContentStreamsPresent = false; @@ -147,7 +147,7 @@ public function pruneCommand(string $contentRepositoryIdentifier = 'default', bo public function pruneRemovedFromEventStreamCommand(string $contentRepositoryIdentifier = 'default'): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepositoryIdentifier); - $contentStreamPruner = $this->contentRepositoryRegistry->getService($contentRepositoryId, new ContentStreamPrunerFactory()); + $contentStreamPruner = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new ContentStreamPrunerFactory()); $unusedContentStreams = $contentStreamPruner->pruneRemovedFromEventStream(); $unusedContentStreamsPresent = false; diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php index 82d5408ae3a..2c026c21ac6 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/CrCommandController.php @@ -48,7 +48,7 @@ public function setupCommand(string $contentRepository = 'default'): void public function replayCommand(string $projection, string $contentRepository = 'default', bool $quiet = false, int $until = 0): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepository); - $projectionService = $this->contentRepositoryRegistry->getService($contentRepositoryId, $this->projectionServiceFactory); + $projectionService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, $this->projectionServiceFactory); if (!$quiet) { $this->outputLine('Replaying events for projection "%s" of Content Repository "%s" ...', [$projection, $contentRepositoryId->value]); @@ -70,7 +70,7 @@ public function replayCommand(string $projection, string $contentRepository = 'd public function replayAllCommand(string $contentRepository = 'default', bool $quiet = false): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepository); - $projectionService = $this->contentRepositoryRegistry->getService($contentRepositoryId, $this->projectionServiceFactory); + $projectionService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, $this->projectionServiceFactory); if (!$quiet) { $this->outputLine('Replaying events for all projections of Content Repository "%s" ...', [$contentRepositoryId->value]); // TODO start progress bar @@ -90,13 +90,13 @@ public function pruneCommand(string $contentRepository = 'default'): void $contentRepositoryId = ContentRepositoryId::fromString($contentRepository); - $contentStreamPruner = $this->contentRepositoryRegistry->getService( + $contentStreamPruner = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new ContentStreamPrunerFactory() ); $contentStreamPruner->pruneAll(); - $workspaceMaintenanceService = $this->contentRepositoryRegistry->getService( + $workspaceMaintenanceService = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new WorkspaceMaintenanceServiceFactory() ); diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/MigrateEventsCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/MigrateEventsCommandController.php index 67a57abe673..9fab788c7df 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/MigrateEventsCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/MigrateEventsCommandController.php @@ -31,7 +31,7 @@ public function __construct( public function fillAffectedDimensionSpacePointsInNodePropertiesWereSetCommand(string $contentRepository = 'default'): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepository); - $eventMigrationService = $this->contentRepositoryRegistry->getService($contentRepositoryId, $this->eventMigrationServiceFactory); + $eventMigrationService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, $this->eventMigrationServiceFactory); $eventMigrationService->fillAffectedDimensionSpacePointsInNodePropertiesWereSet($this->outputLine(...)); } } diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php index 5f53a130146..f1f098219d4 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/NodeMigrationCommandController.php @@ -66,7 +66,7 @@ public function migrateCommand(string $version, $workspace = 'live', bool $force $this->quit(1); } - $nodeMigrationService = $this->contentRepositoryRegistry->getService($contentRepositoryId, new NodeMigrationServiceFactory()); + $nodeMigrationService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new NodeMigrationServiceFactory()); $nodeMigrationService->executeMigration( new ExecuteMigration( $migrationConfiguration, diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php index 9f8900bd63f..c99472ac8c2 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/StructureAdjustmentsCommandController.php @@ -32,7 +32,7 @@ final class StructureAdjustmentsCommandController extends CommandController public function detectCommand(string $nodeType = null, string $contentRepositoryIdentifier = 'default'): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepositoryIdentifier); - $structureAdjustmentService = $this->contentRepositoryRegistry->getService($contentRepositoryId, new StructureAdjustmentServiceFactory()); + $structureAdjustmentService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new StructureAdjustmentServiceFactory()); if ($nodeType !== null) { $errors = $structureAdjustmentService->findAdjustmentsForNodeType( @@ -48,7 +48,7 @@ public function detectCommand(string $nodeType = null, string $contentRepository public function fixCommand(string $nodeType = null, string $contentRepositoryIdentifier = 'default'): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepositoryIdentifier); - $structureAdjustmentService = $this->contentRepositoryRegistry->getService($contentRepositoryId, new StructureAdjustmentServiceFactory()); + $structureAdjustmentService = $this->contentRepositoryRegistry->buildService($contentRepositoryId, new StructureAdjustmentServiceFactory()); if ($nodeType !== null) { $errors = $structureAdjustmentService->findAdjustmentsForNodeType( diff --git a/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php b/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php index 96c8f82a5e5..a71011fd7a4 100644 --- a/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php +++ b/Neos.ContentRepositoryRegistry/Classes/Command/WorkspaceCommandController.php @@ -21,7 +21,7 @@ class WorkspaceCommandController extends CommandController public function rebaseOutdatedCommand(string $contentRepositoryIdentifier = 'default'): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepositoryIdentifier); - $workspaceMaintenanceService = $this->contentRepositoryRegistry->getService( + $workspaceMaintenanceService = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new WorkspaceMaintenanceServiceFactory() ); diff --git a/Neos.Neos/Classes/AssetUsage/Command/AssetUsageCommandController.php b/Neos.Neos/Classes/AssetUsage/Command/AssetUsageCommandController.php index 84fcba3ff67..56d87b93907 100644 --- a/Neos.Neos/Classes/AssetUsage/Command/AssetUsageCommandController.php +++ b/Neos.Neos/Classes/AssetUsage/Command/AssetUsageCommandController.php @@ -34,7 +34,7 @@ public function __construct( public function syncCommand(string $contentRepository = 'default', bool $quiet = false): void { $contentRepositoryId = ContentRepositoryId::fromString($contentRepository); - $assetUsageSyncService = $this->contentRepositoryRegistry->getService( + $assetUsageSyncService = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new AssetUsageSyncServiceFactory( $this->assetRepository, diff --git a/Neos.Neos/Classes/Command/CrCommandController.php b/Neos.Neos/Classes/Command/CrCommandController.php index 4076b574a10..0a1a5e194fe 100644 --- a/Neos.Neos/Classes/Command/CrCommandController.php +++ b/Neos.Neos/Classes/Command/CrCommandController.php @@ -59,7 +59,7 @@ public function exportCommand(string $path, string $contentRepository = 'default Files::createDirectoryRecursively($path); $filesystem = new Filesystem(new LocalFilesystemAdapter($path)); - $exportService = $this->contentRepositoryRegistry->getService( + $exportService = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new ExportServiceFactory( $filesystem, @@ -88,7 +88,7 @@ public function importCommand(string $path, string $contentRepository = 'default $contentRepositoryId = ContentRepositoryId::fromString($contentRepository); $contentStreamIdentifier = ContentStreamId::create(); - $importService = $this->contentRepositoryRegistry->getService( + $importService = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new ImportServiceFactory( $filesystem, diff --git a/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php b/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php index d6d220440bf..2a95988f511 100644 --- a/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php +++ b/Neos.Neos/Classes/Controller/Module/Administration/DimensionController.php @@ -31,7 +31,7 @@ public function indexAction(string $type = 'intraDimension', string $dimensionSp { $contentRepositoryId = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) ->contentRepositoryId; - $dimensionControllerInternals = $this->contentRepositoryRegistry->getService( + $dimensionControllerInternals = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new DimensionControllerInternalsFactory() ); diff --git a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php index 001d70cd1bc..f31234019a7 100644 --- a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php +++ b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php @@ -168,7 +168,7 @@ public function showAction(WorkspaceName $workspace): void $contentRepositoryId = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - $workspacesControllerInternals = $this->contentRepositoryRegistry->getService( + $workspacesControllerInternals = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new WorkspacesControllerInternalsFactory() ); diff --git a/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php b/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php index 903e4572317..9ce125d9998 100644 --- a/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php +++ b/Neos.Neos/Classes/Controller/Service/ContentDimensionsController.php @@ -59,7 +59,7 @@ public function indexAction() { $contentRepositoryId = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) ->contentRepositoryId; - $controllerInternals = $this->contentRepositoryRegistry->getService( + $controllerInternals = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new ContentDimensionsControllerInternalsFactory() ); diff --git a/Neos.Neos/Classes/Domain/Service/SiteService.php b/Neos.Neos/Classes/Domain/Service/SiteService.php index 0b53b555cd9..0331b8be881 100644 --- a/Neos.Neos/Classes/Domain/Service/SiteService.php +++ b/Neos.Neos/Classes/Domain/Service/SiteService.php @@ -76,7 +76,7 @@ class SiteService */ public function pruneSite(Site $site): void { - $siteServiceInternals = $this->contentRepositoryRegistry->getService( + $siteServiceInternals = $this->contentRepositoryRegistry->buildService( $site->getConfiguration()->contentRepositoryId, new SiteServiceInternalsFactory() ); @@ -173,7 +173,7 @@ public function createSite( $site->setName($siteName); $this->siteRepository->add($site); - $siteServiceInternals = $this->contentRepositoryRegistry->getService( + $siteServiceInternals = $this->contentRepositoryRegistry->buildService( $site->getConfiguration()->contentRepositoryId, new SiteServiceInternalsFactory() ); diff --git a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php index 89dc4a75288..50871a64ebd 100644 --- a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php @@ -49,7 +49,7 @@ protected function buildItems(): array $contentRepositoryId, ); - $dimensionMenuItemsImplementationInternals = $this->contentRepositoryRegistry->getService( + $dimensionMenuItemsImplementationInternals = $this->contentRepositoryRegistry->buildService( $contentRepositoryId, new DimensionsMenuItemsImplementationInternalsFactory() ); diff --git a/Neos.Neos/Classes/View/FusionExceptionView.php b/Neos.Neos/Classes/View/FusionExceptionView.php index 234fa553faa..07dfb1e7a70 100644 --- a/Neos.Neos/Classes/View/FusionExceptionView.php +++ b/Neos.Neos/Classes/View/FusionExceptionView.php @@ -94,7 +94,7 @@ public function render() $siteDetectionResult = SiteDetectionResult::fromRequest($httpRequest); $contentRepository = $this->contentRepositoryRegistry->get($siteDetectionResult->contentRepositoryId); - $fusionExceptionViewInternals = $this->contentRepositoryRegistry->getService( + $fusionExceptionViewInternals = $this->contentRepositoryRegistry->buildService( $siteDetectionResult->contentRepositoryId, new FusionExceptionViewInternalsFactory() ); diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php index c740bb135cf..37488230e9a 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -156,7 +156,7 @@ protected function initCleanContentRepository(array $adapterKeys): void $this->contentRepository->setUp(); self::$wasContentRepositorySetupCalled = true; } - $this->contentRepositoryInternals = $this->contentRepositoryRegistry->getService( + $this->contentRepositoryInternals = $this->contentRepositoryRegistry->buildService( $this->contentRepositoryId, new ContentRepositoryInternalsFactory() ); @@ -178,7 +178,7 @@ protected function getContentRepositoryService( $contentRepositoryRegistry = $this->contentRepositoryRegistry ?: $this->objectManager->get(ContentRepositoryRegistry::class); - return $contentRepositoryRegistry->getService( + return $contentRepositoryRegistry->buildService( $contentRepositoryId, $factory );