diff --git a/DependencyInjection/Compiler/MappingPass.php b/DependencyInjection/Compiler/MappingPass.php index 4bdd3be9..4efda26e 100644 --- a/DependencyInjection/Compiler/MappingPass.php +++ b/DependencyInjection/Compiler/MappingPass.php @@ -165,7 +165,7 @@ private function getFullNamespace($filename) $lines = preg_grep('/^namespace /', file($filename)); $namespaceLine = array_shift($lines); $match = array(); - preg_match('/^namespace (.*);$/', $namespaceLine, $match); + preg_match('/^namespace (.*);$/', trim($namespaceLine), $match); $fullNamespace = array_pop($match); return $fullNamespace;