Install the latest PHP version (#2210)
This commit is contained in:
@@ -3,14 +3,9 @@
|
|||||||
## Desc: Install PHP
|
## Desc: Install PHP
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Get latest PHP-7.4
|
|
||||||
$url = "https://raw.githubusercontent.com/chocolatey-community/chocolatey-coreteampackages/master/automatic/php/php.json"
|
|
||||||
$phpVersion = [System.Net.WebClient]::new().DownloadString($url) | ConvertFrom-Json
|
|
||||||
$latestPHPVersion = $phpVersion.'7.4'
|
|
||||||
|
|
||||||
# Install latest PHP in chocolatey
|
# Install latest PHP in chocolatey
|
||||||
$installDir = "c:\tools\php"
|
$installDir = "c:\tools\php"
|
||||||
Choco-Install -PackageName php -ArgumentList "--version=$latestPHPVersion","--force", "--params", "/InstallDir:$installDir"
|
Choco-Install -PackageName php -ArgumentList "--force", "--params", "/InstallDir:$installDir"
|
||||||
|
|
||||||
# Install latest Composer in chocolatey
|
# Install latest Composer in chocolatey
|
||||||
Choco-Install -PackageName composer -ArgumentList "--ia", "/DEV=$installDir /PHP=$installDir"
|
Choco-Install -PackageName composer -ArgumentList "--ia", "/DEV=$installDir /PHP=$installDir"
|
||||||
|
|||||||
Reference in New Issue
Block a user