Skip to main content

Crate use_php_error

Crate use_php_error 

Source
Expand description

§use-php-error

PHP error and diagnostic metadata primitives for RustUse.

§Experimental

use-php-error is experimental while use-php remains below 0.3.0.

§Example

use use_php_error::{DiagnosticMessage, PhpDiagnostic, PhpErrorKind, PhpSeverity};

let diagnostic = PhpDiagnostic::new(
    PhpErrorKind::Runtime,
    PhpSeverity::Error,
    DiagnosticMessage::new("Undefined variable")?,
);

assert_eq!(diagnostic.severity(), PhpSeverity::Error);

§Scope

  • PHP error levels, diagnostic categories, severity mapping, and diagnostic message/source metadata.

§Non-goals

  • Runtime error handling, stack traces, logging, or analyzer rule engines.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

DiagnosticMessage
DiagnosticSource
PhpDiagnostic
PHP diagnostic metadata.

Enums§

PhpDiagnosticError
Error returned when PHP diagnostic metadata is invalid.
PhpErrorKind
Broad PHP diagnostic category metadata.
PhpErrorLevel
PHP error level metadata.
PhpSeverity
Severity metadata for PHP diagnostics.