@@ -79,7 +79,7 @@ public function __construct()
79
79
*/
80
80
protected function getBarService ()
81
81
{
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 ?: '_ ' };
83
83
84
84
$ this ->services ['bar ' ] = $ instance = new \Bar \FooClass ('foo ' , $ a , $ this ->getParameter ('foo_bar ' ));
85
85
@@ -97,7 +97,7 @@ protected function getBazService()
97
97
{
98
98
$ this ->services ['baz ' ] = $ instance = new \Baz ();
99
99
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 ?: '_ ' });
101
101
102
102
return $ instance ;
103
103
}
@@ -125,7 +125,7 @@ protected function getConfiguredServiceSimpleService()
125
125
{
126
126
$ this ->services ['configured_service_simple ' ] = $ instance = new \stdClass ();
127
127
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 );
129
129
130
130
return $ instance ;
131
131
}
@@ -181,7 +181,7 @@ protected function getDeprecatedServiceService()
181
181
*/
182
182
protected function getFactoryServiceService ()
183
183
{
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 ();
185
185
}
186
186
187
187
/**
@@ -201,14 +201,14 @@ protected function getFactoryServiceSimpleService()
201
201
*/
202
202
protected function getFooService ()
203
203
{
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 ?: '_ ' };
205
205
206
206
$ this ->services ['foo ' ] = $ instance = \Bar \FooClass::getInstance ('foo ' , $ a , array ($ this ->getParameter ('foo ' ) => 'foo is ' .$ this ->getParameter ('foo ' ).'' , 'foobar ' => $ this ->getParameter ('foo ' )), true , $ this );
207
207
208
208
$ instance ->foo = 'bar ' ;
209
209
$ instance ->moo = $ a ;
210
210
$ 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 ?: '_ ' });
212
212
$ instance ->initialize ();
213
213
sc_configure ($ instance );
214
214
@@ -238,7 +238,7 @@ protected function getFooBarService()
238
238
{
239
239
$ class = $ this ->getParameter ('foo_class ' );
240
240
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 ?: '_ ' });
242
242
}
243
243
244
244
/**
@@ -263,7 +263,7 @@ protected function getFooWithInlineService()
263
263
protected function getLazyContextService ()
264
264
{
265
265
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 ?: '_ ' };
267
267
yield 'k2 ' => $ this ;
268
268
}, 2 ), new RewindableGenerator (function () {
269
269
return new \EmptyIterator ();
@@ -278,7 +278,7 @@ protected function getLazyContextService()
278
278
protected function getLazyContextIgnoreInvalidRefService ()
279
279
{
280
280
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 ?: '_ ' };
282
282
if ($ this ->has ('invalid ' )) {
283
283
yield 1 => $ {($ _ = isset ($ this ->services ['invalid ' ]) ? $ this ->services ['invalid ' ] : $ this ->get ('invalid ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' };
284
284
}
@@ -300,15 +300,15 @@ protected function getMethodCall1Service()
300
300
301
301
$ this ->services ['method_call1 ' ] = $ instance = new \Bar \FooClass ();
302
302
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 ?: '_ ' });
304
304
$ instance ->setBar ($ {($ _ = isset ($ this ->services ['foo2 ' ]) ? $ this ->services ['foo2 ' ] : $ this ->get ('foo2 ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' });
305
305
if ($ this ->has ('foo3 ' )) {
306
306
$ instance ->setBar ($ {($ _ = isset ($ this ->services ['foo3 ' ]) ? $ this ->services ['foo3 ' ] : $ this ->get ('foo3 ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' });
307
307
}
308
308
if ($ this ->has ('foobaz ' )) {
309
309
$ instance ->setBar ($ {($ _ = isset ($ this ->services ['foobaz ' ]) ? $ this ->services ['foobaz ' ] : $ this ->get ('foobaz ' , ContainerInterface::NULL_ON_INVALID_REFERENCE )) && false ?: '_ ' });
310
310
}
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 " ))));
312
312
313
313
return $ instance ;
314
314
}
@@ -346,7 +346,7 @@ protected function getConfiguratorServiceService()
346
346
{
347
347
$ this ->services ['configurator_service ' ] = $ instance = new \ConfClass ();
348
348
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 ?: '_ ' });
350
350
351
351
return $ instance ;
352
352
}
@@ -365,9 +365,13 @@ protected function getConfiguratorServiceSimpleService()
365
365
* Gets the private 'factory_simple' shared service.
366
366
*
367
367
* @return \SimpleFactoryClass
368
+ *
369
+ * @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
368
370
*/
369
371
protected function getFactorySimpleService ()
370
372
{
373
+ @trigger_error ('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed. ' , E_USER_DEPRECATED );
374
+
371
375
return $ this ->services ['factory_simple ' ] = new \SimpleFactoryClass ('foo ' );
372
376
}
373
377
@@ -381,7 +385,7 @@ protected function getInlinedService()
381
385
$ this ->services ['inlined ' ] = $ instance = new \Bar ();
382
386
383
387
$ 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 ?: '_ ' });
385
389
386
390
return $ instance ;
387
391
}
0 commit comments