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 #21036

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

Closed
wants to merge 1 commit into from
Closed
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
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_error('The '.DelegatingEngine::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* DelegatingEngine selects an engine for a given template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The DelegatingEngine class will be removed in Symfony 4.0. You should use Twig instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the annotations should be rewritten as
@deprecated since version 3.3, to be removed in 4.0. You should use Twig instead.
this will make notices raised by DebugClassLoader a bit better/consistent.

*/
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_error('The '.EngineInterface::class.' interface is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* EngineInterface is the interface each engine must implement.
*
Expand All @@ -27,6 +29,8 @@
* the template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The EngineInterface interface will be removed in Symfony 4.0. You should 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_error('The '.Helper::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* 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 The Helper class will be removed in Symfony 4.0. You should 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_error('The '.HelperInterface::class.' interface is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* HelperInterface is the interface all helpers must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The HelperInterface interface will be removed in Symfony 4.0. You should 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_error('The '.SlotsHelper::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* SlotsHelper manages template slots.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The SlotsHelper class will be removed in Symfony 4.0. You should 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 @@ -11,6 +11,8 @@

namespace Symfony\Component\Templating\Loader;

@trigger_error('The '.CacheLoader::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\Storage\FileStorage;
use Symfony\Component\Templating\TemplateReferenceInterface;
Expand All @@ -23,6 +25,8 @@
* All other mechanism would imply the use of `eval()`.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The CacheLoader class will be removed in Symfony 4.0. You should 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 @@ -11,13 +11,17 @@

namespace Symfony\Component\Templating\Loader;

@trigger_error('The '.ChainLoader::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;

/**
* ChainLoader is a loader that calls other loaders to load templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The ChainLoader class will be removed in Symfony 4.0. You should 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 @@ -11,6 +11,8 @@

namespace Symfony\Component\Templating\Loader;

@trigger_error('The '.FilesystemLoader::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\Storage\FileStorage;
use Symfony\Component\Templating\TemplateReferenceInterface;
Expand All @@ -19,6 +21,8 @@
* FilesystemLoader is a loader that read templates from the filesystem.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The FilesystemLoader class will be removed in Symfony 4.0. You should 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 @@ -11,12 +11,16 @@

namespace Symfony\Component\Templating\Loader;

@trigger_error('The '.Loader::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

use Psr\Log\LoggerInterface;

/**
* Loader is the base class for all template loader classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The Loader class will be removed in Symfony 4.0. You should 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 @@ -11,13 +11,17 @@

namespace Symfony\Component\Templating\Loader;

@trigger_error('The '.LoaderInterface::class.' interface is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

use Symfony\Component\Templating\TemplateReferenceInterface;
use Symfony\Component\Templating\Storage\Storage;

/**
* LoaderInterface is the interface all loaders must implement.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The LoaderInterface interface will be removed in Symfony 4.0. You should 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 @@ -11,6 +11,8 @@

namespace Symfony\Component\Templating;

@trigger_error('The '.PhpEngine::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\Storage\FileStorage;
use Symfony\Component\Templating\Storage\StringStorage;
Expand All @@ -21,6 +23,8 @@
* PhpEngine is an engine able to render PHP templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The PhpEngine class will be removed in Symfony 4.0. You should 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_error('The '.FileStorage::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* FileStorage represents a template stored on the filesystem.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The FileStorage class will be removed in Symfony 4.0. You should 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_error('The '.Storage::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* Storage is the base class for all storage classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The Storage class will be removed in Symfony 4.0. You should 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_error('The '.StringStorage::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* StringStorage represents a template stored in a string.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The StringStorage class will be removed in Symfony 4.0. You should 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_error('The '.StreamingEngineInterface::class.' interface is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* StreamingEngineInterface provides a method that knows how to stream a template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The StreamingEngineInterface interface will be removed in Symfony 4.0. You should 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_error('The '.TemplateNameParser::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* 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 The TemplateNameParser class will be removed in Symfony 4.0. You should 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_error('The '.TemplateNameParserInterface::class.' interface is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* TemplateNameParserInterface converts template names to TemplateReferenceInterface
* instances.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated The TemplateNameParserInterface interface will be removed in Symfony 4.0. You should 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_error('The '.TemplateReference::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

/**
* Internal representation of a template.
*
* @author Victor Berchet <victor@suumit.com>
*
* @deprecated The TemplateReference class will be removed in Symfony 4.0. You should 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_error('The '.TemplateReferenceInterface::class.' interface is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.', E_USER_DEPRECATED);

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

/**
* @group legacy
*/
class DelegatingEngineTest extends \PHPUnit_Framework_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 @@ -13,6 +13,9 @@

use Symfony\Component\Templating\Helper\Helper;

/**
* @group legacy
*/
class HelperTest extends \PHPUnit_Framework_TestCase
{
public function testGetSetCharset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

use Symfony\Component\Templating\Helper\SlotsHelper;

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

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

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

/**
* @group legacy
*/
class FilesystemLoaderTest extends \PHPUnit_Framework_TestCase
{
protected static $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 @@ -14,6 +14,9 @@
use Symfony\Component\Templating\Loader\Loader;
use Symfony\Component\Templating\TemplateReferenceInterface;

/**
* @group legacy
*/
class LoaderTest extends \PHPUnit_Framework_TestCase
{
public function testGetSetLogger()
Expand Down
3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Templating/Tests/PhpEngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\Templating\TemplateReferenceInterface;
use Symfony\Component\Templating\TemplateReference;

/**
* @group legacy
*/
class PhpEngineTest extends \PHPUnit_Framework_TestCase
{
protected $loader;
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.