You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.
@henrikbjorn@hkdobrev To create an alias to an already registered service you have to use a closure that accesses the service and cannot just copy the factory with raw(). Failure to do so may result in the instanciation of your object twice.
In the new test, this will fail while it should work: $this->assertSame($app['my_user_provider'], $app['security.user_provider.default']);
To fix that, you need to replace $users = $app->raw($users) in the provider with:
$users = function () use ($app, $users) {
return $app[$users];
};
PS: Apologies for not sending a PR, I'm barely able to find free time for reviews.
The text was updated successfully, but these errors were encountered:
…er (hkdobrev)
This PR was merged into the 2.3.x-dev branch.
Discussion
----------
Treat user provider as a service in security service provider
Follow-up to #1611 and #1217.
Fixes#1630.
Commits
-------
c6f14e8 Treat user provider as a service in security service provider
…er (hkdobrev)
This PR was merged into the 2.3.x-dev branch.
Discussion
----------
Treat user provider as a service in security service provider
Follow-up to silexphp/Silex#1611 and silexphp/Silex#1217.
Fixessilexphp/Silex#1630.
Commits
-------
c6f14e8 Treat user provider as a service in security service provider
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@henrikbjorn @hkdobrev To create an alias to an already registered service you have to use a closure that accesses the service and cannot just copy the factory with
raw()
. Failure to do so may result in the instanciation of your object twice.In the new test, this will fail while it should work:
$this->assertSame($app['my_user_provider'], $app['security.user_provider.default']);
To fix that, you need to replace
$users = $app->raw($users)
in the provider with:PS: Apologies for not sending a PR, I'm barely able to find free time for reviews.
The text was updated successfully, but these errors were encountered: