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

Removed config line causing issue on google authenticator #1212

Merged

Conversation

Jean-Gian
Copy link
Contributor

@Jean-Gian Jean-Gian commented Aug 26, 2020

Subject

This fixes the following error:
Stop sonata-project/google-authenticator throwing this exception: Exception thrown when handling an exception (ErrorException: Warning: get_class() expects parameter 1 to be object, null given at /sonata-project/user-bundle/src/GoogleAuthenticator/RequestListener.php line 77

Changelog

### Fixed
- Removed sonata.templating argument from google_authenticator.xml

This fixes the following issue:
Stop sonata-project/google-authenticator throwing this exception: Exception thrown when handling an exception (ErrorException: Warning: get_class() expects parameter 1 to be object, null given at /sonata-project/user-bundle/src/GoogleAuthenticator/RequestListener.php line 77
@Jean-Gian
Copy link
Contributor Author

@jordisala1991 this is what we talked about on the sonata slack channel

@Jean-Gian Jean-Gian changed the title Removed config line to cause issue on google authenticator Removed config line causing issue on google authenticator Aug 26, 2020
@jordisala1991 jordisala1991 requested a review from a team August 26, 2020 14:19
@jordisala1991
Copy link
Member

There are 2 ways to fix the issue, the first one is to remove that line, IMO the cleanest one.

The other way is to allow null on the construct (now it is forbidden with an Exception here: https://github.com/sonata-project/SonataUserBundle/blob/4.x/src/GoogleAuthenticator/RequestListener.php#L72

I think what happened is that we removed the sonata.templating (or it was on the CoreBundle?). So you could end up in the on-invalid=null case.

@jordisala1991
Copy link
Member

Seems like your github account and your git config is not the same, that causes your commit to not show your avatar. Can you link your email to your git config?

@Jean-Gian
Copy link
Contributor Author

Seems like your github account and your git config is not the same, that causes your commit to not show your avatar. Can you link your email to your git config?

Done. Next commit will show the correct avatar

Copy link
Member

@phansys phansys left a comment

Choose a reason for hiding this comment

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

IMO, the changelog should use the "Fixed" section instead of "Changed", since this is a patch.

@Jean-Gian
Copy link
Contributor Author

IMO, the changelog should use the "Fixed" section instead of "Changed", since this is a patch.

True, it's done 👍

@phansys
Copy link
Member

phansys commented Sep 7, 2020

Forcing the CI pipeline to be triggered in order to allow the new required steps to be executed.

@phansys phansys closed this Sep 7, 2020
@phansys phansys reopened this Sep 7, 2020
@VincentLanglet VincentLanglet merged commit f2ae324 into sonata-project:4.x Sep 7, 2020
@VincentLanglet
Copy link
Member

Thanks @Jean-ita

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants