Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd30a08

Browse files
bug #49046 Fix for Windows when projects are deployed on junctions/symlinks (nerdgod)
This PR was submitted for the 6.0 branch but it was merged into the 5.4 branch instead. Discussion ---------- Fix for Windows when projects are deployed on junctions/symlinks | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #49041 | License | MIT | Doc PR | none On windows systems where a project directory may be located at a directory that is a junction to a path on another drive, realpath() must be called on both sides of a call to `Filesystem::makePathRelative($path1,$path2)`. Otherwise the result will be an irresolvable comparison across filesystems and the return value will be the value of $path1, not a relative path. Commits ------- 6bbc46c Update ComposerPlugin.php
2 parents 3bd051f + 6bbc46c commit dd30a08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Runtime/Internal/ComposerPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function uninstall(Composer $composer, IOInterface $io): void
5858

5959
public function updateAutoloadFile(): void
6060
{
61-
$vendorDir = $this->composer->getConfig()->get('vendor-dir');
61+
$vendorDir = realpath($this->composer->getConfig()->get('vendor-dir'));
6262

6363
if (!is_file($autoloadFile = $vendorDir.'/autoload.php')
6464
|| false === $extra = $this->composer->getPackage()->getExtra()['runtime'] ?? []

0 commit comments

Comments
 (0)