fix(ext): resolve sqlsrv PECL install across Win/Linux/macOS#12
Merged
Conversation
Windows: rewrite Test-URLExists with Invoke-WebRequest so HEAD probes follow the windows.php.net -> downloads.php.net 302 redirect (and fall back to a ranged GET when mirrors reject HEAD). This unblocks sqlsrv / pdo_sqlsrv installs that were failing with "No compatible package found" even though the zip exists upstream. Linux/macOS: pre-flight unixODBC headers before pecl install sqlsrv| pdo_sqlsrv and surface a package-manager-specific install hint instead of letting the build fail mid-compile. Covers apt, dnf, yum, pacman, zypper and brew (incl. Apple Silicon /opt/homebrew paths). Both platforms now print a post-install advisory pointing at the Microsoft ODBC Driver for SQL Server and the MS Learn setup guide, since the PHP extension alone is not enough to connect at runtime. Bumps phpvm to 1.7.1.
windows/phpvm.ps1 has no BOM, so PSUseBOMForUnicodeEncodedFile fires the moment any non-ASCII char appears. Swap the U+2014 em-dash in a comment for plain ASCII to keep the file pure ASCII like main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows: rewrite Test-URLExists with Invoke-WebRequest so HEAD probes follow the windows.php.net -> downloads.php.net 302 redirect (and fall back to a ranged GET when mirrors reject HEAD). This unblocks sqlsrv / pdo_sqlsrv installs that were failing with "No compatible package found" even though the zip exists upstream.
Linux/macOS: pre-flight unixODBC headers before pecl install sqlsrv| pdo_sqlsrv and surface a package-manager-specific install hint instead of letting the build fail mid-compile. Covers apt, dnf, yum, pacman, zypper and brew (incl. Apple Silicon /opt/homebrew paths).
Both platforms now print a post-install advisory pointing at the Microsoft ODBC Driver for SQL Server and the MS Learn setup guide, since the PHP extension alone is not enough to connect at runtime.
Bumps phpvm to 1.7.1.