Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pre-commit:
parallel: true
jobs:
- name: fmt
run: rustfmt {staged_files}
run: rustfmt --edition 2021 {staged_files}
glob: "*.rs"
stage_fixed: true
- name: clippy
Expand Down
2 changes: 2 additions & 0 deletions src/embed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ mod tests {
#[test]
fn test_eval_bailout() {
Embed::run(|| {
// TODO: For PHP 8.5, this needs to be replaced, as `E_USER_ERROR` is deprecated.
// Currently, this seems to still be the best way to trigger a bailout.
let result = Embed::eval("trigger_error(\"Fatal error\", E_USER_ERROR);");

assert!(result.is_err());
Expand Down
1 change: 1 addition & 0 deletions src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ bitflags! {
/// Compile warning
const CompileWarning = E_COMPILE_WARNING;
/// User error
#[cfg_attr(php84, deprecated = "`E_USER_ERROR` is deprecated since PHP 8.4. Throw an exception instead.")]
const UserError = E_USER_ERROR;
/// User warning
const UserWarning = E_USER_WARNING;
Expand Down