merged branch Tobion/patch-2 (PR #5240)

Commits
-------

9e5d5a4 [Form] fix static method call

Discussion
----------

[Form] fix static method call

`allowDataWalking` was called statically, but wasnt defined as such.
This commit is contained in:
Fabien Potencier 2012-08-25 19:04:51 +02:00
commit bef34bda67

View File

@ -53,7 +53,7 @@ class FormValidator extends ConstraintValidator
// Validate the form data only if transformation succeeded
$path = $this->context->getPropertyPath();
$graphWalker = $this->context->getGraphWalker();
$groups = $this->getValidationGroups($form);
$groups = self::getValidationGroups($form);
if (!empty($path)) {
$path .= '.';
@ -126,7 +126,7 @@ class FormValidator extends ConstraintValidator
*
* @return Boolean Whether the graph walker may walk the data.
*/
private function allowDataWalking(FormInterface $form)
private static function allowDataWalking(FormInterface $form)
{
$data = $form->getData();
@ -158,7 +158,7 @@ class FormValidator extends ConstraintValidator
*
* @return array The validation groups.
*/
private function getValidationGroups(FormInterface $form)
private static function getValidationGroups(FormInterface $form)
{
do {
$groups = $form->getConfig()->getOption('validation_groups');