Skip to content

CoreLogger should throw an exception instead of calling trigger_error with E_USER_ERROR #102

@jsavell

Description

@jsavell

PHP 8.4 deprecates the strategy of triggering an error by calling trigger_error with the E_USER_ERROR constant.

Pipit log levels of 3 should be updated to throw RuntimeException or a custom extension of it at https://github.com/TAMULib/Pipit/blob/master/src/Pipit/Classes/Loggers/CoreLogger.php#L45 rather than the current trigger_error call. The exception message should be populated with the $message variable.

The trigger_error call can be left in place for the other Pipit logger levels.

This change should be backward compatible, as the exception+message will be written to the log and execution halted, the same behavior previously accomplished with trigger_error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions