File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ pre-commit:
2
2
parallel : true
3
3
jobs :
4
4
- name : fmt
5
- run : rustfmt {staged_files}
5
+ run : rustfmt --edition 2021 {staged_files}
6
6
glob : " *.rs"
7
7
stage_fixed : true
8
8
- name : clippy
Original file line number Diff line number Diff line change @@ -287,6 +287,8 @@ mod tests {
287
287
#[ test]
288
288
fn test_eval_bailout ( ) {
289
289
Embed :: run ( || {
290
+ // TODO: For PHP 8.5, this needs to be replaced, as `E_USER_ERROR` is deprecated.
291
+ // Currently, this seems to still be the best way to trigger a bailout.
290
292
let result = Embed :: eval ( "trigger_error(\" Fatal error\" , E_USER_ERROR);" ) ;
291
293
292
294
assert ! ( result. is_err( ) ) ;
Original file line number Diff line number Diff line change @@ -308,6 +308,7 @@ bitflags! {
308
308
/// Compile warning
309
309
const CompileWarning = E_COMPILE_WARNING ;
310
310
/// User error
311
+ #[ cfg_attr( php84, deprecated = "`E_USER_ERROR` is deprecated since PHP 8.4. Throw an exception instead." ) ]
311
312
const UserError = E_USER_ERROR ;
312
313
/// User warning
313
314
const UserWarning = E_USER_WARNING ;
You can’t perform that action at this time.
0 commit comments