Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit ad6e25a

Browse files
authored
added gc_mem_caches to ClassFinder
1 parent 4deb717 commit ad6e25a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Discovery/ClassFinder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public static function find(string $directory): array
2222
foreach ($finder as $file) {
2323
$realPath = $file->getRealPath();
2424
$class = self::findClassOrTraitOrInterface($realPath);
25+
26+
// PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098
27+
\gc_mem_caches();
2528

2629
if ($class === null) {
2730
continue;

0 commit comments

Comments
 (0)