@@ -204,14 +204,24 @@ public function __construct()
204204 );
205205 $ this ->services [ClientEntityFactory::class] = $ clientEntityFactory ;
206206
207- $ clientRepository = new ClientRepository ($ moduleConfig , $ clientEntityFactory );
207+ $ database = Database::getInstance ();
208+ $ this ->services [Database::class] = $ database ;
209+
210+ $ clientRepository = new ClientRepository (
211+ $ moduleConfig ,
212+ $ database ,
213+ $ protocolCache ,
214+ $ clientEntityFactory ,
215+ );
208216 $ this ->services [ClientRepository::class] = $ clientRepository ;
209217
210218 $ userEntityFactory = new UserEntityFactory ($ helpers );
211219 $ this ->services [UserEntityFactory::class] = $ userEntityFactory ;
212220
213221 $ userRepository = new UserRepository (
214222 $ moduleConfig ,
223+ $ database ,
224+ $ protocolCache ,
215225 $ helpers ,
216226 $ userEntityFactory ,
217227 );
@@ -228,6 +238,8 @@ public function __construct()
228238
229239 $ authCodeRepository = new AuthCodeRepository (
230240 $ moduleConfig ,
241+ $ database ,
242+ $ protocolCache ,
231243 $ clientRepository ,
232244 $ authCodeEntityFactory ,
233245 $ helpers ,
@@ -252,6 +264,8 @@ public function __construct()
252264
253265 $ accessTokenRepository = new AccessTokenRepository (
254266 $ moduleConfig ,
267+ $ database ,
268+ $ protocolCache ,
255269 $ clientRepository ,
256270 $ accessTokenEntityFactory ,
257271 $ helpers ,
@@ -263,6 +277,8 @@ public function __construct()
263277
264278 $ refreshTokenRepository = new RefreshTokenRepository (
265279 $ moduleConfig ,
280+ $ database ,
281+ $ protocolCache ,
266282 $ accessTokenRepository ,
267283 $ refreshTokenEntityFactory ,
268284 $ helpers ,
@@ -272,12 +288,13 @@ public function __construct()
272288 $ scopeRepository = new ScopeRepository ($ moduleConfig , $ scopeEntityFactory );
273289 $ this ->services [ScopeRepository::class] = $ scopeRepository ;
274290
275- $ allowedOriginRepository = new AllowedOriginRepository ($ moduleConfig );
291+ $ allowedOriginRepository = new AllowedOriginRepository (
292+ $ moduleConfig ,
293+ $ database ,
294+ $ protocolCache ,
295+ );
276296 $ this ->services [AllowedOriginRepository::class] = $ allowedOriginRepository ;
277297
278- $ database = Database::getInstance ();
279- $ this ->services [Database::class] = $ database ;
280-
281298 $ databaseMigration = new DatabaseMigration ($ database );
282299 $ this ->services [DatabaseMigration::class] = $ databaseMigration ;
283300
0 commit comments