[php-src] PHP-8.6: Merge branch 'PHP-8.3' into PHP-8.4
| From: | Shivam Mathur | Date: | Wed, 04 Nov 2026 07:21:24 +0000 |
| Subject: | [php-src] PHP-8.6: Merge branch 'PHP-8.3' into PHP-8.4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143312@lists.php.net to get a copy of this message | ||
Author: Shivam Mathur (shivammathur)
Date: 2026-11-04T12:49:47+05:30
Commit: https://github.com/php/php-src/commit/99a3f5205095d1cab0c9b20f48d42a10d4e02f63
Raw diff: https://github.com/php/php-src/commit/99a3f5205095d1cab0c9b20f48d42a10d4e02f63.diff
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
Reduce flaky SQL Server setup failures in Windows CI (#25183)
Changed paths:
A .github/scripts/windows/setup-mssql.ps1
M .github/actions/setup-windows/action.yml
Diff:
diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml
index a5fa4cdddcb1..0b1946caefe9 100644
--- a/.github/actions/setup-windows/action.yml
+++ b/.github/actions/setup-windows/action.yml
@@ -11,8 +11,7 @@ runs:
mysql --port=3306 --user=root --password="" -e "ALTER USER
'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH
PRIVILEGES;"
- name: Setup MSSQL
shell: pwsh
- run: |
- choco install sql-server-express -y --no-progress
--install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!"
+ run: .github/scripts/windows/setup-mssql.ps1
- name: Setup PostgreSQL
shell: pwsh
run: |
diff --git a/.github/scripts/windows/setup-mssql.ps1 b/.github/scripts/windows/setup-mssql.ps1
new file mode 100644
index 000000000000..73dd52e968cb
--- /dev/null
+++ b/.github/scripts/windows/setup-mssql.ps1
@@ -0,0 +1,38 @@
+# https://learn.microsoft.com/en-us/troubleshoot/sql/azure-sql/sql-installation-fails-sector-size-error-azure-vm
+$ErrorActionPreference = 'Stop'
+
+$compatibleDrives = foreach ($driveLetter in 'C', 'D') {
+ if (!(Test-Path "${driveLetter}:\")) {
+ continue
+ }
+ try {
+ $disk = Get-Partition -DriveLetter $driveLetter | Get-Disk
+ } catch {
+ Write-Warning "Cannot determine the sector size of ${driveLetter}: $_"
+ continue
+ }
+ if ($disk.PhysicalSectorSize -in @(512, 4096)) {
+ $driveLetter
+ }
+}
+$driveLetter = $compatibleDrives | Select-Object -First 1
+if (!$driveLetter) {
+ throw 'Neither C: nor D: has a SQL Server-compatible physical sector size (512 or 4096
bytes).'
+}
+$installDir = "${driveLetter}:\SQLServer"
+Write-Host "Installing SQL Server in $installDir"
+
+$delay = 3
+for ($attempt = 1; $attempt -le 3; $attempt++) {
+ choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL
/SAPWD=Password12! /INSTANCEDIR=$installDir /INSTALLSQLDATADIR=$installDir"
+ $exitCode = $LASTEXITCODE
+ if ($exitCode -eq 0) {
+ exit 0
+ }
+ if ($exitCode -notin @(-1, 1, 404) -or (Test-Path $installDir) -or $attempt -eq 3) {
+ exit $exitCode
+ }
+ Write-Host "Retrying SQL Server setup in $delay seconds..."
+ Start-Sleep -Seconds $delay
+ $delay *= 2
+}