minor #12967 Fix failing tests after merge (xabbuh, nicolas-grekas)
This PR was merged into the 2.5 branch. Discussion ---------- Fix failing tests after merge | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - https://github.com/symfony/symfony/pull/12967/files?w=1 Commits -------9b96373
Fix failing tests after merge6638535
fix ocramius/proxy-manager dependency version
This commit is contained in:
commit
98c8ec1cbc
@ -72,7 +72,7 @@
|
||||
"monolog/monolog": "~1.3",
|
||||
"propel/propel1": "~1.6",
|
||||
"ircmaxell/password-compat": "~1.0",
|
||||
"ocramius/proxy-manager": "~0.3.1",
|
||||
"ocramius/proxy-manager": "~0.4|~1.0",
|
||||
"egulias/email-validator": "~1.2"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -18,7 +18,7 @@
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"symfony/dependency-injection": "~2.3",
|
||||
"ocramius/proxy-manager": "~0.3.1"
|
||||
"ocramius/proxy-manager": "~0.4|~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": "~2.3"
|
||||
|
@ -58,24 +58,18 @@ class CallbackValidator extends ConstraintValidator
|
||||
}
|
||||
|
||||
call_user_func($method, $object, $this->context);
|
||||
} elseif (null !== $object) {
|
||||
if (!method_exists($object, $method)) {
|
||||
throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist', $method));
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
$reflMethod = new \ReflectionMethod($object, $method);
|
||||
|
||||
if (null === $object) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!method_exists($object, $method)) {
|
||||
throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist', $method));
|
||||
}
|
||||
|
||||
$reflMethod = new \ReflectionMethod($object, $method);
|
||||
|
||||
if ($reflMethod->isStatic()) {
|
||||
$reflMethod->invoke(null, $object, $this->context);
|
||||
} else {
|
||||
$reflMethod->invoke($object, $this->context);
|
||||
if ($reflMethod->isStatic()) {
|
||||
$reflMethod->invoke(null, $object, $this->context);
|
||||
} else {
|
||||
$reflMethod->invoke($object, $this->context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user