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

Refactor model violation reporters #825

Merged
merged 9 commits into from Apr 17, 2024

Conversation

stayallive
Copy link
Collaborator

@stayallive stayallive commented Dec 21, 2023

This refactors the way model violation reports to cleanup the code and remove duplication where possible.

Changes:

  • Add DiscardedAttributeViolationReporter
  • Add memoization (enabled by default) to prevent multiple reports in the same request
  • Add delayed sending of reports so they have minimal impact
  • Add tests

@stayallive stayallive force-pushed the eloquent-violation-reporter-memoization branch from 0abf38b to 298efcf Compare December 21, 2023 18:57
Base automatically changed from prevent-accessing-missing-attributes-report-helper to master April 11, 2024 12:25
@stayallive stayallive force-pushed the eloquent-violation-reporter-memoization branch from 327e14d to 6d12095 Compare April 11, 2024 13:02
@stayallive stayallive marked this pull request as ready for review April 11, 2024 13:07
Copy link
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

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

Do we have docs for this?

# Conflicts:
#	src/Sentry/Laravel/Integration.php
@stayallive
Copy link
Collaborator Author

We didn't but it's in progress: getsentry/sentry-docs#9727

@stayallive stayallive merged commit fefacb9 into master Apr 17, 2024
24 checks passed
@stayallive stayallive deleted the eloquent-violation-reporter-memoization branch April 17, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants