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

Add functions to clear breadcrumbs and bulk set tags and extras in the scope #852

Merged

Conversation

ste93cry
Copy link
Collaborator

Q A
Branch? 2.2 (develop)
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
License MIT

This closes #797 by implementing the setTags, setExtras and clearBreadcrumbs methods on the Scope class. I also refactored the tests to stop relying on reflection to access the active scope of an hub. I wonder if it makes sense to deprecate all the getters on the scope as the other SDKs do not implement them

@ste93cry ste93cry force-pushed the feature/new-methods-on-scope-class branch from 6950ecb to 5b5c7fc Compare July 18, 2019 12:28
tests/State/HubTest.php Show resolved Hide resolved
Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

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

Thanks!

@ste93cry
Copy link
Collaborator Author

@HazAT should we deprecate the getters on the Scope class and discourage their usage?

@HazAT
Copy link
Member

HazAT commented Jul 18, 2019

@ste93cry Yes, we could add @deprecated before we make them protected or something.

@ste93cry
Copy link
Collaborator Author

Since they are marked as @internal we can remove them immediatly without breaking BC per PHPDoc-definition as they should not be used outside the application or library:

The @internal tag is used to denote that associated Structural Elements are elements internal to this application or library

@ste93cry ste93cry requested review from Jean85 and HazAT July 18, 2019 17:23
@ste93cry ste93cry force-pushed the feature/new-methods-on-scope-class branch from 32be225 to eb1cbde Compare July 19, 2019 07:43
@ste93cry ste93cry force-pushed the feature/new-methods-on-scope-class branch from eb1cbde to ffa26c0 Compare July 19, 2019 07:47
tests/State/ScopeTest.php Outdated Show resolved Hide resolved
@ste93cry ste93cry merged commit 2052a04 into getsentry:develop Jul 19, 2019
@ste93cry ste93cry deleted the feature/new-methods-on-scope-class branch July 19, 2019 13:00
@volkyeth volkyeth mentioned this pull request Sep 24, 2019
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