Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature | Fatal Exception Middleware #440

Merged

Conversation

craigpotter
Copy link
Contributor

@craigpotter craigpotter commented Jul 28, 2024

This adds a new onFatalException middleware option that will be run went a fatal error occurs.

Example Usage:

Config::globalMiddleware()
    ->onFatalException(function (FatalRequestException $exception) {
        // do something 
    }, 'test', PipeOrder::FIRST); 

This could be used to notify someone or log errors.

Introduced usage of describe to tidy / group tests however this required bumping the minimum PestPHP version from 2.6 to 2.9

@craigpotter craigpotter changed the title Feature/fatal exception middleware Feature | Fatal Exception Middleware Jul 28, 2024
Copy link
Contributor Author

@craigpotter craigpotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review 👍

Copy link
Member

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woooooooo awesome PR @craigpotter ! Thank you

@Sammyjo20 Sammyjo20 merged commit 9d2b1c6 into saloonphp:v3 Aug 3, 2024
14 checks passed
@craigpotter craigpotter deleted the feature/fatal-exception-middleware branch August 3, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants