Skip to content

Fix installation with VcRedist 5 - #142

Merged
mlocati merged 1 commit into
mlocati:masterfrom
shivammathur:fix/vcredist-installation
Nov 15, 2026
Merged

mlocati merged 1 commit into
mlocati:masterfrom
shivammathur:fix/vcredist-installation

Conversation

@shivammathur

Copy link
Copy Markdown
Contributor

VcRedist 5 removes the Install-VcRedist -Path parameter.

So, we can check whether the command supports -Path and pass it only when supported, preserving compatibility with older versions.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Deterministic regression coverage is missing for both Install-VcRedist parameter shapes and the elevated CLIXML installation path, leaving the compatibility change insufficiently verified.

1 open issue
What changed in this PR

Updates PHP’s optional Visual C++ runtime installation to support VcRedist 5 while preserving compatibility with older versions.

Changes:

  • Passes -Path to Install-VcRedist only when the command supports it.
  • Transfers redistributable metadata to the elevated process through CLIXML instead of rebuilding the list.
File Description
PhpManager/​private/​Install-PhpFromUrl.ps1 Adds conditional parameter handling and serialized metadata for elevated runtime installation.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

VcRedist parameter detection uses the caller’s loaded version, which may differ from the elevated process’s version, causing an unsupported -Path argument to break non-administrator installations.

2 open issues

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The tests omit the non-administrator path, leaving the CLIXML metadata handoff and elevated-command quoting unverified against both Install-VcRedist signatures.

2 open issues
1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Mocked process launches and untyped test stubs leave the elevated path’s deserialized catalog binding compatibility unverified, requiring real Windows validation with VcRedist 5 and older versions.

2 open issues

Review effort: Balanced

@mlocati
mlocati merged commit 1811d5f into mlocati:master Nov 15, 2026
4 checks passed
@mlocati

mlocati commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants