diff --git a/lib/Alchemy/Phrasea/Plugin/Management/AutoloaderGenerator.php b/lib/Alchemy/Phrasea/Plugin/Management/AutoloaderGenerator.php index e313ef0aea..71a65b6ab2 100644 --- a/lib/Alchemy/Phrasea/Plugin/Management/AutoloaderGenerator.php +++ b/lib/Alchemy/Phrasea/Plugin/Management/AutoloaderGenerator.php @@ -153,13 +153,13 @@ return array( EOF; foreach ($manifests as $manifest) { - $name = $this->quote($manifest->getName()); + $namespace = $this->quote('plugin-' . $manifest->getName()); $path = $this->pluginDirectory . DIRECTORY_SEPARATOR . $manifest->getName() . DIRECTORY_SEPARATOR . 'views'; if (is_dir($path)) { $path = $this->quote($path); $buffer .= << $path, + $namespace => $path, EOF; } diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php index 2cc62b5636..ab9ae1268f 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AutoloaderGeneratorTest.php @@ -63,7 +63,7 @@ class AutoloaderGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Vendor\CustomCommand', $cli['console']->find('hello:world')); $mapping = require $pluginsDir . '/twig-paths.php'; - $this->assertSame(array('TestPlugin' => $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/twig-views'), $mapping); + $this->assertSame(array('plugin-TestPlugin' => $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/twig-views'), $mapping); $this->cleanup($files); }