From 0f730d36ea29db76da62f07413411e653758ab53 Mon Sep 17 00:00:00 2001 From: Arkadiy Date: Mon, 20 Jul 2020 18:33:06 +0300 Subject: [PATCH] Added trim in getFullNamespace($filename) --- DependencyInjection/Compiler/MappingPass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;