Skip to content

Fixed additional '@' in DoctrineTokenProvider service in 'Remember Me' functionality #11459

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

Closed
wants to merge 1 commit into from

Conversation

vertisan
Copy link
Contributor

In current version we have to add the following line into our firewall definitions:

token_provider: '@Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider'

but with this we'll get error:

The service "security.authentication.rememberme.services.persistent.main" has a dependency on a non-existent service "@Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider".

To fix this we need to remove @ character from service definition so finally it should looks like:

token_provider: 'Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider'

P.S. I have already commit for master branch too so if this change will be accepted, I'll create pull request for master too.

@javiereguiluz
Copy link
Member

@vertisan good catch! This can be verified in the related Symfony code: https://github.com/symfony/symfony/blob/e479b6902e2f3be2c802f846f220eeb119a82aa0/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php#L65-L69 Thank you!

By the way, there's no need to create another PR for the 'master' branch. We always "upmerge" pull requests from lower branches up to master.

javiereguiluz added a commit that referenced this pull request Apr 23, 2019
… 'Remember Me' functionality (vertisan)

This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #11459).

Discussion
----------

Fixed additional '@' in DoctrineTokenProvider service in 'Remember Me' functionality

In current version we have to add the following line into our firewall definitions:
```yaml
token_provider: '@symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider'
```
but with this we'll get error:
```
The service "security.authentication.rememberme.services.persistent.main" has a dependency on a non-existent service "@symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider".
```
To fix this we need to remove `@` character from service definition so finally it should looks like:
```yaml
token_provider: 'Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider'
```

P.S. I have already commit for `master` branch too so if this change will be accepted, I'll create pull request for `master` too.

Commits
-------

9e137fd Fixed additional '@' in DoctrineTokenProvider service in 'Remember Me' functionality
@javiereguiluz
Copy link
Member

Note: we finally merged this in 3.4 (and then we'll merge it in 4.2 and master). That's why GitHub shows it as closed instead of merged (because we changed the branch while merging) ... but it's merged.

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.

3 participants