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
"Service '%s': Method %s::%s() does not meet the requirements: is create(\$name), get(\$name), create*() or get*() and is non-static.",
46
-
$this->getName(),
45
+
"[%s]\nMethod %s::%s() does not meet the requirements: is create(\$name), get(\$name), create*() or get*() and is non-static.",
46
+
$this->getDescriptor(),
47
47
$interface,
48
48
$method->name
49
49
));
50
50
}
51
51
52
52
if ($method->getNumberOfParameters() === 0) {
53
53
try {
54
-
Nette\DI\Helpers::ensureClassType(Nette\Utils\Type::fromReflection($method), "return type of $interface::$method->name()", true);
54
+
Nette\DI\Helpers::ensureClassType(Nette\Utils\Type::fromReflection($method), "return type of $interface::$method->name()", $this->getDescriptor(), true);
thrownewServiceCreationException(sprintf("%s is not expected to be %sunion/intersection/built-in, '%s' given.", ucfirst($hint), $allowNullable ? '' : 'nullable/', $type));
243
+
thrownewServiceCreationException(sprintf("%s%s is not expected to be %sunion/intersection/built-in, '%s' given.", $descriptor, ucfirst($hint), $allowNullable ? '' : 'nullable/', $type));
239
244
}
240
245
241
246
$class = $type->getSingleName();
242
247
if (!class_exists($class) && !interface_exists($class)) {
243
-
thrownewServiceCreationException(sprintf("Class '%s' not found.\nCheck the %s.", $class, $hint));
248
+
thrownewServiceCreationException(sprintf("%sClass '%s' not found.\nCheck the %s.", $descriptor, $class, $hint));
244
249
}
245
250
246
251
return$class;
@@ -282,4 +287,25 @@ public static function convertType($value, string $type)
0 commit comments