@@ -153,11 +153,11 @@ private function registerClientConfiguration(array $config, ContainerBuilder $co
153153 $ storageDriver = $ driverId ;
154154
155155 if (isset ($ config ['client ' ]['storage ' ]['decorator ' ])) {
156- $ decoratorRef = ltrim ( $ config ['client ' ]['storage ' ]['decorator ' ], ' @ ' ) ;
157- $ container ->getDefinition ($ decoratorRef )
156+ $ decoratorId = $ config ['client ' ]['storage ' ]['decorator ' ];
157+ $ container ->getDefinition ($ decoratorId )
158158 ->addArgument (new Reference ($ driverId ));
159159
160- $ storageDriver = $ decoratorRef ;
160+ $ storageDriver = $ decoratorId ;
161161 }
162162
163163 // Alias the DriverInterface in use for autowiring
@@ -217,28 +217,26 @@ private function registerPingConfiguration(array $config, ContainerBuilder $cont
217217 }
218218
219219 foreach ((array ) $ config ['ping ' ]['services ' ] as $ pingService ) {
220+ $ serviceId = $ pingService ['name ' ];
221+
220222 switch ($ pingService ['type ' ]) {
221223 case Configuration::PING_SERVICE_TYPE_DOCTRINE :
222- $ serviceRef = ltrim ($ pingService ['name ' ], '@ ' );
223-
224224 $ definition = new ChildDefinition ('gos_web_socket.periodic_ping.doctrine ' );
225- $ definition ->addArgument (new Reference ($ serviceRef ));
225+ $ definition ->addArgument (new Reference ($ serviceId ));
226226 $ definition ->addArgument ($ pingService ['interval ' ]);
227227 $ definition ->addTag ('gos_web_socket.periodic ' );
228228
229- $ container ->setDefinition ('gos_web_socket.periodic_ping.doctrine. ' .$ serviceRef , $ definition );
229+ $ container ->setDefinition ('gos_web_socket.periodic_ping.doctrine. ' .$ serviceId , $ definition );
230230
231231 break ;
232232
233233 case Configuration::PING_SERVICE_TYPE_PDO :
234- $ serviceRef = ltrim ($ pingService ['name ' ], '@ ' );
235-
236234 $ definition = new ChildDefinition ('gos_web_socket.periodic_ping.pdo ' );
237- $ definition ->addArgument (new Reference ($ serviceRef ));
235+ $ definition ->addArgument (new Reference ($ serviceId ));
238236 $ definition ->addArgument ($ pingService ['interval ' ]);
239237 $ definition ->addTag ('gos_web_socket.periodic ' );
240238
241- $ container ->setDefinition ('gos_web_socket.periodic_ping.pdo. ' .$ serviceRef , $ definition );
239+ $ container ->setDefinition ('gos_web_socket.periodic_ping.pdo. ' .$ serviceId , $ definition );
242240
243241 break ;
244242
@@ -250,8 +248,6 @@ private function registerPingConfiguration(array $config, ContainerBuilder $cont
250248
251249 private function registerPushersConfiguration (array $ config , ContainerBuilder $ container ): void
252250 {
253- $ usesSymfony51Api = method_exists (Definition::class, 'getDeprecation ' );
254-
255251 if (!isset ($ config ['pushers ' ])) {
256252 // Remove all of the pushers
257253 foreach (['gos_web_socket.pusher.amqp ' , 'gos_web_socket.pusher.wamp ' ] as $ pusher ) {
@@ -265,6 +261,8 @@ private function registerPushersConfiguration(array $config, ContainerBuilder $c
265261 return ;
266262 }
267263
264+ $ usesSymfony51Api = method_exists (Definition::class, 'getDeprecation ' );
265+
268266 if (isset ($ config ['pushers ' ]['amqp ' ]) && $ this ->isConfigEnabled ($ container , $ config ['pushers ' ]['amqp ' ])) {
269267 // Pull the 'enabled' field out of the pusher's config
270268 $ factoryConfig = $ config ['pushers ' ]['amqp ' ];
@@ -342,12 +340,12 @@ private function registerPushersConfiguration(array $config, ContainerBuilder $c
342340
343341 private function registerWebsocketClientConfiguration (array $ config , ContainerBuilder $ container ): void
344342 {
345- $ usesSymfony51Api = method_exists (Definition::class, 'getDeprecation ' );
346-
347343 if (!$ config ['websocket_client ' ]['enabled ' ]) {
348344 return ;
349345 }
350346
347+ $ usesSymfony51Api = method_exists (Definition::class, 'getDeprecation ' );
348+
351349 // Pull the 'enabled' field out of the client's config
352350 $ factoryConfig = $ config ['websocket_client ' ];
353351 unset($ factoryConfig ['enabled ' ]);
0 commit comments