From b880c3eea048bc2b77f13649ac6ab97a18e6a7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Yan?= Date: Fri, 23 Feb 2018 17:30:53 +0100 Subject: [PATCH] Fix warnings `The class does not exists.` --- DependencyInjection/Compiler/AddPropelTagPass.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Compiler/AddPropelTagPass.php b/DependencyInjection/Compiler/AddPropelTagPass.php index 8484b4e..b74de5f 100644 --- a/DependencyInjection/Compiler/AddPropelTagPass.php +++ b/DependencyInjection/Compiler/AddPropelTagPass.php @@ -51,7 +51,10 @@ protected function getPropelModels(ContainerBuilder $container) $path = preg_replace('/(.+)\.php/', '$1', $path); $path = str_replace('/', '\\', $path); - $classes[] = $path; + $base = str_replace('Propel', 'Propel\\Base', $path); + if (class_exists($base)) { + $classes[] = $path; + } } return $classes;