Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
removed deprecated class
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 20, 2015
1 parent 4c01a36 commit 29013a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 59 deletions.
1 change: 1 addition & 0 deletions doc/changelog.rst
Expand Up @@ -4,6 +4,7 @@ Changelog
1.3.0 (2015-XX-XX)
------------------

* removed deprecated TwigCoreExtension class (register the new HttpFragmentServiceProvider instead)
* bumped minimum version of PHP to 5.3.9

1.2.3 (2015-01-20)
Expand Down
56 changes: 0 additions & 56 deletions src/Silex/Provider/TwigCoreExtension.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/Silex/Provider/TwigServiceProvider.php
Expand Up @@ -68,9 +68,6 @@ public function register(Application $app)
$app['fragment.renderer.hinclude']->setTemplating($twig);

$twig->addExtension(new HttpKernelExtension($app['fragment.handler']));
} else {
// fallback for BC, to be removed in 1.3
$twig->addExtension(new TwigCoreExtension());
}

if (isset($app['form.factory'])) {
Expand Down
6 changes: 6 additions & 0 deletions tests/Silex/Tests/Provider/TwigServiceProviderTest.php
Expand Up @@ -13,6 +13,7 @@

use Silex\Application;
use Silex\Provider\TwigServiceProvider;
use Silex\Provider\HttpFragmentServiceProvider;
use Symfony\Component\HttpFoundation\Request;

/**
Expand Down Expand Up @@ -41,8 +42,13 @@ public function testRegisterAndRender()

public function testRenderFunction()
{
if (!class_exists('Symfony\Component\HttpFoundation\RequestStack')) {
$this->markTestSkipped();
}

$app = new Application();

$app->register(new HttpFragmentServiceProvider());
$app->register(new TwigServiceProvider(), array(
'twig.templates' => array(
'hello' => '{{ render("/foo") }}',
Expand Down

0 comments on commit 29013a9

Please sign in to comment.