mlocati / powershell-phpmanager

A PowerShell module to install/update PHP, PHP extensions and Composer on Windows

Home Page:https://www.powershellgallery.com/packages/PhpManager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while installing 7.4RC

shivammathur opened this issue · comments

While installing PHP 7.4RC it gives this error

Failed to recognize VCVersion from Visual C++ 2017
At C:\Users\runneradmin\Documents\WindowsPowerShell\Modules\PhpManager\1.16.1.201\private\PhpVersion.ps1:284 char:27
+ ...   default { throw "Failed to recognize VCVersion from Visual C++ $vcY ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Failed to recog...Visual C++ 2017:String) [], RuntimeException
    + FullyQualifiedErrorId : Failed to recognize VCVersion from Visual C++ 2017

This is because in PhpVersion.ps1 the switch to check $vcYear only has 2019 and it fails for 2017.

switch ($vcYear) {
'2019' { $data.VCVersion = 16 }
default { throw "Failed to recognize VCVersion from Visual C++ $vcYear" }
}

@mlocati Here is a pull request to fix this #36.

Fixed in #36