Hardcoded -2 fails when namespace is longer. E.g. namespace="Sensio\Bundle\HelloBundle\Model"
This commit is contained in:
parent
06b5f2783d
commit
d5ce54b7de
|
@ -58,7 +58,8 @@ abstract class PhingCommand extends ContainerAwareCommand
|
|||
$schemas = $finder->files()->name('*schema.xml')->followLinks()->in($dir);
|
||||
|
||||
$parts = explode(DIRECTORY_SEPARATOR, realpath($bundle->getPath()));
|
||||
$prefix = implode('.', array_slice($parts, 1, -2));
|
||||
$length = count(explode('\\', $bundle->getNamespace())) * (-1);
|
||||
$prefix = implode('.', array_slice($parts, 1, $length));
|
||||
|
||||
foreach ($schemas as $schema) {
|
||||
$tempSchema = md5($schema).'_'.$schema->getBaseName();
|
||||
|
|
Loading…
Reference in a new issue