refactor download

This commit is contained in:
crazywhalecc
2023-04-30 12:42:19 +08:00
parent 117cd93e8f
commit 0bed76da11
30 changed files with 901 additions and 673 deletions

View File

@@ -6,7 +6,6 @@ namespace SPC\store\source;
use JetBrains\PhpStorm\ArrayShape;
use SPC\exception\DownloaderException;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\store\Downloader;
@@ -16,13 +15,12 @@ class PhpSource extends CustomSourceBase
/**
* @throws DownloaderException
* @throws FileSystemException
* @throws RuntimeException
*/
public function fetch()
{
$major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.1';
Downloader::fetchSource('php-src', self::getLatestPHPInfo($major));
Downloader::downloadSource('php-src', self::getLatestPHPInfo($major));
}
/**