fix(windows): pass version arg through to ext install#13
Merged
Conversation
…name as version) `phpvm ext install <name> [version]` needs four positional args (phpvm, ext, install, name, [version]) but the script's param block only declared three. As a result `phpvm ext install sqlsrv` was calling Install-PECLExt with ($extName="sqlsrv", $requestedVer="sqlsrv"), so the version-probe loop tried URLs like php_sqlsrv-sqlsrv-8.3-nts-vs16-x64.zip and every Test-URLExists returned 404, surfacing as "No compatible package found". This bug was latent in 1.7.0 because Test-URLExists was broken in a way that made every probe false anyway. Once 1.7.1 fixed the redirect handling the arg-shift bug got exposed. Adds a fourth positional `$Arg3`, threads it through the ext dispatcher and Invoke-Ext so the explicit-version path actually receives the version. Verified end-to-end with `phpvm ext install sqlsrv` against PHP 8.3 nts/vs16/x64. Bumps phpvm to 1.7.2.
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.
Summary
phpvm ext install <name> [version]needs four positional args, but the script'sparam()only declared three. Callingphpvm ext install sqlsrvended up invokingInstall-PECLExt -extName sqlsrv -requestedVer sqlsrv, so the version-probe loop tried URLs likephp_sqlsrv-sqlsrv-8.3-nts-vs16-x64.zipand everyTest-URLExistsreturned 404 — surfacing asNo compatible package found.Test-URLExistsfailed on the windows.php.net → downloads.php.net 302 redirect, so every probe was false anyway. PR fix(ext): resolve sqlsrv PECL install across Win/Linux/macOS #12 fixed the redirect handling, which exposed this arg-shift bug.Test plan