Skip to content

Commit efbee56

Browse files
committed
bundle short name does not need to be computed
1 parent eaa1a5f commit efbee56

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

DependencyInjection/CmfCreateExtension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ public function load(array $configs, ContainerBuilder $container)
5555
$container->setParameter($this->getAlias().'.plain_text_types', $config['plain_text_types']);
5656

5757
if ($config['auto_mapping']) {
58-
foreach ($container->getParameter('kernel.bundles') as $class) {
58+
foreach ($container->getParameter('kernel.bundles') as $bundleShortName => $class) {
5959
$bundle = new \ReflectionClass($class);
60-
$classParts = explode('\\', $bundle->getName());
61-
$bundleShortName = $classParts[count($classParts)-1];
6260

6361
$rdfMappingDir = $container->getParameter('kernel.root_dir').'/Resources/'.$bundleShortName.'/rdf-mappings';
6462
if (file_exists($rdfMappingDir)) {

0 commit comments

Comments
 (0)