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

Only accept Event on captureEvent methods #1094

Merged
merged 11 commits into from Sep 25, 2020
Merged

Only accept Event on captureEvent methods #1094

merged 11 commits into from Sep 25, 2020

Conversation

stayallive
Copy link
Collaborator

@stayallive stayallive commented Sep 23, 2020

The EventHint class was introduced to pass around extra data needed to correctly hydrate an event, this method of "hinting" was copied from the JavaScript SDK.

Chosen for a dedicated class to have type safety built-in instead of having an array and adding type checks and isset everywhere, this looks cleaner internally. To make it easier to use I've added a simple fromArray static method to have "the best of both worlds" I think, if users need it they can use the extra property on the hint to add arbitrary data.

UPGRADE-3.0.md Outdated Show resolved Hide resolved
UPGRADE-3.0.md Outdated Show resolved Hide resolved
UPGRADE-3.0.md Outdated Show resolved Hide resolved
UPGRADE-3.0.md Outdated Show resolved Hide resolved
src/functions.php Show resolved Hide resolved
tests/ClientTest.php Outdated Show resolved Hide resolved
src/Monolog/Handler.php Outdated Show resolved Hide resolved
src/Client.php Show resolved Hide resolved
src/Client.php Outdated Show resolved Hide resolved
src/EventHint.php Show resolved Hide resolved
@stayallive stayallive force-pushed the cleanup-capture-event branch 2 times, most recently from c6ccfdf to 66bcac9 Compare September 24, 2020 16:44
@stayallive stayallive marked this pull request as ready for review September 24, 2020 16:54
src/State/Scope.php Outdated Show resolved Hide resolved
tests/State/ScopeTest.php Outdated Show resolved Hide resolved
@stayallive stayallive force-pushed the cleanup-capture-event branch 2 times, most recently from 9f0a685 to 9368b24 Compare September 25, 2020 10:18
@ste93cry ste93cry merged commit 17588a2 into 3.x Sep 25, 2020
@ste93cry ste93cry deleted the cleanup-capture-event branch September 25, 2020 10:38
@ste93cry ste93cry added this to the 3.0 milestone Sep 25, 2020
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

3 participants