Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit027bc97

Browse files
committed
Callback: [Validator, validate] expects validate to be static
Otherwise you'll get:```ContextErrorException: Runtime Notice: call_user_func() expects parameter 1 to be a valid callback, non-static method Vendor\Package\Validator::validate() should not be called statically in Symfony/Component/Validator/Constraints/CallbackValidator.php```
1 parentdce2e23 commit027bc97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎reference/constraints/Callback.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ your validation function is ``Vendor\Package\Validator::validate()``::
160160

161161
class Validator
162162
{
163-
public function validate($object, ExecutionContextInterface $context)
163+
publicstaticfunction validate($object, ExecutionContextInterface $context)
164164
{
165165
// ...
166166
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp