1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-08 07:52:39 +01:00

Fix "PhutilOpaqueEnvelopeTestCase" under PHP 7.4 with "zend.exception_ignore_args"

Summary:
See PHI1894. PHP 7.4 introduced a new runtime configuration option, "zend.exception_ignore_args", which removes the "args" from exception backtraces.

The "PhutilOpaqueEnvelopeTestCase" relies on this behavior (since it explicitly inspects stack frames). Although the test isn't critical and could be restructured, it seems like there is little value to ever enabling this option in the context of Phabricator.

Disable it at startup so environments are more consistent across different PHP versions and configurations.

Test Plan:
  - Enabled "zend.exception_ignore_args" under PHP 7.4.
  - Ran "PhutilOpaqueEnvelopeTestCase".
  - Before: failure, expected signpost value not present in stack trace (because no "args" are present on the exception).
  - After: test passes.

Differential Revision: https://secure.phabricator.com/D21473
This commit is contained in:
epriestley 2020-09-30 07:45:41 -07:00
parent 7597f31b6a
commit 524aa2aed2

View file

@ -50,6 +50,12 @@ function __arcanist_init_script__() {
// See T13296. On macOS under PHP 7.3.x, PCRE currently segfaults after
// "fork()" if "pcre.jit" is enabled.
'pcre.jit' => 0,
// See PHI1894. This option was introduced in PHP 7.4, and removes the
// "args" value from exception backtraces. We have some unit tests which
// inspect "args", and this option generally obscures useful debugging
// information without any benefit in the context of Phabricator.
'zend.exception_ignore_args' => 0,
);
foreach ($config_map as $config_key => $config_value) {