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
3638passthru ('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