-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Add support for HHVM in the getting of the PHP executable #9583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR should be opened against 2.2, not master |
@JoelMarcey that's great to see HHVM support, thanks ! |
@@ -33,6 +33,11 @@ public function __construct() | |||
*/ | |||
public function find() | |||
{ | |||
// HHVM support | |||
if (($hhvm = getenv("PHP_BINARY")) !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the coding standard as @hhamon suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a check on defined('HHVM_VERSION')
should be added, to avoid checking this env variable on non-HHVM setup (where the PHP_BINARY constant should have precedence).
closing in favor of #9882 |
…fabpot) This PR was merged into the 2.3 branch. Discussion ---------- Add support for HHVM in the getting of the PHP executable | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Same as #9583 but with CS fixed, on 2.3, and with an added safeguard to only change the current behavior for HHVM. Check for a PHP_BINARY environment variable before using the pre-defined PHP_BINARY constant. HHVM has an explicit hhvm binary and a wrapper to mimic php functionality. We were running into issues with tests that ran in their own process where using the hhvm binary does not handle php code sent to it via stdin very well. We get "Nothing to do...pass file" exceptions. Unfortunately, the PHP_BINARY is always set to the explicit binary (the php wrapper is basically a symlink to the explicit binary). So, we thought about adding a check for a PHP_BINARY environment variable as the first choice when getting the PHP binary. Commits ------- 876482f [Process] fixed HHVM support 539de17 Add support for HHVM in the getting of the PHP executable
Thanks all for the code update and getting this into master. cc: @ptarjan |
Check for a PHP_BINARY environment variable before using the pre-defined PHP_BINARY constant.
HHVM has an explicit hhvm binary and a wrapper to mimic php functionality. We were running into issues with tests that ran in their own process where using the hhvm binary does not handle php code sent to it via stdin very well. We get "Nothing to do...pass file" exceptions. Unfortunately, the PHP_BINARY is always set to the explicit binary (the php wrapper is basically a symlink to the explicit binary). So, we thought about adding a check for a PHP_BINARY environment variable as the first choice when getting the PHP binary.