Skip to content

Commit

Permalink
Add support for PHP 8.4 (alpha)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Jul 5, 2024
1 parent 6d8ee5e commit d502a60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions PhpManager/private/Get-PhpVersionFromApiVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,22 @@ function Get-PhpVersionFromApiVersion {
return ''
}
switch ($ApiVersion) {
# https://github.com/php/php-src/blob/php-8.4.0alpha1/Zend/zend_modules.h#L34
20230901 {
return '8.4'
}
# https://github.com/php/php-src/blob/php-8.3.0RC1/Zend/zend_modules.h#L34
# https://github.com/php/php-src/blob/php-8.3.7/Zend/zend_modules.h#L34
# https://github.com/php/php-src/blob/php-8.3.9/Zend/zend_modules.h#L34
20230831 {
return '8.3'
}
# https://github.com/php/php-src/blob/php-8.2.0RC1/Zend/zend_modules.h#L34
# https://github.com/php/php-src/blob/php-8.2.19/Zend/zend_modules.h#L34
# https://github.com/php/php-src/blob/php-8.2.21/Zend/zend_modules.h#L34
20220829 {
return '8.2'
}
# https://github.com/php/php-src/blob/php-8.1.0RC1/Zend/zend_modules.h#L34
# https://github.com/php/php-src/blob/php-8.1.28/Zend/zend_modules.h#L34
# https://github.com/php/php-src/blob/php-8.1.29/Zend/zend_modules.h#L34
20210902 {
return '8.1'
}
Expand Down
2 changes: 1 addition & 1 deletion PhpManager/private/PhpVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ echo PHP_VERSION, chr(9), PHP_INT_SIZE * 8, chr(9), $matches[1];
$executableResult = & $data.ExecutablePath @('-i')
$match = $executableResult | Select-String -CaseSensitive -Pattern '^[ \t]*Thread Safety\s*=>\s*(\w+)'
$data.ThreadSafe = $match.Matches.Groups[1].Value -eq 'enabled'
$match = $executableResult | Select-String -CaseSensitive -Pattern '^[ \t]*Compiler\s*=>\s*MSVC([\d]{1,2})'
$match = $executableResult | Select-String -CaseSensitive -Pattern '^[ \t]*Compiler\s*=>\s*MSVC ?([\d]{1,2})'
if ($null -ne $match) {
$data.VCVersion = $match.Matches.Groups[1].Value
} elseif ([System.Version]$data.Version -le [System.Version]'5.2.9999') {
Expand Down

0 comments on commit d502a60

Please sign in to comment.