Skip to content

Commit 141c72d

Browse files
committed
do not overwrite bundle_name and bundle_fqn if already set
1 parent 17e06d1 commit 141c72d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

resources/config/default.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
if (preg_match('&/([a-zA-Z]+?)Bundle&', $kernelRootDir, $matches)) {
77
$bundleName = $matches[1].'Bundle';
88
$bundleFQN = 'Symfony\\Cmf\\Bundle\\'.$matches[1].'Bundle';
9-
$container->setParameter('cmf_testing.bundle_name', $bundleName);
10-
$container->setParameter('cmf_testing.bundle_fqn', $bundleFQN);
9+
if (!$container->hasParameter('cmf_testing.bundle_name')) {
10+
$container->setParameter('cmf_testing.bundle_name', $bundleName);
11+
}
12+
if (!$container->hasParameter('cmf_testing.bundle_fqn')) {
13+
$container->setParameter('cmf_testing.bundle_fqn', $bundleFQN);
14+
}
1115
}
1216

1317
$loader->import('dist/parameters.yml');

0 commit comments

Comments
 (0)