marked some classes as being final

This commit is contained in:
Fabien Potencier
2016-12-08 09:18:10 +01:00
parent e4125e6ef9
commit e89c712f58
44 changed files with 101 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
* 1.29.0 (2016-XX-XX)
* marked some classes as being final (via @final)
* made Twig_Error report real source path when possible
* added support for {{ _self }} to provide an upgrade path from 1.x to 2.0 (replaces {{ _self.templateName }})
* deprecated silent display of undefined blocks
+3
View File
@@ -209,3 +209,6 @@ Miscellaneous
* As of Twig 1.27, ``Twig_Parser::addHandler()`` and
``Twig_Parser::addNodeVisitor()`` are deprecated and will be removed in 2.0.
* As of Twig 1.29, some classes are marked as being final via the `@final`
annotation. Those classes will be marked as final in 2.0.
+2
View File
@@ -12,6 +12,8 @@
/**
* Implements a no-cache strategy.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Cache_Null implements Twig_CacheInterface
+4
View File
@@ -13,6 +13,10 @@ if (!defined('ENT_SUBSTITUTE')) {
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_Extension_Core extends Twig_Extension
{
protected $dateFormats = array('F j, Y H:i', '%d days');
+4
View File
@@ -8,6 +8,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_Extension_Debug extends Twig_Extension
{
public function getFunctions()
+4
View File
@@ -8,6 +8,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_Extension_Escaper extends Twig_Extension
{
protected $defaultStrategy;
+4
View File
@@ -8,6 +8,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_Extension_Optimizer extends Twig_Extension
{
protected $optimizers;
+4
View File
@@ -8,6 +8,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_Extension_Sandbox extends Twig_Extension
{
protected $sandboxedGlobally;
+4
View File
@@ -8,6 +8,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_Extension_StringLoader extends Twig_Extension
{
public function getFunctions()
+2
View File
@@ -19,6 +19,8 @@
*
* This loader should only be used for unit testing.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface
+2
View File
@@ -12,6 +12,8 @@
/**
* Loads templates from other loaders.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface
+2
View File
@@ -14,6 +14,8 @@
*
* It visits all nodes and their children and calls the given visitor for each.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_NodeTraverser
+2
View File
@@ -12,6 +12,8 @@
/**
* Twig_NodeVisitor_Escaper implements output escaping.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor
+2
View File
@@ -17,6 +17,8 @@
* You can configure which optimizations you want to activate via the
* optimizer mode.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor
+3
View File
@@ -9,6 +9,9 @@
* file that was distributed with this source code.
*/
/**
* @final
*/
class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor
{
protected $data = array();
+2
View File
@@ -12,6 +12,8 @@
/**
* Twig_NodeVisitor_Sandbox implements sandboxing.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor
+2
View File
@@ -11,6 +11,8 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Profiler_Dumper_Blackfire
{
+2
View File
@@ -11,6 +11,8 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Text
{
+2
View File
@@ -11,6 +11,8 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Profiler_Dumper_Text
{
@@ -11,6 +11,8 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Profiler_NodeVisitor_Profiler extends Twig_BaseNodeVisitor
{
+2
View File
@@ -11,6 +11,8 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Profiler_Profile implements IteratorAggregate, Serializable
{
+2
View File
@@ -12,6 +12,8 @@
/**
* Represents a security policy which need to be enforced when sandbox mode is enabled.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterface
+2
View File
@@ -12,6 +12,8 @@
/**
* Holds information about a non-compiled Twig template.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_Source
+2
View File
@@ -14,6 +14,8 @@
* Represents a Token.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Token
{
+2
View File
@@ -26,6 +26,8 @@
* using the js escaping strategy
* {% endautoescape %}
* </pre>
*
* @final
*/
class Twig_TokenParser_AutoEscape extends Twig_TokenParser
{
+2
View File
@@ -19,6 +19,8 @@
* <title>{% block title %}{% endblock %} - My Webpage</title>
* {% endblock %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Block extends Twig_TokenParser
{
+2
View File
@@ -11,6 +11,8 @@
/**
* Evaluates an expression, discarding the returned value.
*
* @final
*/
class Twig_TokenParser_Do extends Twig_TokenParser
{
+2
View File
@@ -11,6 +11,8 @@
/**
* Embeds a template.
*
* @final
*/
class Twig_TokenParser_Embed extends Twig_TokenParser_Include
{
+2
View File
@@ -16,6 +16,8 @@
* <pre>
* {% extends "base.html" %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Extends extends Twig_TokenParser
{
+2
View File
@@ -17,6 +17,8 @@
* This text becomes uppercase
* {% endfilter %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Filter extends Twig_TokenParser
{
+2
View File
@@ -13,6 +13,8 @@
* Flushes the output to the client.
*
* @see flush()
*
* @final
*/
class Twig_TokenParser_Flush extends Twig_TokenParser
{
+2
View File
@@ -20,6 +20,8 @@
* {% endfor %}
* </ul>
* </pre>
*
* @final
*/
class Twig_TokenParser_For extends Twig_TokenParser
{
+2
View File
@@ -15,6 +15,8 @@
* <pre>
* {% from 'forms.html' import forms %}
* </pre>
*
* @final
*/
class Twig_TokenParser_From extends Twig_TokenParser
{
+2
View File
@@ -22,6 +22,8 @@
* </ul>
* {% endif %}
* </pre>
*
* @final
*/
class Twig_TokenParser_If extends Twig_TokenParser
{
+2
View File
@@ -15,6 +15,8 @@
* <pre>
* {% import 'forms.html' as forms %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Import extends Twig_TokenParser
{
+2
View File
@@ -18,6 +18,8 @@
* Body
* {% include 'footer.html' %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Include extends Twig_TokenParser
{
+2
View File
@@ -17,6 +17,8 @@
* <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
* {% endmacro %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Macro extends Twig_TokenParser
{
+2
View File
@@ -19,6 +19,8 @@
* </pre>
*
* @see http://www.twig-project.org/doc/api.html#sandbox-extension for details
*
* @final
*/
class Twig_TokenParser_Sandbox extends Twig_TokenParser
{
+2
View File
@@ -25,6 +25,8 @@
*
* {% set foo %}Some content{% endset %}
* </pre>
*
* @final
*/
class Twig_TokenParser_Set extends Twig_TokenParser
{
+2
View File
@@ -21,6 +21,8 @@
*
* {# output will be <div><strong>foo</strong></div> #}
* </pre>
*
* @final
*/
class Twig_TokenParser_Spaceless extends Twig_TokenParser
{
+2
View File
@@ -22,6 +22,8 @@
* </pre>
*
* @see http://www.twig-project.org/doc/templates.html#horizontal-reuse for details.
*
* @final
*/
class Twig_TokenParser_Use extends Twig_TokenParser
{
+2
View File
@@ -13,6 +13,8 @@
* Creates a nested scope.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_TokenParser_With extends Twig_TokenParser
{
+2
View File
@@ -13,6 +13,8 @@
/**
* Represents a token stream.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_TokenStream
+2
View File
@@ -11,6 +11,8 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class Twig_Util_DeprecationCollector
{