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 }}
Repository navigation
Service with dependency to fos_oauth_server.client_manager connects to database #422
When having a service with a dependency to fos_oauth_server.client_manager, the connection to the database is established. I worked around it be marking the fos_oauth_server.client_managerlazy=true.
If that's a valid solution to you, I will send a PR, otherwise please tell me what to do?
changed the title [-]Service with dependency to `fos_oauth_server.client_manager` connects to database[/-][+]Service with dependency to fos_oauth_server.client_manager connects to database[/+]on Jul 20, 2016
This is a serious issue. There is a connection established to the oauth database for every request processed by the Symfony framework as soon as FOSOAuthServerBundle is configured and there is a "fos_oauth: true" somewhere in the app/config/security.yml configuration file. If one has a big website with only a small part of it protected by OAuth, this is a waste of resources.
The problem comes from Entity/ClientManager and Entity/TokenManager which instantiate a repository in their constructor.
lazy=true does not appear as an ideal solution to me, because it relies on ocramius/proxy-manager to be installed.
Activity
[-]Service with dependency to `fos_oauth_server.client_manager` connects to database[/-][+]Service with dependency to fos_oauth_server.client_manager connects to database[/+]Repository for ClientManager and TokenManager is now instanciated on …
abienvenu commentedon Nov 18, 2016
This is a serious issue. There is a connection established to the oauth database for every request processed by the Symfony framework as soon as FOSOAuthServerBundle is configured and there is a "fos_oauth: true" somewhere in the app/config/security.yml configuration file. If one has a big website with only a small part of it protected by OAuth, this is a waste of resources.
The problem comes from Entity/ClientManager and Entity/TokenManager which instantiate a repository in their constructor.
lazy=true does not appear as an ideal solution to me, because it relies on ocramius/proxy-manager to be installed.
Here is my attempt to address this issue : #440
Removed unapplicable test for 'getRepository'. We actually do NOT wan…
Repository for ClientManager and TokenManager is now instanciated on …
Removed unapplicable test for 'getRepository'. We actually do NOT wan…
Repository for ClientManager and TokenManager is now instanciated on …
Onthefly repo for ClientManager and TokenManager
Onthefly repo for ClientManager and TokenManager
Onthefly repo for AuthCodeManager