You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewBadMethodCallException('The Assert attribute must be passed a target. For instance: "#[Assert(for: "$email", constraint: new Email())"');
45
-
}
46
50
47
51
if ($constraint === null) {
48
-
thrownewBadMethodCallException('The Assert attribute must be passed one or many constraints. For instance: "#[Assert(for: "$email", constraint: new Email())"');
52
+
thrownewBadMethodCallException('The Assertion attribute must be passed one or many constraints. For instance: "#[Assertion(constraint: new Email())"');
"Using #[Assertion(for='" . $for . "', constaint='...')] on methods is deprecated in favor " .
63
+
"of #[Assertion(constraint='...')] the parameter itself.",
64
+
E_USER_DEPRECATED,
65
+
);
66
+
67
+
$this->for = ltrim($for, '$');
53
68
}
54
69
55
70
publicfunctiongetTarget(): string
56
71
{
72
+
if ($this->for === null) {
73
+
thrownewBadMethodCallException('The Assertion attribute must be passed a target. For instance: "#[Assertion(for: "$email", constraint: new Email())"');
$this->expectExceptionMessage('The Assert attribute must be passed one or many constraints. For instance: "#[Assert(for: "$email", constraint: new Email())"');
15
+
$this->expectExceptionMessage('The Assertion attribute must be passed one or many constraints. For instance: "#[Assertion(constraint: new Email())"');
0 commit comments