HomePhabricator

Fix "PhutilOpaqueEnvelopeTestCase" under PHP 7.4 with "zend.

Description

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

Details

Provenance
epriestleyAuthored on Wed, Sep 30, 2:45 PM
epriestleyPushed on Wed, Sep 30, 2:49 PM
Differential Revision
D21473: Fix "PhutilOpaqueEnvelopeTestCase" under PHP 7.4 with "zend.exception_ignore_args"
Parents
rARC7597f31b6a20: fail `arc diff` if second lfs push errors
Branches
Unknown
Tags
Unknown
Build Status
Buildable 24927
Build 34389: Run Core Tests