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

[Templating] deprecate the component #51144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 UPGRADE-6.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ Serializer
* Deprecate Doctrine annotations support in favor of native attributes
* Deprecate passing an annotation reader to the constructor of `AnnotationLoader`

Templating
----------

* The component is deprecated and will be removed in 7.0. Use Twig instead.

Validator
---------

Expand Down
5 changes: 5 additions & 0 deletions 5 src/Symfony/Component/Templating/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

6.4
---

* Deprecate the component, use Twig instead

2.5.0
-----

Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/DelegatingEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating;

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);
kbond marked this conversation as resolved.
Show resolved Hide resolved

/**
* DelegatingEngine selects an engine for a given template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class DelegatingEngine implements EngineInterface, StreamingEngineInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/EngineInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Templating;

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);
kbond marked this conversation as resolved.
Show resolved Hide resolved

/**
* EngineInterface is the interface each engine must implement.
*
Expand All @@ -27,6 +29,8 @@
* the template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
interface EngineInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Helper/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@

namespace Symfony\Component\Templating\Helper;

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);

/**
* Helper is the base class for all helper classes.
*
* Most of the time, a Helper is an adapter around an existing
* class that exposes a read-only interface for templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
abstract class Helper implements HelperInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Helper/HelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating\Helper;

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);

/**
* HelperInterface is the interface all helpers must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
interface HelperInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Helper/SlotsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating\Helper;

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);

/**
* SlotsHelper manages template slots.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class SlotsHelper extends Helper
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Loader/CacheLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;

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);

/**
* CacheLoader is a loader that caches other loaders responses
* on the filesystem.
Expand All @@ -23,6 +25,8 @@
* All other mechanism would imply the use of `eval()`.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class CacheLoader extends Loader
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Loader/ChainLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;

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);

/**
* ChainLoader is a loader that calls other loaders to load templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class ChainLoader extends Loader
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Loader/FilesystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;

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);

/**
* FilesystemLoader is a loader that read templates from the filesystem.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class FilesystemLoader extends Loader
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Loader/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@

use Psr\Log\LoggerInterface;

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);

/**
* Loader is the base class for all template loader classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
abstract class Loader implements LoaderInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Loader/LoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;

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);

/**
* LoaderInterface is the interface all loaders must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
interface LoaderInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/PhpEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\Storage\StringStorage;

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);

/**
* PhpEngine is an engine able to render PHP templates.
*
* @implements \ArrayAccess<string, HelperInterface>
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class PhpEngine implements EngineInterface, \ArrayAccess
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Storage/FileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating\Storage;

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);

/**
* FileStorage represents a template stored on the filesystem.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class FileStorage extends Storage
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating\Storage;

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);

/**
* Storage is the base class for all storage classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
abstract class Storage
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/Storage/StringStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating\Storage;

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);

/**
* StringStorage represents a template stored in a string.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class StringStorage extends Storage
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/StreamingEngineInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating;

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);

/**
* StreamingEngineInterface provides a method that knows how to stream a template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
interface StreamingEngineInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/TemplateNameParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@

namespace Symfony\Component\Templating;

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);

/**
* TemplateNameParser is the default implementation of TemplateNameParserInterface.
*
* This implementation takes everything as the template name
* and the extension for the engine.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class TemplateNameParser implements TemplateNameParserInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@

namespace Symfony\Component\Templating;

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);

/**
* TemplateNameParserInterface converts template names to TemplateReferenceInterface
* instances.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
interface TemplateNameParserInterface
{
Expand Down
4 changes: 4 additions & 0 deletions 4 src/Symfony/Component/Templating/TemplateReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating;

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);

/**
* Internal representation of a template.
*
* @author Victor Berchet <victor@suumit.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
class TemplateReference implements TemplateReferenceInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Component\Templating;

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);

/**
* Interface to be implemented by all templates.
*
* @author Victor Berchet <victor@suumit.com>
*
* @deprecated since Symfony 6.4, use Twig instead
*/
interface TemplateReferenceInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\Templating\EngineInterface;
use Symfony\Component\Templating\StreamingEngineInterface;

/**
* @group legacy
*/
class DelegatingEngineTest extends TestCase
{
public function testRenderDelegatesToSupportedEngine()
Expand Down
3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Templating/Tests/Helper/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Templating\Helper\Helper;

/**
* @group legacy
*/
class HelperTest extends TestCase
{
public function testGetSetCharset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Templating\Helper\SlotsHelper;

/**
* @group legacy
*/
class SlotsHelperTest extends TestCase
{
public function testHasGetSet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use Symfony\Component\Templating\TemplateReference;
use Symfony\Component\Templating\TemplateReferenceInterface;

/**
* @group legacy
*/
class CacheLoaderTest extends TestCase
{
public function testConstructor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\Templating\Loader\FilesystemLoader;
use Symfony\Component\Templating\TemplateReference;

/**
* @group legacy
*/
class ChainLoaderTest extends TestCase
{
protected FilesystemLoader $loader1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\Templating\Storage\FileStorage;
use Symfony\Component\Templating\TemplateReference;

/**
* @group legacy
*/
class FilesystemLoaderTest extends TestCase
{
protected static string $fixturesPath;
Expand Down
3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;

/**
* @group legacy
*/
class LoaderTest extends TestCase
{
public function testGetSetLogger()
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.