Skip to content

Commit c4b1189

Browse files
committed
improve deprecation messages
1 parent 047fb12 commit c4b1189

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TypedReference.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TypedReference extends Reference
2929
public function __construct(string $id, string $type, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
3030
{
3131
if (\is_string($invalidBehavior) || 3 < \func_num_args()) {
32-
@trigger_error(sprintf('The $requiringClass argument of "%s" is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
32+
@trigger_error(sprintf('The $requiringClass argument of "%s()" is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
3333

3434
$this->requiringClass = $invalidBehavior;
3535
$invalidBehavior = 3 < \func_num_args() ? \func_get_arg(3) : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
@@ -48,7 +48,7 @@ public function getType()
4848
*/
4949
public function getRequiringClass()
5050
{
51-
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
51+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
5252

5353
return $this->requiringClass ?? '';
5454
}
@@ -58,7 +58,7 @@ public function getRequiringClass()
5858
*/
5959
public function canBeAutoregistered()
6060
{
61-
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
61+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
6262

6363
return $this->requiringClass && (false !== $i = strpos($this->type, '\\')) && 0 === strncasecmp($this->type, $this->requiringClass, 1 + $i);
6464
}

0 commit comments

Comments
 (0)