Skip to content

Commit b9adf08

Browse files
authored
fix: pin log dependency (#685)
1 parent b6628c1 commit b9adf08

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bin/install-dependencies-without-composer

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$vendorDir = str_replace(" ", "\\ ", dirname(__DIR__)).'/vendor';
1010
$dependencies = array(
1111
'psr/http-message' => 'https://github.com/php-fig/http-message/archive/master.zip',
12-
'psr/log' => 'https://github.com/php-fig/log/archive/master.zip',
12+
'psr/log' => 'https://github.com/php-fig/log/archive/refs/tags/1.1.4.zip',
1313
'psr/simple-cache' => 'https://github.com/php-fig/simple-cache/archive/master.zip',
1414
);
1515

@@ -30,7 +30,9 @@ foreach ($dependencies as $name => $zipUrl) {
3030
passthru('mkdir -p '.$dest);
3131

3232
downloadZipFile($zipUrl, $tmpZip);
33-
extractZipFile($tmpZip, $dest);
33+
34+
$zipBaseName = rtrim(basename($zipUrl), '.zip');
35+
extractZipFile($tmpZip, $dest, $zipBaseName);
3436
}
3537

3638
passthru('rm -rf '.$tmpZip);
@@ -63,8 +65,8 @@ function downloadZipFile($url, $destinationFilePath) {
6365
}
6466
}
6567

66-
function extractZipFile($zipFileName, $destinationFolderPath) {
67-
$folderName = basename($destinationFolderPath).'-master';
68+
function extractZipFile($zipFileName, $destinationFolderPath, $zipBasename = 'master') {
69+
$folderName = basename($destinationFolderPath).'-'.$zipBasename;
6870
$tmpFolder = dirname($zipFileName);
6971
$zip = new ZipArchive;
7072
$opened = $zip->open($zipFileName);

0 commit comments

Comments
 (0)