Skip to content

Commit 5bfc2a7

Browse files
committed
wip
1 parent d4a7fb1 commit 5bfc2a7

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/core/src/Commands/DiscoveryGenerateCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public function __invoke(): void
5757
($this->generateDiscoveryCache)(
5858
container: $kernel->container,
5959
config: $this->discoveryConfig,
60-
cache: $this->discoveryCache,
61-
strategy: $strategy,
60+
cache: $this->discoveryCache->withStrategy($strategy),
6261
);
6362
},
6463
);

packages/discovery/src/GenerateDiscoveryCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public function __invoke(
1010
ContainerInterface $container,
1111
DiscoveryConfig $config,
1212
DiscoveryCache $cache,
13-
DiscoveryCacheStrategy $strategy,
1413
): void {
14+
$originalStrategy = $cache->strategy;
1515
$cache = $cache->withStrategy(DiscoveryCacheStrategy::NONE);
1616

1717
$bootDiscovery = new BootDiscovery(
@@ -26,6 +26,6 @@ public function __invoke(
2626
$cache->store($location, $discoveries);
2727
}
2828

29-
$cache->storeStrategy($strategy);
29+
$cache->storeStrategy($originalStrategy);
3030
}
3131
}

0 commit comments

Comments
 (0)