Skip to content

Commit 78bf4da

Browse files
committed
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
2 parents 35f3bf9 + 0942268 commit 78bf4da

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Extension/HttpFoundation/EventListener/BindRequestListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BindRequestListener implements EventSubscriberInterface
2727
public static function getSubscribedEvents()
2828
{
2929
// High priority in order to supersede other listeners
30-
return array(FormEvents::PRE_BIND => array('preBind', 128));
30+
return array(FormEvents::PRE_SUBMIT => array('preBind', 128));
3131
}
3232

3333
public function preBind(FormEvent $event)

Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public function testValidateTokenOnBindIfRootAndCompoundUsesTypeClassAsIntention
297297
->add('child', 'text')
298298
->getForm();
299299

300-
$form->bind(array(
300+
$form->submit(array(
301301
'child' => 'foobar',
302302
'csrf' => 'token',
303303
));

Tests/SimpleFormTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ public function testFalseIsConvertedToNull()
109109
}));
110110

111111
$config = new FormConfigBuilder('name', null, $this->dispatcher);
112-
$config->addEventListener(FormEvents::PRE_BIND, array($mock, 'preBind'));
112+
$config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preBind'));
113113
$form = new Form($config);
114114

115-
$form->bind(false);
115+
$form->submit(false);
116116

117117
$this->assertTrue($form->isValid());
118118
$this->assertNull($form->getData());

0 commit comments

Comments
 (0)