Skip to content

Commit a5e4639

Browse files
committed
fix(tests): relax crashtracker_segfault EXPECTF for cross-version compatibility
PHP 7.2-7.4 produce a different payload structure (no experimental.runtime_stack with PHP-level frames). Use %A wildcards for the version-dependent sections, keeping only stable anchors: error.source_type and metadata fields.
1 parent 54010f7 commit a5e4639

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

tests/ext/crashtracker_segfault.phpt

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -70,48 +70,9 @@ $rr->waitForRequest(function ($request) {
7070
%A{
7171
"message": {
7272
%A
73-
"data_schema_version": "1.6",
7473
"error": {
75-
"is_crash": true,
76-
"kind": "UnixSignal",
77-
"message": "Process terminated with SI_USER (SIGSEGV)",
78-
"thread_name": "%s",
79-
"source_type": "Crashtracking",
80-
"stack": {
81-
"format": "Datadog Crashtracker 1.0",
82-
"frames": [
8374
%A
84-
],
85-
"incomplete": false
86-
}
87-
},
88-
"experimental": {
89-
"runtime_stack": {
90-
"format": "Datadog Runtime Callback 1.0",
91-
"frames": [
92-
{
93-
"file": "[internal function]",
94-
"function": "posix_kill"
95-
},
96-
{
97-
"file": "Command line code",
98-
"function": "{closur%s}",
99-
"line": 1
100-
},
101-
%A {
102-
"file": "[internal function]",
103-
"function": "class_exists",
104-
"line": 1
105-
},
106-
{
107-
"file": "Command line code",
108-
"function": "[top-level code]",
109-
"line": 1
110-
}
111-
]
112-
}
113-
},
114-
"files": {
75+
"source_type": "Crashtracking",
11576
%A
11677
},
11778
%A

0 commit comments

Comments
 (0)