Skip to content

Commit 7413725

Browse files
Fixed bug that class_map does not works in Hyperf\Di\Annotation\Scanner. (#3625)
Co-authored-by: 李铭昕 <[email protected]>
1 parent fc1a8dd commit 7413725

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ClassLoader.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ public function __construct(ComposerClassLoader $classLoader, string $proxyFileD
4545
}
4646

4747
// Scan by ScanConfig to generate the reflection class map
48-
$scanner = new Scanner($this, $config = ScanConfig::instance($configDir));
48+
$config = ScanConfig::instance($configDir);
4949
$classLoader->addClassMap($config->getClassMap());
50+
$scanner = new Scanner($this, $config);
5051
$reflectionClassMap = $scanner->scan();
5152
// Get the class map of Composer loader
5253
$composerLoaderClassMap = $this->getComposerClassLoader()->getClassMap();

0 commit comments

Comments
 (0)