This topic contains 3 replies, has 2 voices, and was last updated by Jaimy 10 years, 3 months ago.
- Topic
Hi fellow oro’ers,
I’ve been working on a small project and noticed something weird when generating the bundle from commandline.
In the ORO platform v1.0.0-alpha5 the bundles are correctly registered, but there have been a whole bunch of improvements since. I’m not sure whether this is a Symfony bug or a ORO bug (maybe it’s not even a bug?). Below I will give a step by step on what I’ve done to generate the bundle:
1. In terminal:
app/console generate:bundle
To generate a new bundle in symfony.
2. For this example I’ve used the bundle namespace “Acme/Bundle/BlogBundle” to see whether this is a generic error or just my incompetence ;):)
3. I’ve used the suggested bundle name “AcmeBlogBundle”
4. The target directory is the default directory for Bundles, in my case this is “/Users/jaimy/Development/oro-beta4/src”
5. The format for the generated configuration is “yml”
6. I want to generate the whole directory structure so the paramater is “yes”
7. Confirm the generation => “yes”
Next it will generate the bundle and I’ve confirmed that I want to register the bundle in the AppKernel and I want to update the routing automaticly.
Bundle generationGenerating the bundle code: OK
Checking that the bundle is autoloaded: OK
Confirm automatic update of your Kernel [yes]?
Enabling the bundle inside the Kernel: OK
Confirm automatic update of the Routing [yes]?
Importing the bundle routing resource: OK9. So everything went “OK” according to the generation script, except that when I look in the /app/AppKernel.php I notice that my bundle (Acme/Bundle/BlogBundle) is not added properly to the other bundles.
class AppKernel extends OroKernel
{
public function registerBundles()
{,
new Acme\Bundle\BlogBundle\AcmeBlogBundle(),
$bundles = array();if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}if (in_array($this->getEnvironment(), array('test', 'perf'))) {
$bundles[] = new Oro\Bundle\TestFrameworkBundle\OroTestFrameworkBundle();
}return array_merge(parent::registerBundles(), $bundles);
}public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}So I’m not sure what happened but this is not correct :P. Since I’m getting the error:
Parse error: syntax error, unexpected ',' in /Users/jaimy/Development/oro-beta4/app/AppKernel.php on line 11
which is expected. Anyone else experiencing this issue/bug?
##updated with some images for visual support
Complete walk through bundle generation
AppKernel.php bundle registry
The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.