diff --git a/images/win/scripts/Installers/Validate-PHP.ps1 b/images/win/scripts/Installers/Validate-PHP.ps1 index a8663617..f2f26a52 100644 --- a/images/win/scripts/Installers/Validate-PHP.ps1 +++ b/images/win/scripts/Installers/Validate-PHP.ps1 @@ -33,6 +33,32 @@ else exit 1 } +# Verify that composer.exe is on the path +if(Get-Command -Name 'composer') +{ + Write-Host "$(composer --version) is on the path." +} +else +{ + Write-Host "composer is not on the path." + exit 1 +} + +# Get the composer version. +$composerVersion = $(composer --version) + +# Add composer version details in Markdown +$SoftwareName = "Composer" +$Description = @" +#### $composerVersion + +_Environment:_ +* PATH: contains the location of composer.exe version $composerVersion +* PHPROOT: root directory of the Composer $composerVersion installation +"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description + # Get available versions of PHP $phpVersionOnPath = Get-PHPVersion -phpRootPath "C:\tools\php72"