Skip to content

Commit fa18c2b

Browse files
committed
Remove bintray from manifest and win32.ps1
Fix JIT ini values in win32.ps1
1 parent 399ab79 commit fa18c2b

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,7 @@ exports.fetch = fetch;
27152715
* @param version
27162716
*/
27172717
async function parseVersion(version) {
2718-
const manifest = 'https://dl.bintray.com/shivammathur/php/php-versions.json';
2718+
const manifest = 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json';
27192719
switch (true) {
27202720
case /^(latest|\d+\.x)$/.test(version):
27212721
return JSON.parse(await fetch(manifest))[version];

src/scripts/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run_script() {
7878
repo=$1
7979
shift
8080
args=("$@")
81-
get -q -e /tmp/install.sh "$bintray/php/$repo.sh" "$github/$repo/$latest/install.sh"
81+
get -q -e /tmp/install.sh "$github/$repo/$latest/install.sh" "$bintray/php/$repo.sh"
8282
bash /tmp/install.sh "${args[@]}"
8383
}
8484

src/scripts/win32.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ $composer_json = "$env:APPDATA\Composer\composer.json"
340340
$composer_lock = "$env:APPDATA\Composer\composer.lock"
341341
$current_profile = "$env:TEMP\setup-php.ps1"
342342
$ProgressPreference = 'SilentlyContinue'
343-
$nightly_version = '8.[0-9]'
343+
$jit_versions = '8.[0-9]'
344+
$nightly_versions = '8.[1-9]'
344345
$cert_source='CurrentUser'
345346
$enable_extensions = ('openssl', 'curl', 'mbstring')
346347

@@ -399,14 +400,17 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
399400
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" >$null 2>&1
400401
}
401402
try {
402-
if ($version -match $nightly_version) {
403-
Invoke-WebRequest -Uri $bintray/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
404-
& $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
403+
if ($version -match $nightly_versions) {
404+
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
405+
& $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir > $null 2>&1
405406
} else {
406407
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
407408
}
408409
} catch { }
409410
} else {
411+
if($version -match $jit_versions) {
412+
('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 }
413+
}
410414
if($env:update -eq 'true') {
411415
Update-Php $php_dir >$null 2>&1
412416
$status = "Updated to"

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export async function fetch(url: string): Promise<string> {
6767
* @param version
6868
*/
6969
export async function parseVersion(version: string): Promise<string> {
70-
const manifest = 'https://dl.bintray.com/shivammathur/php/php-versions.json';
70+
const manifest =
71+
'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json';
7172
switch (true) {
7273
case /^(latest|\d+\.x)$/.test(version):
7374
return JSON.parse(await fetch(manifest))[version];

0 commit comments

Comments
 (0)