[Form] Removed trigger_error() for deprecations as of 3.0

This commit is contained in:
Bernhard Schussek 2013-04-15 11:15:47 +02:00
parent 81f8c67566
commit 01b71a47ea
4 changed files with 7 additions and 12 deletions

View File

@ -24,6 +24,8 @@ class FormEnctypeNode extends SearchAndRenderBlockNode
parent::compile($compiler);
$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)');
}
}

View File

@ -136,7 +136,8 @@ class FormHelper extends Helper
*/
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');
}

View File

@ -43,7 +43,8 @@ class BindRequestListener implements EventSubscriberInterface
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();
$default = $form->getConfig()->getCompound() ? array() : null;

View File

@ -32,15 +32,6 @@ abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase
$this->factory = Forms::createFormFactoryBuilder()
->addExtensions($this->getExtensions())
->getFormFactory();
set_error_handler(array('Symfony\Component\Form\Test\DeprecationErrorHandler', 'handle'));
}
protected function tearDown()
{
$this->factory = null;
restore_error_handler();
}
protected function getExtensions()