[Form] Removed trigger_error() for deprecations as of 3.0
This commit is contained in:
parent
81f8c67566
commit
01b71a47ea
@ -24,6 +24,8 @@ class FormEnctypeNode extends SearchAndRenderBlockNode
|
|||||||
parent::compile($compiler);
|
parent::compile($compiler);
|
||||||
|
|
||||||
$compiler->raw(";\n");
|
$compiler->raw(";\n");
|
||||||
$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)');
|
|
||||||
|
// 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)');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,8 @@ class FormHelper extends Helper
|
|||||||
*/
|
*/
|
||||||
public function enctype(FormView $view)
|
public function enctype(FormView $view)
|
||||||
{
|
{
|
||||||
trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
|
// Uncomment this as soon as the deprecation note should be shown
|
||||||
|
// trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
return $this->renderer->searchAndRenderBlock($view, 'enctype');
|
return $this->renderer->searchAndRenderBlock($view, 'enctype');
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ class BindRequestListener implements EventSubscriberInterface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger_error('Passing a Request instance to Form::bind() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED);
|
// Uncomment this as soon as the deprecation note should be shown
|
||||||
|
// trigger_error('Passing a Request instance to Form::bind() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
$name = $form->getConfig()->getName();
|
$name = $form->getConfig()->getName();
|
||||||
$default = $form->getConfig()->getCompound() ? array() : null;
|
$default = $form->getConfig()->getCompound() ? array() : null;
|
||||||
|
@ -32,15 +32,6 @@ abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase
|
|||||||
$this->factory = Forms::createFormFactoryBuilder()
|
$this->factory = Forms::createFormFactoryBuilder()
|
||||||
->addExtensions($this->getExtensions())
|
->addExtensions($this->getExtensions())
|
||||||
->getFormFactory();
|
->getFormFactory();
|
||||||
|
|
||||||
set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function tearDown()
|
|
||||||
{
|
|
||||||
$this->factory = null;
|
|
||||||
|
|
||||||
restore_error_handler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getExtensions()
|
protected function getExtensions()
|
||||||
|
Reference in New Issue
Block a user