private function relativeSymlinkWithFallback(string $originDir, string $targetDir): string
    {
        try {
            $this->symlink($originDir, $targetDir, true);
            $method = self::METHOD_RELATIVE_SYMLINK;
        } catch (IOException $e) {
            $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir);
        }

        return $method;
    }
private function relativeSymlinkWithFallback(string $originDir, string $targetDir): string
    {
        try {
            $this->symlink($originDir, $targetDir, true);
            $method = self::METHOD_RELATIVE_SYMLINK;
        } catch (IOException $e) {
            $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir);
        }

        return $method;
    }
private function relativeSymlinkWithFallback ( string $ originDir , string $ targetDir ) : string { try { $ this -> symlink ( $ originDir , $ targetDir , true ) ; $ method = self :: METHOD_RELATIVE_SYMLINK ; } catch ( IOException $ e ) { $ method = $ this -> absoluteSymlinkWithFallback ( $ originDir , $ targetDir ) ; } return $ method ; }
Try to create relative symlink.

Falling back to absolute symlink and finally hard copy.
Try to create relative symlink .