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 c2ee867

Browse filesBrowse files
committed
feature #51144 [Templating] deprecate the component (kbond)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Templating] deprecate the component | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | n/a | License | MIT | Doc PR | n/a I think it's time to deprecate/remove this component. Commits ------- 2a07431 [Templating] deprecate the component
2 parents d87931f + 2a07431 commit c2ee867
Copy full SHA for c2ee867

34 files changed

+123
-0
lines changed

‎UPGRADE-6.4.md

Copy file name to clipboardExpand all lines: UPGRADE-6.4.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ Serializer
8585
* Deprecate Doctrine annotations support in favor of native attributes
8686
* Deprecate passing an annotation reader to the constructor of `AnnotationLoader`
8787

88+
Templating
89+
----------
90+
91+
* The component is deprecated and will be removed in 7.0. Use Twig instead.
92+
8893
Validator
8994
---------
9095

‎src/Symfony/Component/Templating/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
6.4
5+
---
6+
7+
* Deprecate the component, use Twig instead
8+
49
2.5.0
510
-----
611

‎src/Symfony/Component/Templating/DelegatingEngine.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/DelegatingEngine.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', DelegatingEngine::class);
15+
1416
/**
1517
* DelegatingEngine selects an engine for a given template.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
class DelegatingEngine implements EngineInterface, StreamingEngineInterface
2024
{

‎src/Symfony/Component/Templating/EngineInterface.php

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

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', EngineInterface::class);
15+
1416
/**
1517
* EngineInterface is the interface each engine must implement.
1618
*
@@ -27,6 +29,8 @@
2729
* the template.
2830
*
2931
* @author Fabien Potencier <fabien@symfony.com>
32+
*
33+
* @deprecated since Symfony 6.4, use Twig instead
3034
*/
3135
interface EngineInterface
3236
{

‎src/Symfony/Component/Templating/Helper/Helper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Helper/Helper.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
namespace Symfony\Component\Templating\Helper;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', Helper::class);
15+
1416
/**
1517
* Helper is the base class for all helper classes.
1618
*
1719
* Most of the time, a Helper is an adapter around an existing
1820
* class that exposes a read-only interface for templates.
1921
*
2022
* @author Fabien Potencier <fabien@symfony.com>
23+
*
24+
* @deprecated since Symfony 6.4, use Twig instead
2125
*/
2226
abstract class Helper implements HelperInterface
2327
{

‎src/Symfony/Component/Templating/Helper/HelperInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Helper/HelperInterface.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating\Helper;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', HelperInterface::class);
15+
1416
/**
1517
* HelperInterface is the interface all helpers must implement.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
interface HelperInterface
2024
{

‎src/Symfony/Component/Templating/Helper/SlotsHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Helper/SlotsHelper.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating\Helper;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', SlotsHelper::class);
15+
1416
/**
1517
* SlotsHelper manages template slots.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
class SlotsHelper extends Helper
2024
{

‎src/Symfony/Component/Templating/Loader/CacheLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Loader/CacheLoader.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Symfony\Component\Templating\Storage\Storage;
1616
use Symfony\Component\Templating\TemplateReferenceInterface;
1717

18+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', CacheLoader::class);
19+
1820
/**
1921
* CacheLoader is a loader that caches other loaders responses
2022
* on the filesystem.
@@ -23,6 +25,8 @@
2325
* All other mechanism would imply the use of `eval()`.
2426
*
2527
* @author Fabien Potencier <fabien@symfony.com>
28+
*
29+
* @deprecated since Symfony 6.4, use Twig instead
2630
*/
2731
class CacheLoader extends Loader
2832
{

‎src/Symfony/Component/Templating/Loader/ChainLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Loader/ChainLoader.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
use Symfony\Component\Templating\Storage\Storage;
1515
use Symfony\Component\Templating\TemplateReferenceInterface;
1616

17+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', ChainLoader::class);
18+
1719
/**
1820
* ChainLoader is a loader that calls other loaders to load templates.
1921
*
2022
* @author Fabien Potencier <fabien@symfony.com>
23+
*
24+
* @deprecated since Symfony 6.4, use Twig instead
2125
*/
2226
class ChainLoader extends Loader
2327
{

‎src/Symfony/Component/Templating/Loader/FilesystemLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Loader/FilesystemLoader.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
use Symfony\Component\Templating\Storage\Storage;
1616
use Symfony\Component\Templating\TemplateReferenceInterface;
1717

18+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', FilesystemLoader::class);
19+
1820
/**
1921
* FilesystemLoader is a loader that read templates from the filesystem.
2022
*
2123
* @author Fabien Potencier <fabien@symfony.com>
24+
*
25+
* @deprecated since Symfony 6.4, use Twig instead
2226
*/
2327
class FilesystemLoader extends Loader
2428
{

‎src/Symfony/Component/Templating/Loader/Loader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Loader/Loader.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@
1313

1414
use Psr\Log\LoggerInterface;
1515

16+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', Loader::class);
17+
1618
/**
1719
* Loader is the base class for all template loader classes.
1820
*
1921
* @author Fabien Potencier <fabien@symfony.com>
22+
*
23+
* @deprecated since Symfony 6.4, use Twig instead
2024
*/
2125
abstract class Loader implements LoaderInterface
2226
{

‎src/Symfony/Component/Templating/Loader/LoaderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Loader/LoaderInterface.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
use Symfony\Component\Templating\Storage\Storage;
1515
use Symfony\Component\Templating\TemplateReferenceInterface;
1616

17+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', LoaderInterface::class);
18+
1719
/**
1820
* LoaderInterface is the interface all loaders must implement.
1921
*
2022
* @author Fabien Potencier <fabien@symfony.com>
23+
*
24+
* @deprecated since Symfony 6.4, use Twig instead
2125
*/
2226
interface LoaderInterface
2327
{

‎src/Symfony/Component/Templating/PhpEngine.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/PhpEngine.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@
1717
use Symfony\Component\Templating\Storage\Storage;
1818
use Symfony\Component\Templating\Storage\StringStorage;
1919

20+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', PhpEngine::class);
21+
2022
/**
2123
* PhpEngine is an engine able to render PHP templates.
2224
*
2325
* @implements \ArrayAccess<string, HelperInterface>
2426
*
2527
* @author Fabien Potencier <fabien@symfony.com>
28+
*
29+
* @deprecated since Symfony 6.4, use Twig instead
2630
*/
2731
class PhpEngine implements EngineInterface, \ArrayAccess
2832
{

‎src/Symfony/Component/Templating/Storage/FileStorage.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Storage/FileStorage.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating\Storage;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', FileStorage::class);
15+
1416
/**
1517
* FileStorage represents a template stored on the filesystem.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
class FileStorage extends Storage
2024
{

‎src/Symfony/Component/Templating/Storage/Storage.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Storage/Storage.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating\Storage;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', Storage::class);
15+
1416
/**
1517
* Storage is the base class for all storage classes.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
abstract class Storage
2024
{

‎src/Symfony/Component/Templating/Storage/StringStorage.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Storage/StringStorage.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating\Storage;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', StringStorage::class);
15+
1416
/**
1517
* StringStorage represents a template stored in a string.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
class StringStorage extends Storage
2024
{

‎src/Symfony/Component/Templating/StreamingEngineInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/StreamingEngineInterface.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', StreamingEngineInterface::class);
15+
1416
/**
1517
* StreamingEngineInterface provides a method that knows how to stream a template.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
interface StreamingEngineInterface
2024
{

‎src/Symfony/Component/Templating/TemplateNameParser.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/TemplateNameParser.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', TemplateNameParser::class);
15+
1416
/**
1517
* TemplateNameParser is the default implementation of TemplateNameParserInterface.
1618
*
1719
* This implementation takes everything as the template name
1820
* and the extension for the engine.
1921
*
2022
* @author Fabien Potencier <fabien@symfony.com>
23+
*
24+
* @deprecated since Symfony 6.4, use Twig instead
2125
*/
2226
class TemplateNameParser implements TemplateNameParserInterface
2327
{

‎src/Symfony/Component/Templating/TemplateNameParserInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/TemplateNameParserInterface.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', TemplateNameParserInterface::class);
15+
1416
/**
1517
* TemplateNameParserInterface converts template names to TemplateReferenceInterface
1618
* instances.
1719
*
1820
* @author Fabien Potencier <fabien@symfony.com>
21+
*
22+
* @deprecated since Symfony 6.4, use Twig instead
1923
*/
2024
interface TemplateNameParserInterface
2125
{

‎src/Symfony/Component/Templating/TemplateReference.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/TemplateReference.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', TemplateReference::class);
15+
1416
/**
1517
* Internal representation of a template.
1618
*
1719
* @author Victor Berchet <victor@suumit.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
class TemplateReference implements TemplateReferenceInterface
2024
{

‎src/Symfony/Component/Templating/TemplateReferenceInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/TemplateReferenceInterface.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
namespace Symfony\Component\Templating;
1313

14+
trigger_deprecation('symfony/templating', '6.4', '"%s" is deprecated since version 6.4 and will be removed in 7.0. Use Twig instead.', TemplateReferenceInterface::class);
15+
1416
/**
1517
* Interface to be implemented by all templates.
1618
*
1719
* @author Victor Berchet <victor@suumit.com>
20+
*
21+
* @deprecated since Symfony 6.4, use Twig instead
1822
*/
1923
interface TemplateReferenceInterface extends \Stringable
2024
{

‎src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Symfony\Component\Templating\EngineInterface;
1717
use Symfony\Component\Templating\StreamingEngineInterface;
1818

19+
/**
20+
* @group legacy
21+
*/
1922
class DelegatingEngineTest extends TestCase
2023
{
2124
public function testRenderDelegatesToSupportedEngine()

‎src/Symfony/Component/Templating/Tests/Helper/HelperTest.php

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

17+
/**
18+
* @group legacy
19+
*/
1720
class HelperTest extends TestCase
1821
{
1922
public function testGetSetCharset()

‎src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Templating\Helper\SlotsHelper;
1616

17+
/**
18+
* @group legacy
19+
*/
1720
class SlotsHelperTest extends TestCase
1821
{
1922
public function testHasGetSet()

‎src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
use Symfony\Component\Templating\TemplateReference;
2121
use Symfony\Component\Templating\TemplateReferenceInterface;
2222

23+
/**
24+
* @group legacy
25+
*/
2326
class CacheLoaderTest extends TestCase
2427
{
2528
public function testConstructor()

‎src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Symfony\Component\Templating\Loader\FilesystemLoader;
1717
use Symfony\Component\Templating\TemplateReference;
1818

19+
/**
20+
* @group legacy
21+
*/
1922
class ChainLoaderTest extends TestCase
2023
{
2124
protected FilesystemLoader $loader1;

‎src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use Symfony\Component\Templating\Storage\FileStorage;
1818
use Symfony\Component\Templating\TemplateReference;
1919

20+
/**
21+
* @group legacy
22+
*/
2023
class FilesystemLoaderTest extends TestCase
2124
{
2225
protected static string $fixturesPath;

‎src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use Symfony\Component\Templating\Storage\Storage;
1818
use Symfony\Component\Templating\TemplateReferenceInterface;
1919

20+
/**
21+
* @group legacy
22+
*/
2023
class LoaderTest extends TestCase
2124
{
2225
public function testGetSetLogger()

0 commit comments

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