minor #13161 Remove usages of deprecated constants (stof)
This PR was merged into the 2.3 branch.
Discussion
----------
Remove usages of deprecated constants
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This removes the usage of deprecated constants in our code.
I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060 (warnings are triggered in this PR because of these usages)
Commits
-------
6c00c22
Remove usages of deprecated constants
This commit is contained in:
commit
e0a8441f21
@ -27,7 +27,7 @@ class BindRequestListener implements EventSubscriberInterface
|
|||||||
public static function getSubscribedEvents()
|
public static function getSubscribedEvents()
|
||||||
{
|
{
|
||||||
// High priority in order to supersede other listeners
|
// High priority in order to supersede other listeners
|
||||||
return array(FormEvents::PRE_BIND => array('preBind', 128));
|
return array(FormEvents::PRE_SUBMIT => array('preBind', 128));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function preBind(FormEvent $event)
|
public function preBind(FormEvent $event)
|
||||||
|
@ -297,7 +297,7 @@ class FormTypeCsrfExtensionTest extends TypeTestCase
|
|||||||
->add('child', 'text')
|
->add('child', 'text')
|
||||||
->getForm();
|
->getForm();
|
||||||
|
|
||||||
$form->bind(array(
|
$form->submit(array(
|
||||||
'child' => 'foobar',
|
'child' => 'foobar',
|
||||||
'csrf' => 'token',
|
'csrf' => 'token',
|
||||||
));
|
));
|
||||||
|
@ -109,10 +109,10 @@ class SimpleFormTest extends AbstractFormTest
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
$config = new FormConfigBuilder('name', null, $this->dispatcher);
|
$config = new FormConfigBuilder('name', null, $this->dispatcher);
|
||||||
$config->addEventListener(FormEvents::PRE_BIND, array($mock, 'preBind'));
|
$config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preBind'));
|
||||||
$form = new Form($config);
|
$form = new Form($config);
|
||||||
|
|
||||||
$form->bind(false);
|
$form->submit(false);
|
||||||
|
|
||||||
$this->assertTrue($form->isValid());
|
$this->assertTrue($form->isValid());
|
||||||
$this->assertNull($form->getData());
|
$this->assertNull($form->getData());
|
||||||
|
Reference in New Issue
Block a user