Skip to content

Commit

Permalink
Testing removing twig from production
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Hartless authored and Alan Hartless committed Nov 28, 2014
1 parent 6499fed commit 7f61f7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public function registerBundles()
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
Expand Down Expand Up @@ -157,6 +156,7 @@ public function registerBundles()
}

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\TwigBundle\TwigBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
Expand Down
7 changes: 0 additions & 7 deletions app/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ function ($v) { return (!empty($v)); }
),
'templating' => array(
'engines' => array(
'twig',
'php'
),
'form' => array(
Expand All @@ -98,12 +97,6 @@ function ($v) { return (!empty($v)); }
)*/
));

//Twig Configuration
$container->loadFromExtension('twig', array(
'debug' => '%kernel.debug%',
'strict_variables' => '%kernel.debug%'
));

//Doctrine Configuration
$container->loadFromExtension('doctrine', array(
'dbal' => array(
Expand Down
6 changes: 6 additions & 0 deletions app/config/config_dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
$loader->import("config.php");
$loader->import("security.php");

//Twig Configuration
$container->loadFromExtension('twig', array(
'debug' => '%kernel.debug%',
'strict_variables' => '%kernel.debug%'
));

$container->loadFromExtension('framework', array(
"router" => array(
"resource" => "%kernel.root_dir%/config/routing_dev.php",
Expand Down

0 comments on commit 7f61f7c

Please sign in to comment.