fix: 🐛 ValidatorFactory

* 修改ValidatorFactory只用来创建Factory实例|* 修改ConfigProvider中FactoryInterface
binding
This commit is contained in:
wangyi 2019-09-06 17:07:41 +08:00
parent 1aeb9dad6a
commit a5df2c263c
2 changed files with 1 additions and 11 deletions

View File

@ -21,7 +21,7 @@ class ConfigProvider
return [
'dependencies' => [
PresenceVerifierInterface::class => DatabasePresenceVerifierFactory::class,
FactoryInterface::class => Factory::class,
FactoryInterface::class => ValidatorFactory::class,
],
'scan' => [
'paths' => [

View File

@ -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;
}
}