From e7121300621ac6846f2acd58aadaf6a4b9158e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 30 Nov 2020 00:59:42 +0100 Subject: [PATCH] Fix for php8 when symlink function is disabled --- src/Composer/Util/Filesystem.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index b940ced48..d18c3b387 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -601,7 +601,12 @@ class Filesystem $relativePath = $this->findShortestPath($link, $target); chdir(\dirname($link)); - $result = @symlink($relativePath, $link); + + if (function_exists('symlink')) { + $result = @symlink($relativePath, $link); + } else { + $result = false; + } chdir($cwd);