Skip to content

Commit 730faa9

Browse files
committed
Sanitize namespace name for cache key
1 parent 513afa1 commit 730faa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Glob/GlobClassExplorer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(string $namespace, CacheInterface $cache, ?int $cach
5656
*/
5757
public function getClasses(): array
5858
{
59-
$key = 'globClassExplorer_'.$this->namespace;
59+
$key = 'globClassExplorer_'.str_replace('\\', '_', $this->namespace);
6060
$classes = $this->cache->get($key);
6161
if ($classes === null) {
6262
$classes = $this->doGetClasses();

0 commit comments

Comments
 (0)