diff --git a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php index 4edf1043c59fc..e3d347dd70c90 100644 --- a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php +++ b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php @@ -31,10 +31,10 @@ public static function getSubscribedEvents() { // Higher priority than core MergeCollectionListener so that this one // is called before - return array(FormEvents::SUBMIT => array('onBind', 10)); + return array(FormEvents::SUBMIT => array('onSubmit', 10)); } - public function onBind(FormEvent $event) + public function onSubmit(FormEvent $event) { $collection = $event->getForm()->getData(); $data = $event->getData(); @@ -45,4 +45,15 @@ public function onBind(FormEvent $event) $collection->clear(); } } + + /** + * Alias of {@link onSubmit()}. + * + * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use + * {@link onSubmit()} instead. + */ + public function onBind(FormEvent $event) + { + $this->onSubmit($event); + } }