Skip to content

Conversation

@pavelzotikov
Copy link
Contributor

Summary

This PR introduces support for the before_send_service option in the Laravel integration.

Why

This allows developers to preprocess, enrich or filter events before they are sent to Hawk, enabling more flexible error reporting (e.g., removing sensitive data, conditionally skipping events).

@pavelzotikov pavelzotikov changed the title Add before_send_service support in Laravel provider Add before_send_service support in Laravel provider Sep 19, 2025
@neSpecc neSpecc requested a review from Copilot September 19, 2025 14:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for a configurable before_send_service hook in the Laravel provider to allow preprocessing/filtering of events before sending to Hawk.

  • Introduces a BeforeSendServiceInterface and wires it into the provider via the hawk.before_send_service config.
  • Updates provider to validate and resolve the service, and updates config and README accordingly.
  • Bumps package version to 0.1.1.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Services/BeforeSendServiceInterface.php Adds an interface for a before-send hook (currently empty).
src/ErrorLoggerServiceProvider.php Reads a before_send_service from config, validates it, and injects into Catcher options.
config/hawk.php Adds before_send_service config option.
composer.json Version bump to 0.1.1.
README.md Documents setup, features, and the BeforeSend hook usage.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

pavelzotikov and others added 2 commits September 19, 2025 17:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pavelzotikov pavelzotikov merged commit 4cb8548 into main Sep 19, 2025
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.

3 participants