Page MenuHomePhabricator

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

Authored by epriestley on Sep 30 2020, 2:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 4:41 AM
Unknown Object (File)
Thu, Nov 21, 9:32 AM
Unknown Object (File)
Sun, Nov 17, 3:50 AM
Unknown Object (File)
Sat, Oct 26, 2:31 PM
Unknown Object (File)
Oct 13 2024, 8:26 AM
Unknown Object (File)
Aug 19 2024, 10:26 PM
Unknown Object (File)
Aug 17 2024, 4:20 AM
Unknown Object (File)
Aug 16 2024, 12:09 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Sep 30 2020, 2:49 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.