Skip to content

Commit 76b7a7e

Browse files
bug symfony#58113 [DependencyInjection] Fix bug on windows, memory exhausted on cache clear, impossible to install new project (eltharin)
This PR was merged into the 7.2 branch. Discussion ---------- [DependencyInjection] Fix bug on windows, memory exhausted on cache clear, impossible to install new project | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix | License | MIT Since symfony#57948 on windows, I can't make a cache clear with a fatal error form memory exhausted or install a new symfony app. Xdebug saw an infinite loop. Correction with DIRECTORY_SEPARATOR constant instead / Commits ------- 89b4c87 bug correction
2 parents 0b1ce3d + 89b4c87 commit 76b7a7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,9 +1752,9 @@ private function inVendors(string $path): bool
17521752

17531753
foreach ($this->vendors as $vendor) {
17541754
if (\in_array($path[\strlen($vendor)] ?? '', ['/', \DIRECTORY_SEPARATOR], true) && str_starts_with($path, $vendor)) {
1755-
$this->pathsInVendor[$vendor.'/composer'] = false;
1756-
$this->addResource(new FileResource($vendor.'/composer/installed.json'));
1757-
$this->pathsInVendor[$vendor.'/composer'] = true;
1755+
$this->pathsInVendor[$vendor.\DIRECTORY_SEPARATOR.'composer'] = false;
1756+
$this->addResource(new FileResource($vendor.\DIRECTORY_SEPARATOR.'composer'.\DIRECTORY_SEPARATOR.'installed.json'));
1757+
$this->pathsInVendor[$vendor.\DIRECTORY_SEPARATOR.'composer'] = true;
17581758

17591759
return $this->pathsInVendor[$path] = true;
17601760
}

0 commit comments

Comments
 (0)