Skip to content

Commit 43970e0

Browse files
committed
feat(error): deprecate E_USER_ERROR in PHP 8.4
Refs: #476
1 parent 3ed3ba4 commit 43970e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/embed/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ mod tests {
287287
#[test]
288288
fn test_eval_bailout() {
289289
Embed::run(|| {
290-
let result = Embed::eval("trigger_error(\"Fatal error\", E_USER_ERROR);");
290+
let result = Embed::eval("trigger_error(\"Fatal error\", E_ERROR);");
291291

292292
assert!(result.is_err());
293293
assert!(result.unwrap_err().is_bailout());

src/flags.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ bitflags! {
308308
/// Compile warning
309309
const CompileWarning = E_COMPILE_WARNING;
310310
/// User error
311+
#[cfg_attr(php84, deprecated = "`E_USER_ERROR` is deprecated since PHP 8.4. Throw an exception instead.")]
311312
const UserError = E_USER_ERROR;
312313
/// User warning
313314
const UserWarning = E_USER_WARNING;

0 commit comments

Comments
 (0)