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

Commit5c4336a

Browse files
committed
bugsymfony#3570 Callback: [Validator, validate] expects validate to be static (nixilla)
This PR was merged into the 2.4 branch.Discussion----------Callback: [Validator, validate] expects validate to be staticOtherwise 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```Commits-------027bc97 Callback: [Validator, validate] expects validate to be static
2 parents77628d0 +027bc97 commit5c4336a

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