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
if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $id)) {
30
-
if (!class_exists($id) && !interface_exists($id)) {
31
-
$error = $definitioninstanceof ChildDefinition ?
32
-
'has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service' :
33
-
'name looks like a FQCN but the class does not exist';
34
-
35
-
thrownewInvalidArgumentException("Service definition \"{$id}\"{$error}. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.");
36
-
}
37
-
32
+
if (class_exists($id) || interface_exists($id, false)) {
38
33
$definition->setClass($id);
34
+
continue;
39
35
}
36
+
if ($definitioninstanceof ChildDefinition) {
37
+
thrownewInvalidArgumentException(\sprintf('Service definition "%s" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id));
38
+
}
39
+
40
+
trigger_deprecation('symfony/dependency-injection', '7.4', 'Service id "%s" looks like a FQCN but no corresponding class or interface exists. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class or interface.', $id);
41
+
// throw new InvalidArgumentException(\sprintf('Service id "%s" looks like a FQCN but no corresponding class or interface exists. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class or interface.'), $id);
$this->expectExceptionMessage('Service definition "Acme\UnknownClass" name looks like a FQCN but the class does not exist. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.');
// $this->expectExceptionMessage('Service id "Acme\UnknownClass" looks like a FQCN but no corresponding class or interface exists. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class or interface.');
106
+
$this->expectDeprecation('Since symfony/dependency-injection 7.4: Service id "Acme\UnknownClass" looks like a FQCN but no corresponding class or interface exists. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class or interface.');
0 commit comments