Skip to content

Commit

Permalink
[macOS] Add PHP to the toolset (#4544)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Zabayrachny authored Nov 21, 2021
1 parent 81d68d4 commit be2dc03
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion images/macos/provision/core/php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
source ~/utils/utils.sh

echo Installing PHP
brew_smart_install "php"
phpVersionToolset=$(get_toolset_value '.php.version')
brew_smart_install "php@${phpVersionToolset}"

echo Installing composer
brew_smart_install "composer"
Expand Down
7 changes: 5 additions & 2 deletions images/macos/tests/PHP.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ Describe "PHP" -Skip:($os.IsMonterey) {
Get-WhichTool "php" | Should -Not -BeLike "/usr/bin/php*"
}
It "PHP version" {
"php --version" | Should -ReturnZeroExitCode
$phpVersionToolset = Get-ToolsetValue 'php.version'
$phpInstalledVersion = php --version | Out-String | Select-String "${phpVersionToolset}"
$phpInstalledVersion | Should -BeLike "PHP ${phpVersionToolset}*"
}
}

Context "Composer" {
It "Composer" {
"composer --version" | Should -ReturnZeroExitCode
}
}
}
}
3 changes: 3 additions & 0 deletions images/macos/toolsets/toolset-10.15.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@
"llvm": {
"version": "13"
},
"php": {
"version": "8.0"
},
"mongodb": {
"version": "5.0"
},
Expand Down
5 changes: 4 additions & 1 deletion images/macos/toolsets/toolset-11.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,13 @@
"llvm": {
"version": "13"
},
"php": {
"version": "8.0"
},
"mongodb": {
"version": "5.0"
},
"postgresql": {
"version": "14"
}
}
}
3 changes: 3 additions & 0 deletions images/macos/toolsets/toolset-12.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
"16"
]
},
"php": {
"version": "8.0"
},
"mongodb": {
"version": "5.0"
},
Expand Down

0 comments on commit be2dc03

Please sign in to comment.