@@ -98,6 +98,7 @@ private function getDatabaseDefinitions(string $identifier, ConnectionConfigurat
98
98
$ connectionServiceId = $ config ->getConnection ();
99
99
$ namingStrategyServiceId = self ::DEFAULT_NAMING_STRATEGY_ID . $ identifierSuffix ;
100
100
$ schemaLockFileDumperServiceId = SchemaLockFileDumper::class . $ identifierSuffix ;
101
+ $ lockFileSchemaManagerServiceId = LockFileSchemaManager::class . $ identifierSuffix ;
101
102
102
103
// Now let's create the DAOs.
103
104
$ tdbmLockFilePath = $ this ->getLockFilePath ($ config ->getConnection ());
@@ -121,11 +122,11 @@ private function getDatabaseDefinitions(string $identifier, ConnectionConfigurat
121
122
122
123
return array_merge ([
123
124
$ configurationServiceId => $ this ->getConfigurationDefinition ($ config , $ namingStrategyServiceId ),
124
- $ namingStrategyServiceId => $ this ->getNamingStrategyDefinition ($ config , $ schemaManagerServiceId ),
125
+ $ namingStrategyServiceId => $ this ->getNamingStrategyDefinition ($ config , $ lockFileSchemaManagerServiceId ),
125
126
TDBMService::class . $ identifierSuffix => $ this ->getTDBMServiceDefinition ($ configurationServiceId ),
126
127
GenerateCommand::class . $ identifierSuffix => $ this ->getGenerateCommandDefinition ($ commandName , $ configurationServiceId ),
127
128
$ schemaManagerServiceId => $ this ->getSchemaManagerDefinition ($ connectionServiceId ),
128
- LockFileSchemaManager::class . $ identifierSuffix => $ this ->getLockFileSchemaManagerDefinition ($ schemaLockFileDumperServiceId ),
129
+ $ lockFileSchemaManagerServiceId => $ this ->getLockFileSchemaManagerDefinition ($ schemaManagerServiceId , $ schemaLockFileDumperServiceId ),
129
130
$ schemaLockFileDumperServiceId => $ this ->getSchemaLockFileDumperDefinition ($ connectionServiceId , 'tdbm ' . $ identifierSuffix . '.lock.yml ' ),
130
131
], $ daos );
131
132
}
@@ -250,9 +251,10 @@ private function getSchemaManagerDefinition(string $connectionServiceId): Defini
250
251
return $ schemaManager ;
251
252
}
252
253
253
- private function getLockFileSchemaManagerDefinition (string $ schemaLockFileDumperServiceId ): Definition
254
+ private function getLockFileSchemaManagerDefinition (string $ schemaManagerServiceId , string $ schemaLockFileDumperServiceId ): Definition
254
255
{
255
256
$ lockFileSchemaManager = $ this ->nD (LockFileSchemaManager::class);
257
+ $ lockFileSchemaManager ->setDecoratedService ($ schemaManagerServiceId );
256
258
$ lockFileSchemaManager ->setArgument (0 , new Reference ('TheCodingMachine\TDBM\Schema\LockFileSchemaManager.inner ' ));
257
259
$ lockFileSchemaManager ->setArgument (1 , new Reference ($ schemaLockFileDumperServiceId ));
258
260
0 commit comments