1
0
Fork 0

Add validation warning for prs-0/4 definitions without namespace prefix, refs #3202

pull/4432/head
Jordi Boggiano 2015-09-20 19:29:39 +01:00
parent e61b3a6370
commit ae23979dfa
1 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,14 @@ class ConfigValidator
}
}
// check for empty psr-0/psr-4 namespace prefixes
if (isset($manifest['autoload']['psr-0'][''])) {
$warnings[] = "Defining autoload.psr-0 with an empty namespace prefix is a bad idea for performance";
}
if (isset($manifest['autoload']['psr-4'][''])) {
$warnings[] = "Defining autoload.psr-4 with an empty namespace prefix is a bad idea for performance";
}
try {
$loader = new ValidatingArrayLoader(new ArrayLoader(), true, null, $arrayLoaderValidationFlags);
if (!isset($manifest['version'])) {