Skip to content

Commit

Permalink
Merge pull request composer#9532 from mvorisek/patch-2
Browse files Browse the repository at this point in the history
Fix for PHP 8.0 when symlink function is disabled
  • Loading branch information
Seldaek authored Dec 2, 2020
2 parents 0da9e21 + b4cb2f7 commit adf7beb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Composer/Util/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@ private function unlinkImplementation($path)
*/
public function relativeSymlink($target, $link)
{
if (!function_exists('symlink')) {
return false;
}

$cwd = getcwd();

$relativePath = $this->findShortestPath($link, $target);
Expand Down

0 comments on commit adf7beb

Please sign in to comment.