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

Exception listener with dedicated data methods #180

Merged
merged 1 commit into from Jan 16, 2019

Conversation

bouland
Copy link
Contributor

@bouland bouland commented Jan 9, 2019

Sorry for my PR #176, i used version 2.0.2 and didn't take last changes.

Issue #175

@Jean85
Copy link
Collaborator

Jean85 commented Jan 9, 2019

I'm sorry but I think I've missed those too... Where did you got those changes? They aren't from this bundle, it seems. Maybe from a fork?

@bouland
Copy link
Contributor Author

bouland commented Jan 9, 2019

I'm sorry but I think I've missed those too... Where did you got those changes? They aren't from this bundle, it seems. Maybe from a fork?

No fork, just folowing PR

@bouland
Copy link
Contributor Author

bouland commented Jan 9, 2019

My goal is to write this overriding code

class SentryExceptionListener extends ExceptionListener
{
    /**
     * @param object|string|UserInterface|SentryUserInterface $user
     */
    protected function setUserValue($user)
    {
        if (!$user instanceof SentryUserInterface) {
            parent::setUserValue($user);
            return;
        }

        $this->client->set_user_data(
            $user->getId(),
            $user->getEmail(),
            parent::getUserData() + $user->getSentryData()
        );
    }
}

@bouland
Copy link
Contributor Author

bouland commented Jan 14, 2019

UP !

What do you think about it ?

@Jean85
Copy link
Collaborator

Jean85 commented Jan 14, 2019

Those are breaking changes for anyone that is extending the listener like you, so I cannot merge this as is.

@tlesne
Copy link

tlesne commented Jan 16, 2019

I don't get how the changes are breaking the current behaviour that may be expected from other users extending the listener.
The code just seems refactored in sub function and not breaking the methods signature.

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

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

You're right, the diff here on GitHub tricked me, you just wrapped stuff without breaking changes.

LGTM then! 👍

@Jean85 Jean85 merged commit 908f5ac into getsentry:master Jan 16, 2019
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.

None yet

3 participants