fix: because the cached discoveryState does not use ->setDiscoveryState(), it is found that the discoveryState cannot be used (#120)
Co-authored-by: X2NX <x2nx@qq.com>
This commit is contained in:
parent
f1b471a219
commit
42b5261612
1 changed files with 90 additions and 121 deletions
|
|
@ -38,12 +38,14 @@ final class DiscoveryLoader implements LoaderInterface
|
|||
public function load(ReferenceRegistryInterface $registry): void
|
||||
{
|
||||
// This now encapsulates the discovery process
|
||||
$discoverer = new Discoverer($registry, $this->logger);
|
||||
$discoverer = new Discoverer($this->logger);
|
||||
|
||||
$cachedDiscoverer = $this->cache
|
||||
? new CachedDiscoverer($discoverer, $this->cache, $this->logger)
|
||||
: $discoverer;
|
||||
|
||||
$cachedDiscoverer->discover($this->basePath, $this->scanDirs, $this->excludeDirs);
|
||||
$discoveryState = $cachedDiscoverer->discover($this->basePath, $this->scanDirs, $this->excludeDirs);
|
||||
|
||||
$registry->setDiscoveryState($discoveryState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue