Skip to content

Commit 2ae0997

Browse files
bug #916 check for AbstractBundle (tacman)
This PR was squashed before being merged into the 1.x branch. Discussion ---------- check for AbstractBundle Commits ------- 0e363a5 check for AbstractBundle
2 parents e74319d + 0e363a5 commit 2ae0997

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SymfonyBundle.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ private function isBundleClass(string $class, string $path, bool $isPsr4): bool
107107
}
108108

109109
// heuristic that should work in almost all cases
110-
return false !== strpos(file_get_contents($classPath), 'Symfony\Component\HttpKernel\Bundle\Bundle');
110+
$classContents = file_get_contents($classPath);
111+
112+
return (false !== strpos($classContents, 'Symfony\Component\HttpKernel\Bundle\Bundle'))
113+
|| (false !== strpos($classContents, 'Symfony\Component\HttpKernel\Bundle\AbstractBundle'));
111114
}
112115
}

0 commit comments

Comments
 (0)