X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fdependency-injection%2FDefinition.php;h=7781220a97fec3b04542b705d944154490fb81a4;hp=1b3a1c24e9aa0269716c8a461ac1aab91c29e64a;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/symfony/dependency-injection/Definition.php b/vendor/symfony/dependency-injection/Definition.php index 1b3a1c24e..7781220a9 100644 --- a/vendor/symfony/dependency-injection/Definition.php +++ b/vendor/symfony/dependency-injection/Definition.php @@ -29,7 +29,7 @@ class Definition private $factoryService; private $shared = true; private $deprecated = false; - private $deprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed.'; + private $deprecationTemplate; private $scope = ContainerInterface::SCOPE_CONTAINER; private $properties = array(); private $calls = array(); @@ -44,6 +44,8 @@ class Definition private $autowired = false; private $autowiringTypes = array(); + private static $defaultDeprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed.'; + protected $arguments; /** @@ -379,7 +381,7 @@ class Definition public function addMethodCall($method, array $arguments = array()) { if (empty($method)) { - throw new InvalidArgumentException(sprintf('Method name cannot be empty.')); + throw new InvalidArgumentException('Method name cannot be empty.'); } $this->calls[] = array($method, $arguments); @@ -796,7 +798,7 @@ class Definition */ public function getDeprecationMessage($id) { - return str_replace('%service_id%', $id, $this->deprecationTemplate); + return str_replace('%service_id%', $id, $this->deprecationTemplate ?: self::$defaultDeprecationTemplate); } /**