Skip to content

Commit

Permalink
Merge pull request #6 from jolicode/feature/working-from-sf23-to-sf30
Browse files Browse the repository at this point in the history
Make bundle work with symfony 2.3 to symfony 3.0
  • Loading branch information
pyrech committed Jan 18, 2016
2 parents b2a29ad + c562636 commit 75aed45
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GifExceptionBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ public function build(ContainerBuilder $container)

$container->addCompilerPass(new PrepareTwigPass(), PassConfig::TYPE_BEFORE_REMOVING);
}

public function getParent()
{
return 'TwigBundle';
}
}
6 changes: 6 additions & 0 deletions Tests/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public function registerBundles()
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
if (version_compare(self::VERSION, '2.7.0', '>=')) {
$loader->load($this->getRootDir() . '/config/config_27.yml');

return;
}

$loader->load($this->getRootDir() . '/config/config.yml');
}
}
4 changes: 4 additions & 0 deletions Tests/app/config/config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
framework:
templating: { engines: ['twig'] }
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
secret: "ThisTokenIsEnoughSecretForOurTests"
3 changes: 3 additions & 0 deletions Tests/app/config/config_27.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
secret: "ThisTokenIsEnoughSecretForOurTests"
assets: ~
Empty file added Tests/app/config/routing.yml
Empty file.

0 comments on commit 75aed45

Please sign in to comment.