diff --git a/dist/index.js b/dist/index.js index 038bb4a5..c0ca3f72 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2715,7 +2715,7 @@ exports.fetch = fetch; * @param version */ async function parseVersion(version) { - const manifest = 'https://dl.bintray.com/shivammathur/php/php-versions.json'; + const manifest = 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json'; switch (true) { case /^(latest|\d+\.x)$/.test(version): return JSON.parse(await fetch(manifest))[version]; diff --git a/src/scripts/common.sh b/src/scripts/common.sh index e8a66db2..47bcb0a3 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -78,7 +78,7 @@ run_script() { repo=$1 shift args=("$@") - get -q -e /tmp/install.sh "$bintray/php/$repo.sh" "$github/$repo/$latest/install.sh" + get -q -e /tmp/install.sh "$github/$repo/$latest/install.sh" "$bintray/php/$repo.sh" bash /tmp/install.sh "${args[@]}" } diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 639d06fb..91d15d54 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -340,7 +340,8 @@ $composer_json = "$env:APPDATA\Composer\composer.json" $composer_lock = "$env:APPDATA\Composer\composer.lock" $current_profile = "$env:TEMP\setup-php.ps1" $ProgressPreference = 'SilentlyContinue' -$nightly_version = '8.[0-9]' +$jit_versions = '8.[0-9]' +$nightly_versions = '8.[1-9]' $cert_source='CurrentUser' $enable_extensions = ('openssl', 'curl', 'mbstring') @@ -399,14 +400,17 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" >$null 2>&1 } try { - if ($version -match $nightly_version) { - Invoke-WebRequest -Uri $bintray/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1 - & $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1 + if ($version -match $nightly_versions) { + Invoke-WebRequest -UseBasicParsing -Uri https://github.com/shivammathur/php-builder-windows/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1 + & $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir > $null 2>&1 } else { Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1 } } catch { } } else { + if($version -match $jit_versions) { + ('opcache.enable=1', 'opcache.jit_buffer_size=256M', 'opcache.jit=1235') | ForEach-Object { $p=$_.split('='); Set-PhpIniKey -Key $p[0] -Value $p[1] -Path $php_dir } + } if($env:update -eq 'true') { Update-Php $php_dir >$null 2>&1 $status = "Updated to" diff --git a/src/utils.ts b/src/utils.ts index 5ab025bb..ad68bf7b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -67,7 +67,8 @@ export async function fetch(url: string): Promise { * @param version */ export async function parseVersion(version: string): Promise { - const manifest = 'https://dl.bintray.com/shivammathur/php/php-versions.json'; + const manifest = + 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json'; switch (true) { case /^(latest|\d+\.x)$/.test(version): return JSON.parse(await fetch(manifest))[version];