Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3805557

Browse files
committed
Merge branch '2.7'
* 2.7: Fix failing tests after merge fix ocramius/proxy-manager dependency version
2 parents dc7237f + 5fc4f27 commit 3805557

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"monolog/monolog": "~1.11",
7676
"propel/propel1": "~1.6",
7777
"ircmaxell/password-compat": "~1.0",
78-
"ocramius/proxy-manager": "~0.3.1",
78+
"ocramius/proxy-manager": "~0.4|~1.0",
7979
"egulias/email-validator": "~1.2"
8080
},
8181
"autoload": {

src/Symfony/Bridge/ProxyManager/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=5.3.3",
2020
"symfony/dependency-injection": "~2.3",
21-
"ocramius/proxy-manager": "~0.3.1"
21+
"ocramius/proxy-manager": "~0.4|~1.0"
2222
},
2323
"require-dev": {
2424
"symfony/config": "~2.3"

src/Symfony/Component/Validator/Constraints/CallbackValidator.php

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,18 @@ public function validate($object, Constraint $constraint)
5858
}
5959

6060
call_user_func($method, $object, $this->context);
61+
} elseif (null !== $object) {
62+
if (!method_exists($object, $method)) {
63+
throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist', $method));
64+
}
6165

62-
continue;
63-
}
64-
65-
if (null === $object) {
66-
continue;
67-
}
68-
69-
if (!method_exists($object, $method)) {
70-
throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist', $method));
71-
}
72-
73-
$reflMethod = new \ReflectionMethod($object, $method);
66+
$reflMethod = new \ReflectionMethod($object, $method);
7467

75-
if ($reflMethod->isStatic()) {
76-
$reflMethod->invoke(null, $object, $this->context);
77-
} else {
78-
$reflMethod->invoke($object, $this->context);
68+
if ($reflMethod->isStatic()) {
69+
$reflMethod->invoke(null, $object, $this->context);
70+
} else {
71+
$reflMethod->invoke($object, $this->context);
72+
}
7973
}
8074
}
8175
}

0 commit comments

Comments
 (0)