[TwigBridge] Mark all classes extending twig as @final

This commit is contained in:
Fabien Potencier 2019-08-21 07:45:29 +02:00
parent 5a753b1428
commit d657459a5f
34 changed files with 69 additions and 1 deletions

View File

@ -4,6 +4,7 @@ CHANGELOG
4.4.0
-----
* marked all classes extending twig as `@final`
* deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the
`DebugCommand::__construct()` method, swap the variables position.

View File

@ -19,6 +19,8 @@ use Twig\TwigFunction;
* Twig extension for the Symfony Asset component.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class AssetExtension extends AbstractExtension
{

View File

@ -19,6 +19,8 @@ use Twig\TwigFilter;
* Twig extension relate to PHP code and used by the profiler and the default exception templates.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class CodeExtension extends AbstractExtension
{

View File

@ -17,6 +17,8 @@ use Twig\TwigFunction;
/**
* @author Christian Flothmann <christian.flothmann@sensiolabs.de>
* @author Titouan Galopin <galopintitouan@gmail.com>
*
* @final since Symfony 4.4
*/
class CsrfExtension extends AbstractExtension
{

View File

@ -16,6 +16,8 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
/**
* @author Christian Flothmann <christian.flothmann@sensiolabs.de>
* @author Titouan Galopin <galopintitouan@gmail.com>
*
* @final since Symfony 4.4
*/
class CsrfRuntime
{

View File

@ -24,6 +24,8 @@ use Twig\TwigFunction;
* Provides integration of the dump() function with Twig.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @final since Symfony 4.4
*/
class DumpExtension extends AbstractExtension
{

View File

@ -19,6 +19,8 @@ use Twig\TwigFunction;
* ExpressionExtension gives a way to create Expressions from a template.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class ExpressionExtension extends AbstractExtension
{

View File

@ -25,6 +25,8 @@ use Twig\TwigTest;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @final since Symfony 4.4
*/
class FormExtension extends AbstractExtension
{

View File

@ -22,6 +22,8 @@ use Twig\TwigFunction;
* Twig extension for the Symfony HttpFoundation component.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class HttpFoundationExtension extends AbstractExtension
{

View File

@ -19,6 +19,8 @@ use Twig\TwigFunction;
* Provides integration with the HttpKernel component.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class HttpKernelExtension extends AbstractExtension
{

View File

@ -18,6 +18,8 @@ use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
* Provides integration with the HttpKernel component.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class HttpKernelRuntime
{

View File

@ -19,6 +19,8 @@ use Twig\TwigFunction;
* LogoutUrlHelper provides generator functions for the logout URL to Twig.
*
* @author Jeremy Mikola <jmikola@gmail.com>
*
* @final since Symfony 4.4
*/
class LogoutUrlExtension extends AbstractExtension
{

View File

@ -17,6 +17,8 @@ use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class ProfilerExtension extends BaseProfilerExtension
{

View File

@ -22,6 +22,8 @@ use Twig\TwigFunction;
* Provides integration of the Routing component with Twig.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class RoutingExtension extends AbstractExtension
{

View File

@ -21,6 +21,8 @@ use Twig\TwigFunction;
* SecurityExtension exposes security context features.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class SecurityExtension extends AbstractExtension
{

View File

@ -20,6 +20,8 @@ use Twig\TokenParser\TokenParserInterface;
* Twig extension for the stopwatch helper.
*
* @author Wouter J <wouter@wouterj.nl>
*
* @final since Symfony 4.4
*/
class StopwatchExtension extends AbstractExtension
{

View File

@ -21,6 +21,8 @@ use Twig\TwigFunction;
* Twig extension for the Symfony WebLink component.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*
* @final since Symfony 4.4
*/
class WebLinkExtension extends AbstractExtension
{

View File

@ -21,6 +21,8 @@ use Twig\TwigFunction;
* WorkflowExtension.
*
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*
* @final since Symfony 4.4
*/
class WorkflowExtension extends AbstractExtension
{

View File

@ -20,6 +20,8 @@ use Twig\TwigFilter;
* Provides integration of the Yaml component with Twig.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class YamlExtension extends AbstractExtension
{

View File

@ -16,6 +16,8 @@ use Twig\Node\Node;
/**
* @author Julien Galenski <julien.galenski@gmail.com>
*
* @final since Symfony 4.4
*/
class DumpNode extends Node
{

View File

@ -17,6 +17,8 @@ use Twig\Node\Node;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class FormThemeNode extends Node
{

View File

@ -21,6 +21,8 @@ use Twig\Node\Expression\FunctionExpression;
* is "foo", the block "foo" will be rendered.
*
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @final since Symfony 4.4
*/
class RenderBlockNode extends FunctionExpression
{

View File

@ -18,6 +18,8 @@ use Twig\Node\Expression\FunctionExpression;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @final since Symfony 4.4
*/
class SearchAndRenderBlockNode extends FunctionExpression
{

View File

@ -19,6 +19,8 @@ use Twig\Node\Node;
* Represents a stopwatch node.
*
* @author Wouter J <wouter@wouterj.nl>
*
* @final since Symfony 4.4
*/
class StopwatchNode extends Node
{

View File

@ -17,6 +17,8 @@ use Twig\Node\Node;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class TransDefaultDomainNode extends Node
{

View File

@ -24,6 +24,8 @@ class_exists('Twig\Node\Expression\ArrayExpression');
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class TransNode extends Node
{

View File

@ -27,6 +27,8 @@ use Twig\NodeVisitor\AbstractNodeVisitor;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
{

View File

@ -22,6 +22,8 @@ use Twig\NodeVisitor\AbstractNodeVisitor;
* TranslationNodeVisitor extracts translation messages.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class TranslationNodeVisitor extends AbstractNodeVisitor
{

View File

@ -26,6 +26,8 @@ use Twig\TokenParser\AbstractTokenParser;
* {% dump foo, bar %}
*
* @author Julien Galenski <julien.galenski@gmail.com>
*
* @final since Symfony 4.4
*/
class DumpTokenParser extends AbstractTokenParser
{

View File

@ -21,6 +21,8 @@ use Twig\TokenParser\AbstractTokenParser;
* Token Parser for the 'form_theme' tag.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class FormThemeTokenParser extends AbstractTokenParser
{

View File

@ -21,6 +21,8 @@ use Twig\TokenParser\AbstractTokenParser;
* Token Parser for the stopwatch tag.
*
* @author Wouter J <wouter@wouterj.nl>
*
* @final since Symfony 4.4
*/
class StopwatchTokenParser extends AbstractTokenParser
{

View File

@ -18,6 +18,7 @@ use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Node;
use Twig\Node\TextNode;
use Twig\Token;
use Twig\TokenParser\AbstractTokenParser;
/**
* Token Parser for the 'transchoice' tag.
@ -25,8 +26,10 @@ use Twig\Token;
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since Symfony 4.2, use the "trans" tag with a "%count%" parameter instead
*
* @final since Symfony 4.4
*/
class TransChoiceTokenParser extends TransTokenParser
class TransChoiceTokenParser extends AbstractTokenParser
{
/**
* {@inheritdoc}

View File

@ -20,6 +20,8 @@ use Twig\TokenParser\AbstractTokenParser;
* Token Parser for the 'trans_default_domain' tag.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class TransDefaultDomainTokenParser extends AbstractTokenParser
{

View File

@ -24,6 +24,8 @@ use Twig\TokenParser\AbstractTokenParser;
* Token Parser for the 'trans' tag.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class TransTokenParser extends AbstractTokenParser
{