feature #13128 [Form] Removed deprecated form_enctype() (saro0h)

This PR was merged into the 3.0-dev branch.

Discussion
----------

[Form] Removed deprecated form_enctype()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Commits
-------

c6b049f [Form] Removed deprecated form_enctype()
This commit is contained in:
Fabien Potencier 2014-12-30 15:26:34 +01:00
commit b9f44253ec
3 changed files with 0 additions and 34 deletions

View File

@ -61,7 +61,6 @@ class FormExtension extends \Twig_Extension
public function getFunctions()
{
return array(
new \Twig_SimpleFunction('form_enctype', null, array('node_class' => 'Symfony\Bridge\Twig\Node\FormEnctypeNode', 'is_safe' => array('html'))),
new \Twig_SimpleFunction('form_widget', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))),
new \Twig_SimpleFunction('form_errors', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))),
new \Twig_SimpleFunction('form_label', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))),

View File

@ -1,29 +0,0 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\Node;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
* the helper "form_start()" instead.
*/
class FormEnctypeNode extends SearchAndRenderBlockNode
{
public function compile(\Twig_Compiler $compiler)
{
parent::compile($compiler);
// Uncomment this as soon as the deprecation note should be shown
// $compiler->write('trigger_error(\'The helper form_enctype(form) is deprecated since version 2.3 and will be removed in 3.0. Use form_start(form) instead.\', E_USER_DEPRECATED)');
}
}

View File

@ -281,10 +281,6 @@
</form>
{%- endblock form_end %}
{% block form_enctype -%}
{% if multipart %}enctype="multipart/form-data"{% endif %}
{%- endblock form_enctype %}
{% block form_errors -%}
{% if errors|length > 0 -%}
<ul>