ReviewOS

also looking at this

pantry-pm/pantry

chore(deps): update all non-major dependencies

#185
Closed chrisbbreuer wants to merge buddy-bot/update-non-major-updates-1757488178247 into main
10 files +301 -78
.github/workflows/precompile-php.ymlmodified+281-58
Changes to .github/workflows/precompile-php.yml
@@ -9,13 +9,13 @@ on:
99 workflow_dispatch:
1010 inputs:
1111 php_version:
12 description: 'PHP version to build (leave empty for auto-detection)'
12 description: PHP version to build (leave empty for auto-detection)
1313 required: false
1414 type: string
1515 php_config:
16 description: 'PHP build configuration'
16 description: PHP build configuration
1717 required: true
18 default: 'laravel-mysql'
18 default: laravel-mysql
1919 type: choice
2020 options:
2121 - laravel-mysql
@@ -26,7 +26,7 @@ on:
2626 - wordpress
2727 - full-stack
2828 force_rebuild:
29 description: 'Force rebuild even if no updates'
29 description: Force rebuild even if no updates
3030 required: false
3131 default: false
3232 type: boolean
@@ -117,19 +117,23 @@ jobs:
117117 - full-stack
118118 os:
119119 - ubuntu-latest
120 - macos-13
121 - macos-latest
120 - macos-14
121 - macos-15
122 - macos-15-intel
122123 - windows-latest
123124 include:
124125 - os: ubuntu-latest
125126 platform: linux
126127 arch: x86_64
127 - os: macos-13
128 - os: macos-14
128129 platform: darwin
129130 arch: x86_64
130 - os: macos-latest
131 - os: macos-15
131132 platform: darwin
132133 arch: arm64
134 - os: macos-15-intel
135 platform: darwin
136 arch: x86_64
133137 - os: windows-latest
134138 platform: win32
135139 arch: x86_64
@@ -165,11 +169,87 @@ jobs:
165169 - name: Install build dependencies (macOS)
166170 if: matrix.platform == 'darwin'
167171 run: |
168 # Fallback to Homebrew for reliable CI builds
169 brew install autoconf automake libtool pkg-config bison re2c libxml2 openssl curl libpng jpeg freetype oniguruma libzip postgresql readline bzip2 gmp openldap libxslt icu4c libsodium zlib gettext
170 # Set up environment for Homebrew tools
171 echo "/opt/homebrew/bin:/usr/local/bin:$PATH" >> $GITHUB_PATH
172 echo "PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
172 # macOS: Let Launchpad handle all dependencies
173 echo "📦 macOS build will use Launchpad for all dependencies"
174 echo "🚀 Installing PHP dependencies via Launchpad first..."
175
176 # Pre-install dependencies to ensure they're available
177 echo "🔧 Pre-installing dependencies via Launchpad..."
178 bun run launchpad install php --deps-only
179
180 # Wait for dependencies to be fully installed
181 echo "⏳ Waiting for dependency installation to complete..."
182 sleep 10
183
184 # Debug: Check what was actually installed
185 echo "🔍 Checking installed dependencies..."
186 echo "📁 .local directory structure (first level):"
187 find "$HOME/.local" -maxdepth 2 -type d | sort | head -20
188
189 echo "🔍 Looking for pkg-config specifically..."
190 find "$HOME/.local" -name "*pkg*" -type f 2>/dev/null | head -10 || echo "No pkg-related files found"
191
192 echo "🔍 Looking for freedesktop.org directory..."
193 find "$HOME/.local" -path "*freedesktop*" -type d 2>/dev/null | head -5 || echo "No freedesktop.org directories found"
194
195 # Debug: Check if pkg-config is available
196 echo "🔍 Checking for pkg-config..."
197 if command -v pkg-config >/dev/null 2>&1; then
198 echo "✅ pkg-config found: $(which pkg-config)"
199 echo "📋 pkg-config version: $(pkg-config --version)"
200 else
201 echo "❌ pkg-config not found in PATH"
202 echo "🔍 Searching for pkg-config in .local..."
203 find "$HOME/.local" -name "pkg-config" -type f 2>/dev/null || echo "No pkg-config found in .local"
204 fi
205
206 # Debug: Check if ICU libraries are available
207 echo "🔍 Checking for ICU libraries..."
208 if [ -d "$HOME/.local/unicode.org" ]; then
209 echo "✅ ICU libraries found at: $HOME/.local/unicode.org"
210 ls -la "$HOME/.local/unicode.org/"
211 if [ -f "$HOME/.local/unicode.org"/*/lib/pkgconfig/icu-uc.pc ]; then
212 echo "✅ ICU pkgconfig files found"
213 find "$HOME/.local/unicode.org" -name "*.pc" -type f | head -5
214 else
215 echo "❌ ICU pkgconfig files not found"
216 fi
217 else
218 echo "❌ ICU libraries not found"
219 fi
220
221 # Debug: Check libxml2 libraries
222 echo "🔍 Checking for libxml2 libraries..."
223 if [ -d "$HOME/.local/gnome.org/libxml2" ]; then
224 echo "✅ libxml2 libraries found at: $HOME/.local/gnome.org/libxml2"
225 ls -la "$HOME/.local/gnome.org/libxml2/"
226 if [ -f "$HOME/.local/gnome.org/libxml2"/*/lib/pkgconfig/libxml-2.0.pc ]; then
227 echo "✅ libxml2 pkgconfig files found"
228 find "$HOME/.local/gnome.org/libxml2" -name "libxml-2.0.pc" -type f
229 else
230 echo "❌ libxml2 pkgconfig files not found"
231 fi
232 else
233 echo "❌ libxml2 libraries not found"
234 fi
235
236 # Debug: Check PATH and PKG_CONFIG_PATH
237 echo "🔍 Environment check:"
238 echo "PATH includes unicode.org: $(echo $PATH | grep -o unicode.org || echo 'NO')"
239 echo "PATH includes freedesktop.org: $(echo $PATH | grep -o freedesktop.org || echo 'NO')"
240 echo "PKG_CONFIG_PATH: ${PKG_CONFIG_PATH:-'NOT SET'}"
241
242 # Debug: Check if Launchpad environment script exists
243 echo "🔍 Checking for Launchpad environment..."
244 if [ -f "$HOME/.local/launchpad.sh" ]; then
245 echo "✅ Launchpad environment script found"
246 echo "📋 Sourcing environment to check paths..."
247 source "$HOME/.local/launchpad.sh"
248 echo "PATH after sourcing: ${PATH:0:200}..."
249 echo "PKG_CONFIG_PATH after sourcing: ${PKG_CONFIG_PATH:-'NOT SET'}"
250 else
251 echo "❌ Launchpad environment script not found"
252 fi
173253
174254 - name: Install build dependencies (Windows)
175255 if: matrix.platform == 'win32'
@@ -181,7 +261,66 @@ jobs:
181261 # Install additional dependencies needed for PHP extensions
182262 echo "Windows build dependencies installed for PHP compilation"
183263
264 - name: Setup Launchpad Environment (macOS)
265 if: matrix.platform == 'darwin'
266 shell: bash
267 run: |
268 # Find and setup Launchpad environment variables
269 echo "🔧 Setting up Launchpad environment for macOS build..."
270
271 # Store original PATH to preserve system tools
272 echo "ORIGINAL_PATH=$PATH" >> $GITHUB_ENV
273
274 # Find all Launchpad binary directories that should be added to PATH
275 LAUNCHPAD_PATHS=""
276
277 # Find pkg-config binary - search broadly first
278 echo "🔍 Searching for pkg-config binary..."
279 PKG_CONFIG_BINARY=$(find "$HOME/.local" -name "pkg-config" -type f 2>/dev/null | head -1)
280 if [ -n "$PKG_CONFIG_BINARY" ]; then
281 PKG_CONFIG_DIR=$(dirname "$PKG_CONFIG_BINARY")
282 echo "✅ Found pkg-config at: $PKG_CONFIG_DIR"
283 LAUNCHPAD_PATHS="$PKG_CONFIG_DIR"
284 else
285 echo "❌ pkg-config binary not found in .local"
286 echo "🔍 Checking if pkg-config exists in system PATH..."
287 if command -v pkg-config >/dev/null 2>&1; then
288 echo "✅ pkg-config found in system PATH: $(which pkg-config)"
289 else
290 echo "❌ pkg-config not found anywhere"
291 fi
292 fi
293
294 # Find other essential Launchpad tools that might override system tools
295 # We'll be more selective to avoid overriding system tools
296 SED_BINARY=$(find "$HOME/.local" -path "*/gnu.org/sed/*/bin/sed" -type f 2>/dev/null | head -1)
297 if [ -n "$SED_BINARY" ]; then
298 SED_DIR=$(dirname "$SED_BINARY")
299 echo "✅ Found sed at: $SED_DIR"
300 # Only add sed if we have other tools too, to avoid conflicts
301 if [ -n "$LAUNCHPAD_PATHS" ]; then
302 LAUNCHPAD_PATHS="$LAUNCHPAD_PATHS:$SED_DIR"
303 fi
304 fi
305
306 # Set the combined Launchpad paths (these will be prepended to PATH later)
307 if [ -n "$LAUNCHPAD_PATHS" ]; then
308 echo "LAUNCHPAD_BINARY_PATHS=$LAUNCHPAD_PATHS" >> $GITHUB_ENV
309 echo "✅ Launchpad binary paths: $LAUNCHPAD_PATHS"
310 else
311 echo "LAUNCHPAD_BINARY_PATHS=" >> $GITHUB_ENV
312 echo "❌ No Launchpad binary paths found - PATH will not be modified"
313 fi
314
315 # Setup comprehensive PKG_CONFIG_PATH
316 PKG_PATHS=$(find "$HOME/.local" -name "pkgconfig" -type d 2>/dev/null | tr '\n' ':')
317 if [ -n "$PKG_PATHS" ]; then
318 echo "LAUNCHPAD_PKG_CONFIG_PATH=$PKG_PATHS" >> $GITHUB_ENV
319 echo "✅ PKG_CONFIG_PATH setup with $(echo "$PKG_PATHS" | tr ':' '\n' | wc -l) directories"
320 fi
321
184322 - name: Build PHP
323 shell: bash
185324 env:
186325 PHP_VERSION: ${{ matrix.php_version }}
187326 PHP_CONFIG: ${{ matrix.config }}
@@ -189,16 +328,83 @@ jobs:
189328 TARGET_ARCH: ${{ matrix.arch }}
190329 BUILD_DIR: ${{ github.workspace }}/build
191330 OUTPUT_DIR: ${{ github.workspace }}/binaries
192 run: bun run scripts/build-php.ts
331 # Environment for all platforms - will handle PATH logic in shell script
332 PKG_CONFIG_PATH: ${{ matrix.platform == 'darwin' && env.LAUNCHPAD_PKG_CONFIG_PATH || env.PKG_CONFIG_PATH }}
333 run: |
334 # Setup PATH for macOS with Launchpad tools
335 if [ "$" = "darwin" ]; then
336 echo "🔧 Setting up macOS environment..."
337
338 # Preserve original PATH
339 ORIGINAL_PATH="$PATH"
340 echo "✅ Original PATH: ${ORIGINAL_PATH:0:100}..."
341
342 # Add Launchpad binary paths to PATH if they exist
343 if [ -n "${LAUNCHPAD_BINARY_PATHS:-}" ] && [ "${LAUNCHPAD_BINARY_PATHS}" != "NOT SET" ]; then
344 export PATH="$LAUNCHPAD_BINARY_PATHS:$ORIGINAL_PATH"
345 echo "✅ Updated PATH with Launchpad binaries: ${LAUNCHPAD_BINARY_PATHS}"
346 else
347 echo "❌ No Launchpad binary paths found - using original PATH"
348 fi
349
350 echo "✅ Final PATH: ${PATH:0:100}..."
351 echo "✅ PKG_CONFIG_PATH: ${PKG_CONFIG_PATH:-'NOT SET'}"
352
353 # Verify essential system tools are available
354 echo "🔧 Checking essential system tools..."
355 for tool in curl tar gzip grep tr find wc head; do
356 if command -v $tool >/dev/null 2>&1; then
357 echo "✅ $tool: $(which $tool)"
358 else
359 echo "❌ $tool: NOT FOUND"
360 fi
361 done
362
363 # Verify pkg-config is accessible
364 echo "🔧 Checking pkg-config..."
365 if command -v pkg-config >/dev/null 2>&1; then
366 echo "✅ pkg-config is accessible: $(which pkg-config)"
367 echo "✅ pkg-config version: $(pkg-config --version)"
368
369 # Test libxml-2.0 specifically
370 if pkg-config --exists libxml-2.0; then
371 echo "✅ libxml-2.0 package found via pkg-config"
372 echo "📋 libxml-2.0 cflags: $(pkg-config --cflags libxml-2.0)"
373 else
374 echo "❌ libxml-2.0 package not found via pkg-config"
375 echo "🔍 Available packages: $(pkg-config --list-all | head -10)"
376 fi
377 else
378 echo "❌ pkg-config not accessible"
379 echo "🔍 Searching for pkg-config in .local..."
380 find "$HOME/.local" -name "pkg-config" -type f 2>/dev/null | head -3 || echo "No pkg-config binaries found"
381 fi
382 fi
383
384 # Run the build script with properly configured environment
385 bun run scripts/build-php.ts
193386
194387 - name: Create tarball (Unix)
195388 if: matrix.platform != 'win32'
196389 run: |
390 # Ensure binaries directory exists and check for builds
391 if [ ! -d "binaries" ]; then
392 echo "❌ Binaries directory not found"
393 ls -la
394 exit 1
395 fi
396
197397 cd binaries
198398 BINARY_NAME="php-$-$-$-$"
399
400 echo "🔍 Looking for binary directory: $BINARY_NAME"
401 ls -la
402
199403 if [ -d "$BINARY_NAME" ]; then
200 # Create metadata file
201 echo '{"php_version":"$","platform":"$","arch":"$","config":"$","built_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$BINARY_NAME/metadata.json"
404 # Create metadata file if it doesn't exist
405 if [ ! -f "$BINARY_NAME/metadata.json" ]; then
406 echo '{"php_version":"$","platform":"$","arch":"$","config":"$","built_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$BINARY_NAME/metadata.json"
407 fi
202408
203409 # Create tarball
204410 tar -czf "$BINARY_NAME.tar.gz" "$BINARY_NAME"
@@ -206,24 +412,39 @@ jobs:
206412 ls -lh "$BINARY_NAME.tar.gz"
207413 else
208414 echo "❌ Binary directory not found: $BINARY_NAME"
415 echo "Available directories:"
416 ls -la
209417 exit 1
210418 fi
211419
212420 - name: Create tarball (Windows)
213421 if: matrix.platform == 'win32'
214422 run: |
423 # Ensure binaries directory exists and check for builds
424 if (-not (Test-Path -Path "binaries" -PathType Container)) {
425 Write-Host "❌ Binaries directory not found"
426 Get-ChildItem
427 exit 1
428 }
429
215430 cd binaries
216431 $BINARY_NAME = "php-$-$-$-$"
432
433 Write-Host "🔍 Looking for binary directory: $BINARY_NAME"
434 Get-ChildItem
435
217436 if (Test-Path -Path $BINARY_NAME -PathType Container) {
218 # Create metadata file
219 $metadata = @{
220 php_version = "${{ matrix.php_version }}"
221 platform = "$"
222 arch = "$"
223 config = "$"
224 built_at = (Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ")
225 } | ConvertTo-Json
226 $metadata | Out-File -FilePath "$BINARY_NAME\metadata.json" -Encoding UTF8
437 # Create metadata file if it doesn't exist
438 if (-not (Test-Path -Path "$BINARY_NAME\metadata.json")) {
439 $metadata = @{
440 php_version = "$"
441 platform = "$"
442 arch = "$"
443 config = "$"
444 built_at = (Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ")
445 } | ConvertTo-Json
446 $metadata | Out-File -FilePath "$BINARY_NAME\metadata.json" -Encoding UTF8
447 }
227448
228449 # Create zip archive (Windows equivalent of tarball)
229450 Compress-Archive -Path $BINARY_NAME -DestinationPath "$BINARY_NAME.zip" -Force
@@ -231,6 +452,8 @@ jobs:
231452 Get-ChildItem "$BINARY_NAME.zip" | Format-List Name, Length
232453 } else {
233454 Write-Host "❌ Binary directory not found: $BINARY_NAME"
455 Write-Host "Available directories:"
456 Get-ChildItem
234457 exit 1
235458 }
236459
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -243,7 +466,7 @@ jobs: formatting only
243466 binaries/$BINARY_NAME/bin/php --version
244467 echo "📋 All available extensions:"
245468 binaries/$BINARY_NAME/bin/php -m
246
469
247470 # Define essential extensions that MUST be present
248471 REQUIRED_EXTENSIONS=(
249472 "Core" "date" "hash" "json" "pcre" "Reflection" "SPL" "standard"
formatting only · 12 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -252,10 +475,10 @@ jobs: formatting only
252475 "curl" "openssl" "zip" "zlib" "calendar" "ftp" "pcntl" "posix"
253476 "shmop" "sockets" "exif" "bcmath" "bz2" "gettext" "readline"
254477 )
255
478
256479 # Define Zend extensions that need special checking
257480 ZEND_EXTENSIONS=("opcache")
258
481
259482 # Test each required extension
260483 echo "🧪 Testing essential extensions..."
261484 MISSING_EXTENSIONS=()
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -268,7 +491,7 @@ jobs: formatting only
268491 MISSING_EXTENSIONS+=("$ext")
269492 fi
270493 done
271
494
272495 # Test Zend extensions separately
273496 for ext in "${ZEND_EXTENSIONS[@]}"; do
274497 EXT_LOADED=$(binaries/$BINARY_NAME/bin/php -r "echo function_exists('opcache_get_status') ? '1' : '0';")
formatting only · 16 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -279,14 +502,14 @@ jobs: formatting only
279502 MISSING_EXTENSIONS+=("$ext")
280503 fi
281504 done
282
505
283506 # Check if any essential extensions are missing
284507 if [ ${#MISSING_EXTENSIONS[@]} -gt 0 ]; then
285508 echo "❌ Critical extensions missing: ${MISSING_EXTENSIONS[*]}"
286509 echo "This build is incomplete and will cause issues with Composer and Laravel."
287510 exit 1
288511 fi
289
512
290513 # Test phar extension functionality specifically
291514 echo "🧪 Testing phar extension functionality..."
292515 PHAR_LOADED=$(binaries/$BINARY_NAME/bin/php -r 'echo extension_loaded("phar") ? "1" : "0";')
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -294,7 +517,7 @@ jobs: formatting only
294517 echo "✅ Phar extension is loaded"
295518 # Test phar creation (essential for Composer)
296519 echo "🧪 Testing phar creation..."
297 echo '<?php
520 echo '<?php
298521 if (extension_loaded("phar")) {
299522 try {
300523 $phar = new Phar("test.phar");
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -316,7 +539,7 @@ jobs: formatting only
316539 echo "❌ Phar extension not loaded - this will break Composer!"
317540 exit 1
318541 fi
319
542
320543 # Test Composer compatibility
321544 echo "🧪 Testing Composer compatibility..."
322545 echo '<?php
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -325,7 +548,7 @@ jobs: formatting only
325548 "iconv", "mb_strlen", "filter_var", "hash", "json_encode",
326549 "curl_init", "openssl_get_cert_locations", "file_get_contents"
327550 ];
328
551
329552 foreach ($required_functions as $func) {
330553 if (function_exists($func)) {
331554 echo "✅ Function $func: Available\n";
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -334,7 +557,7 @@ jobs: formatting only
334557 exit(1);
335558 }
336559 }
337
560
338561 // Test essential classes
339562 $required_classes = ["Phar", "DOMDocument", "XMLReader", "ZipArchive"];
340563 foreach ($required_classes as $class) {
formatting only · 14 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -345,12 +568,12 @@ jobs: formatting only
345568 exit(1);
346569 }
347570 }
348
571
349572 echo "✅ All Composer compatibility checks passed\n";
350573 ?>' > test_composer_compat.php
351574 binaries/$BINARY_NAME/bin/php test_composer_compat.php
352575 rm test_composer_compat.php
353
576
354577 echo "✅ All PHP binary tests passed successfully!"
355578 else
356579 echo "❌ PHP binary not found"
formatting only · 30 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -365,25 +588,25 @@ jobs: formatting only
365588 $phpExeBin = "binaries\$BINARY_NAME\bin\php.exe"
366589 $PHP = if (Test-Path -Path $phpExeRoot -PathType Leaf) { $phpExeRoot } elseif (Test-Path -Path $phpExeBin -PathType Leaf) { $phpExeBin } else { $null }
367590 Write-Host "Checking for binary at: $PHP"
368
591
369592 # List all files in the binary directory to verify structure
370593 Write-Host "📂 Binary directory structure:"
371594 Get-ChildItem -Path "binaries\$BINARY_NAME" -Recurse | Format-Table Name, Length, LastWriteTime
372
595
373596 # Check if the PHP binary exists
374597 if ($PHP -and (Test-Path -Path $PHP -PathType Leaf)) {
375598 Write-Host "✅ PHP binary exists at expected location"
376
599
377600 # Get file size to verify it's a real binary (not just a placeholder)
378601 $fileSize = (Get-Item $PHP).Length
379602 Write-Host "📊 PHP binary size: $fileSize bytes"
380
603
381604 # Test PHP version and extensions
382605 Write-Host "🧪 Testing PHP binary..."
383606 & $PHP --version
384607 Write-Host "📋 All available extensions:"
385608 & $PHP -m
386
609
387610 # Define essential extensions that MUST be present
388611 $REQUIRED_EXTENSIONS = @(
389612 "Core", "date", "hash", "json", "pcre", "Reflection", "SPL", "standard",
formatting only · 12 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -392,10 +615,10 @@ jobs: formatting only
392615 "curl", "openssl", "zip", "zlib", "calendar", "ftp",
393616 "shmop", "sockets", "exif", "bcmath", "bz2", "gettext", "readline"
394617 )
395
618
396619 # Define Zend extensions that need special checking
397620 $ZEND_EXTENSIONS = @("opcache")
398
621
399622 # Test each required extension
400623 Write-Host "🧪 Testing essential extensions..."
401624 $MISSING_EXTENSIONS = @()
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -408,7 +631,7 @@ jobs: formatting only
408631 $MISSING_EXTENSIONS += $ext
409632 }
410633 }
411
634
412635 # Test Zend extensions separately
413636 foreach ($ext in $ZEND_EXTENSIONS) {
414637 $extLoaded = & $PHP -r "echo function_exists('opcache_get_status') ? '1' : '0';"
formatting only · 16 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -419,14 +642,14 @@ jobs: formatting only
419642 $MISSING_EXTENSIONS += $ext
420643 }
421644 }
422
645
423646 # Check if any essential extensions are missing
424647 if ($MISSING_EXTENSIONS.Count -gt 0) {
425648 Write-Host "❌ Critical extensions missing: $($MISSING_EXTENSIONS -join ', ')"
426649 Write-Host "This build is incomplete and will cause issues with Composer and Laravel."
427650 exit 1
428651 }
429
652
430653 # Test phar extension functionality specifically
431654 Write-Host "🧪 Testing phar extension functionality..."
432655 $pharLoaded = & $PHP -r 'echo extension_loaded("phar") ? "1" : "0";'
formatting only · 26 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -445,22 +668,22 @@ jobs: formatting only
445668 Write-Host "❌ Phar extension not loaded - this will break Composer!"
446669 exit 1
447670 }
448
671
449672 # Test Composer compatibility
450673 Write-Host "🧪 Testing Composer compatibility..."
451674 $composerTestContent = "<?php`n// Test essential functions for Composer`n`$required_functions = [`n `"iconv`", `"mb_strlen`", `"filter_var`", `"hash`", `"json_encode`",`n `"curl_init`", `"openssl_get_cert_locations`", `"file_get_contents`"`n];`n`nforeach (`$required_functions as `$func) {`n if (function_exists(`$func)) {`n echo `"✅ Function `$func: Available\n`";`n } else {`n echo `"❌ Function `$func: Missing\n`";`n exit(1);`n }`n}`n`n// Test essential classes`n`$required_classes = [`"Phar`", `"DOMDocument`", `"XMLReader`", `"ZipArchive`"];`nforeach (`$required_classes as `$class) {`n if (class_exists(`$class)) {`n echo `" Class `$class: Available\n`";`n } else {`n echo `" Class `$class: Missing\n`";`n exit(1);`n }`n}`n`necho `" All Composer compatibility checks passed\n`";`n?>"
452675 $composerTestContent | Out-File -FilePath "test_composer_compat.php" -Encoding UTF8
453676 & $PHP "test_composer_compat.php"
454677 Remove-Item "test_composer_compat.php"
455
678
456679 # Check if this is likely a real binary based on file size
457680 if ($fileSize -gt 1000000) {
458681 Write-Host "✅ PHP binary appears to be a real Windows binary (file size: $fileSize bytes)"
459
682
460683 # Check for DLLs which should be present in a real PHP distribution
461684 $dllCount = (Get-ChildItem -Path "binaries\$BINARY_NAME" -Filter "*.dll" -Recurse).Count
462685 Write-Host "Found $dllCount DLL files in the PHP distribution"
463
686
464687 if ($dllCount -gt 10) {
465688 Write-Host "✅ PHP distribution contains expected DLL files"
466689 } else {
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -469,7 +692,7 @@ jobs: formatting only
469692 } else {
470693 Write-Host "⚠️ PHP binary is smaller than expected, might be a placeholder"
471694 }
472
695
473696 Write-Host "✅ All PHP binary tests passed successfully!"
474697 } else {
475698 Write-Host "❌ PHP binary not found at expected location"
Changes to .github/workflows/precompile-php.yml
@@ -484,7 +707,7 @@ jobs:
484707
485708 - name: Upload PHP Binary (Unix)
486709 if: matrix.platform != 'win32'
487 uses: actions/upload-artifact@v4
710 uses: actions/upload-artifact@v4.6.2
488711 with:
489712 name: php-${{ matrix.php_version }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.config }}
490713 path: binaries/php-${{ matrix.php_version }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.config }}.tar.gz
@@ -492,7 +715,7 @@ jobs:
492715
493716 - name: Upload PHP Binary (Windows)
494717 if: matrix.platform == 'win32'
495 uses: actions/upload-artifact@v4
718 uses: actions/upload-artifact@v4.6.2
496719 with:
497720 name: php-${{ matrix.php_version }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.config }}
498721 path: binaries/php-${{ matrix.php_version }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.config }}.zip
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -603,7 +826,7 @@ jobs: formatting only
603826 jq --argjson binary "$binary_json" '. += [$binary]' binaries_array.json > temp_array.json
604827 mv temp_array.json binaries_array.json
605828 done
606
829
607830 # Process zip files (Windows binaries)
608831 echo "Processing Windows binaries (.zip files)..."
609832 for zipfile in $(find . -name "*.zip" -type f); do
formatting only · 12 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -635,10 +858,10 @@ jobs: formatting only
635858 # Create a temporary directory
636859 temp_dir="temp_extract_$RANDOM"
637860 mkdir -p "$temp_dir"
638
861
639862 # Try to extract just the metadata file
640863 unzip -q -j "$zipfile" "*/metadata.json" -d "$temp_dir" 2>/dev/null || echo '{}' > "$temp_dir/metadata.json"
641
864
642865 # Create JSON object for this binary
643866 binary_json=$(jq -n \
644867 --arg filename "$filename" \
formatting only · 8 hidden lines
Changes to .github/workflows/precompile-php.yml
@@ -663,7 +886,7 @@ jobs: formatting only
663886 # Add this binary to the array using jq
664887 jq --argjson binary "$binary_json" '. += [$binary]' binaries_array.json > temp_array.json
665888 mv temp_array.json binaries_array.json
666
889
667890 # Clean up temp directory
668891 rm -rf "$temp_dir"
669892 done