mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-03 20:27:59 +08:00
fix: 🐛 ValidatorFactory
* 修改ValidatorFactory只用来创建Factory实例|* 修改ConfigProvider中FactoryInterface binding
This commit is contained in:
parent
1aeb9dad6a
commit
a5df2c263c
@ -21,7 +21,7 @@ class ConfigProvider
|
||||
return [
|
||||
'dependencies' => [
|
||||
PresenceVerifierInterface::class => DatabasePresenceVerifierFactory::class,
|
||||
FactoryInterface::class => Factory::class,
|
||||
FactoryInterface::class => ValidatorFactory::class,
|
||||
],
|
||||
'scan' => [
|
||||
'paths' => [
|
||||
|
@ -30,16 +30,6 @@ class ValidatorFactory
|
||||
$validatorFactory->setPresenceVerifier($presenceVerifier);
|
||||
}
|
||||
|
||||
$validatorFactory->resolver(function (
|
||||
TranslatorInterface $translator,
|
||||
array $data,
|
||||
array $rules,
|
||||
array $messages = [],
|
||||
array $customAttributes = []
|
||||
) {
|
||||
return make(Validator::class, [$translator, $data, $rules, $messages, $customAttributes]);
|
||||
});
|
||||
|
||||
return $validatorFactory;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user