You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error('The concept of container scopes is deprecated since version 2.8 and will be removed in 3.0. Omit the third parameter.', E_USER_DEPRECATED);
198
+
}
199
+
194
200
if (self::SCOPE_PROTOTYPE === $scope) {
195
201
thrownewInvalidArgumentException(sprintf('You cannot set service "%s" of scope "prototype".', $id));
196
202
}
@@ -397,9 +403,15 @@ public function getServiceIds()
397
403
* @throws InvalidArgumentException When the scope does not exist
398
404
*
399
405
* @api
406
+
*
407
+
* @deprecated since version 2.8, to be removed in 3.0.
400
408
*/
401
409
publicfunctionenterScope($name)
402
410
{
411
+
if ('request' !== $name) {
412
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
413
+
}
414
+
403
415
if (!isset($this->scopes[$name])) {
404
416
thrownewInvalidArgumentException(sprintf('The scope "%s" does not exist.', $name));
405
417
}
@@ -445,9 +457,15 @@ public function enterScope($name)
445
457
* @throws InvalidArgumentException if the scope is not active
446
458
*
447
459
* @api
460
+
*
461
+
* @deprecated since version 2.8, to be removed in 3.0.
448
462
*/
449
463
publicfunctionleaveScope($name)
450
464
{
465
+
if ('request' !== $name) {
466
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
467
+
}
468
+
451
469
if (!isset($this->scopedServices[$name])) {
452
470
thrownewInvalidArgumentException(sprintf('The scope "%s" is not active.', $name));
453
471
}
@@ -492,12 +510,17 @@ public function leaveScope($name)
492
510
* @throws InvalidArgumentException
493
511
*
494
512
* @api
513
+
*
514
+
* @deprecated since version 2.8, to be removed in 3.0.
495
515
*/
496
516
publicfunctionaddScope(ScopeInterface$scope)
497
517
{
498
518
$name = $scope->getName();
499
519
$parentScope = $scope->getParentName();
500
520
521
+
if ('request' !== $name) {
522
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
523
+
}
501
524
if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) {
502
525
thrownewInvalidArgumentException(sprintf('The scope "%s" is reserved.', $name));
503
526
}
@@ -526,9 +549,15 @@ public function addScope(ScopeInterface $scope)
526
549
* @return bool
527
550
*
528
551
* @api
552
+
*
553
+
* @deprecated since version 2.8, to be removed in 3.0.
529
554
*/
530
555
publicfunctionhasScope($name)
531
556
{
557
+
if ('request' !== $name) {
558
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
559
+
}
560
+
532
561
returnisset($this->scopes[$name]);
533
562
}
534
563
@@ -542,9 +571,13 @@ public function hasScope($name)
542
571
* @return bool
543
572
*
544
573
* @api
574
+
*
575
+
* @deprecated since version 2.8, to be removed in 3.0.
545
576
*/
546
577
publicfunctionisScopeActive($name)
547
578
{
579
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
0 commit comments