@@ -79,7 +79,7 @@ public function __construct()
7979 */
8080 protected function getBarService ()
8181 {
82- $ a = $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->get ( ' foo.baz ' )) && false ?: '_ ' };
82+ $ a = $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->getFoo_BazService ( )) && false ?: '_ ' };
8383
8484 $ this ->services ['bar ' ] = $ instance = new \Bar \FooClass ('foo ' , $ a , $ this ->getParameter ('foo_bar ' ));
8585
@@ -97,7 +97,7 @@ protected function getBazService()
9797 {
9898 $ this ->services ['baz ' ] = $ instance = new \Baz ();
9999
100- $ instance ->setFoo ($ {($ _ = isset ($ this ->services ['foo_with_inline ' ]) ? $ this ->services ['foo_with_inline ' ] : $ this ->get ( ' foo_with_inline ' )) && false ?: '_ ' });
100+ $ instance ->setFoo ($ {($ _ = isset ($ this ->services ['foo_with_inline ' ]) ? $ this ->services ['foo_with_inline ' ] : $ this ->getFooWithInlineService ( )) && false ?: '_ ' });
101101
102102 return $ instance ;
103103 }
@@ -125,7 +125,7 @@ protected function getConfiguredServiceSimpleService()
125125 {
126126 $ this ->services ['configured_service_simple ' ] = $ instance = new \stdClass ();
127127
128- $ {($ _ = isset ($ this ->services ['configurator_service_simple ' ]) ? $ this ->services ['configurator_service_simple ' ] : $ this ->getConfiguratorServiceSimpleService ( )) && false ?: '_ ' }->configureStdClass ($ instance );
128+ $ {($ _ = isset ($ this ->services ['configurator_service_simple ' ]) ? $ this ->services ['configurator_service_simple ' ] : $ this ->services [ ' configurator_service_simple ' ] = new \ ConfClass ( ' bar ' )) && false ?: '_ ' }->configureStdClass ($ instance );
129129
130130 return $ instance ;
131131 }
@@ -181,7 +181,7 @@ protected function getDeprecatedServiceService()
181181 */
182182 protected function getFactoryServiceService ()
183183 {
184- return $ this ->services ['factory_service ' ] = $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->get ( ' foo.baz ' )) && false ?: '_ ' }->getInstance ();
184+ return $ this ->services ['factory_service ' ] = $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->getFoo_BazService ( )) && false ?: '_ ' }->getInstance ();
185185 }
186186
187187 /**
@@ -201,14 +201,14 @@ protected function getFactoryServiceSimpleService()
201201 */
202202 protected function getFooService ()
203203 {
204- $ a = $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->get ( ' foo.baz ' )) && false ?: '_ ' };
204+ $ a = $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->getFoo_BazService ( )) && false ?: '_ ' };
205205
206206 $ this ->services ['foo ' ] = $ instance = \Bar \FooClass::getInstance ('foo ' , $ a , array ($ this ->getParameter ('foo ' ) => 'foo is ' .$ this ->getParameter ('foo ' ).'' , 'foobar ' => $ this ->getParameter ('foo ' )), true , $ this );
207207
208208 $ instance ->foo = 'bar ' ;
209209 $ instance ->moo = $ a ;
210210 $ instance ->qux = array ($ this ->getParameter ('foo ' ) => 'foo is ' .$ this ->getParameter ('foo ' ).'' , 'foobar ' => $ this ->getParameter ('foo ' ));
211- $ instance ->setBar ($ {($ _ = isset ($ this ->services ['bar ' ]) ? $ this ->services ['bar ' ] : $ this ->get ( ' bar ' )) && false ?: '_ ' });
211+ $ instance ->setBar ($ {($ _ = isset ($ this ->services ['bar ' ]) ? $ this ->services ['bar ' ] : $ this ->getBarService ( )) && false ?: '_ ' });
212212 $ instance ->initialize ();
213213 sc_configure ($ instance );
214214
@@ -238,7 +238,7 @@ protected function getFooBarService()
238238 {
239239 $ class = $ this ->getParameter ('foo_class ' );
240240
241- return new $ class ($ {($ _ = isset ($ this ->services ['deprecated_service ' ]) ? $ this ->services ['deprecated_service ' ] : $ this ->get ( ' deprecated_service ' )) && false ?: '_ ' });
241+ return new $ class ($ {($ _ = isset ($ this ->services ['deprecated_service ' ]) ? $ this ->services ['deprecated_service ' ] : $ this ->getDeprecatedServiceService ( )) && false ?: '_ ' });
242242 }
243243
244244 /**
@@ -263,7 +263,7 @@ protected function getFooWithInlineService()
263263 protected function getLazyContextService ()
264264 {
265265 return $ this ->services ['lazy_context ' ] = new \LazyContext (new RewindableGenerator (function () {
266- yield 'k1 ' => $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->get ( ' foo.baz ' )) && false ?: '_ ' };
266+ yield 'k1 ' => $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->getFoo_BazService ( )) && false ?: '_ ' };
267267 yield 'k2 ' => $ this ;
268268 }, 2 ), new RewindableGenerator (function () {
269269 return new \EmptyIterator ();
@@ -278,7 +278,7 @@ protected function getLazyContextService()
278278 protected function getLazyContextIgnoreInvalidRefService ()
279279 {
280280 return $ this ->services ['lazy_context_ignore_invalid_ref ' ] = new \LazyContext (new RewindableGenerator (function () {
281- yield 0 => $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->get ( ' foo.baz ' )) && false ?: '_ ' };
281+ yield 0 => $ {($ _ = isset ($ this ->services ['foo.baz ' ]) ? $ this ->services ['foo.baz ' ] : $ this ->getFoo_BazService ( )) && false ?: '_ ' };
282282 if ($ this ->has ('invalid ' )) {
283283 yield 1 => $ {($ _ = isset ($ this ->services ['invalid ' ]) ? $ this ->services ['invalid ' ] : $ this ->get ('invalid ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' };
284284 }
@@ -300,15 +300,15 @@ protected function getMethodCall1Service()
300300
301301 $ this ->services ['method_call1 ' ] = $ instance = new \Bar \FooClass ();
302302
303- $ instance ->setBar ($ {($ _ = isset ($ this ->services ['foo ' ]) ? $ this ->services ['foo ' ] : $ this ->get ( ' foo ' )) && false ?: '_ ' });
303+ $ instance ->setBar ($ {($ _ = isset ($ this ->services ['foo ' ]) ? $ this ->services ['foo ' ] : $ this ->getFooService ( )) && false ?: '_ ' });
304304 $ instance ->setBar ($ {($ _ = isset ($ this ->services ['foo2 ' ]) ? $ this ->services ['foo2 ' ] : $ this ->get ('foo2 ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' });
305305 if ($ this ->has ('foo3 ' )) {
306306 $ instance ->setBar ($ {($ _ = isset ($ this ->services ['foo3 ' ]) ? $ this ->services ['foo3 ' ] : $ this ->get ('foo3 ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' });
307307 }
308308 if ($ this ->has ('foobaz ' )) {
309309 $ instance ->setBar ($ {($ _ = isset ($ this ->services ['foobaz ' ]) ? $ this ->services ['foobaz ' ] : $ this ->get ('foobaz ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' });
310310 }
311- $ instance ->setBar (($ {($ _ = isset ($ this ->services ['foo ' ]) ? $ this ->services ['foo ' ] : $ this ->get ( ' foo ' )) && false ?: '_ ' }->foo () . (($ this ->hasParameter ("foo " )) ? ($ this ->getParameter ("foo " )) : ("default " ))));
311+ $ instance ->setBar (($ {($ _ = isset ($ this ->services ['foo ' ]) ? $ this ->services ['foo ' ] : $ this ->getFooService ( )) && false ?: '_ ' }->foo () . (($ this ->hasParameter ("foo " )) ? ($ this ->getParameter ("foo " )) : ("default " ))));
312312
313313 return $ instance ;
314314 }
@@ -346,7 +346,7 @@ protected function getConfiguratorServiceService()
346346 {
347347 $ this ->services ['configurator_service ' ] = $ instance = new \ConfClass ();
348348
349- $ instance ->setFoo ($ {($ _ = isset ($ this ->services ['baz ' ]) ? $ this ->services ['baz ' ] : $ this ->get ( ' baz ' )) && false ?: '_ ' });
349+ $ instance ->setFoo ($ {($ _ = isset ($ this ->services ['baz ' ]) ? $ this ->services ['baz ' ] : $ this ->getBazService ( )) && false ?: '_ ' });
350350
351351 return $ instance ;
352352 }
@@ -365,9 +365,13 @@ protected function getConfiguratorServiceSimpleService()
365365 * Gets the private 'factory_simple' shared service.
366366 *
367367 * @return \SimpleFactoryClass
368+ *
369+ * @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
368370 */
369371 protected function getFactorySimpleService ()
370372 {
373+ @trigger_error ('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed. ' , E_USER_DEPRECATED );
374+
371375 return $ this ->services ['factory_simple ' ] = new \SimpleFactoryClass ('foo ' );
372376 }
373377
@@ -381,7 +385,7 @@ protected function getInlinedService()
381385 $ this ->services ['inlined ' ] = $ instance = new \Bar ();
382386
383387 $ instance ->pub = 'pub ' ;
384- $ instance ->setBaz ($ {($ _ = isset ($ this ->services ['baz ' ]) ? $ this ->services ['baz ' ] : $ this ->get ( ' baz ' )) && false ?: '_ ' });
388+ $ instance ->setBaz ($ {($ _ = isset ($ this ->services ['baz ' ]) ? $ this ->services ['baz ' ] : $ this ->getBazService ( )) && false ?: '_ ' });
385389
386390 return $ instance ;
387391 }
0 commit comments