Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 942e80b

Browse filesBrowse files
committed
Twig deprecations
1 parent e1e6312 commit 942e80b
Copy full SHA for 942e80b

File tree

3 files changed

+11
-0
lines changed
Filter options

3 files changed

+11
-0
lines changed

‎src/Symfony/Bridge/Twig/Tests/TwigEngineTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/TwigEngineTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use Symfony\Bridge\Twig\TwigEngine;
1515
use Symfony\Component\Templating\TemplateReference;
1616

17+
/**
18+
* @group legacy
19+
*/
1720
class TwigEngineTest extends \PHPUnit_Framework_TestCase
1821
{
1922
public function testExistsWithTemplateInstances()

‎src/Symfony/Bridge/Twig/TwigEngine.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/TwigEngine.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bridge\Twig;
1313

14+
@trigger_error('The '.TwigEngine::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use \Twig_Environment instead.', E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Templating\EngineInterface;
1517
use Symfony\Component\Templating\StreamingEngineInterface;
1618
use Symfony\Component\Templating\TemplateNameParserInterface;
@@ -20,6 +22,8 @@
2022
* This engine knows how to render Twig templates.
2123
*
2224
* @author Fabien Potencier <fabien@symfony.com>
25+
*
26+
* @deprecated The TwigEngine class will be removed in Symfony 4.0. You should use \Twig_Environment directly instead.
2327
*/
2428
class TwigEngine implements EngineInterface, StreamingEngineInterface
2529
{

‎src/Symfony/Bundle/TwigBundle/TwigEngine.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/TwigEngine.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bundle\TwigBundle;
1313

14+
@trigger_error('The '.TwigEngine::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use \Twig_Environment instead.', E_USER_DEPRECATED);
15+
1416
use Symfony\Bridge\Twig\TwigEngine as BaseEngine;
1517
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
1618
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
@@ -22,6 +24,8 @@
2224
* This engine renders Twig templates.
2325
*
2426
* @author Fabien Potencier <fabien@symfony.com>
27+
*
28+
* @deprecated The TwigEngine class will be removed in Symfony 4.0. You should use \Twig_Environment directly instead.
2529
*/
2630
class TwigEngine extends BaseEngine implements EngineInterface
2731
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.