neos / setup

An extensible setup tool for Flow based applications
MIT License
6 stars 15 forks source link

FEATURE: Support detection of hhvm in checkPhpBinary #33

Closed f3lang closed 7 years ago

f3lang commented 8 years ago

The detection relied on the output of the command php -v, which has different outputs for PHP and HHVM: PHP 5.6.28-1+deb.sury.org~xenial+1 (cli) vs. HipHop VM 3.13.1 (rel). The detection, which just splits this string, will fail for HHVM even though it is compatible to PHP 5.6 or PHP 7.

This change updates the detection to the ouput of echo '(' . php_sapi_name() . ') ' . PHP_VERSION;, which results in a better comparable output:

PHP: (cli) 5.6.28-1+deb.sury.org~xenial+1 HHVM: (cli) 5.6.99-hhvm

With those strings, version and CLI detection works the same and covers also HHVM setups.