A fresh symfony 2 install does not contain any routing for the production environment.
If you take a look under app/config/routing_dev.yml
, you will notice that all of the routes that you see in the demo application are defined only for development. If you wish to test the demo on app.php
, you have to first copy the routing from routing_dev.yml
to routing.yml
, and also enable the AcmeDemoBundle
under you AppKernel.php
:
$bundles = array(
new SymfonyBundleFrameworkBundleFrameworkBundle(),
new SymfonyBundleSecurityBundleSecurityBundle(),
new SymfonyBundleTwigBundleTwigBundle(),
new SymfonyBundleMonologBundleMonologBundle(),
new SymfonyBundleSwiftmailerBundleSwiftmailerBundle(),
new SymfonyBundleDoctrineBundleDoctrineBundle(),
new SymfonyBundleAsseticBundleAsseticBundle(),
new SensioBundleFrameworkExtraBundleSensioFrameworkExtraBundle(),
new JMSSecurityExtraBundleJMSSecurityExtraBundle(),
+ new AcmeDemoBundleAcmeDemoBundle()
}
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
- $bundles[] = new AcmeDemoBundleAcmeDemoBundle();
$bundles[] = new SymfonyBundleWebProfilerBundleWebProfilerBundle();
$bundles[] = new SensioBundleDistributionBundleSensioDistributionBundle();
$bundles[] = new SensioBundleGeneratorBundleSensioGeneratorBundle();
}
(+ is the line you should add, - is the line you should remove)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…