commit
c54fe77a51
|
|
@ -2,6 +2,7 @@ language: php
|
||||||
php:
|
php:
|
||||||
- 5.6
|
- 5.6
|
||||||
- 7.0
|
- 7.0
|
||||||
|
- 7.1
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- travis_retry composer self-update
|
- travis_retry composer self-update
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php" : ">=5.6.0",
|
"php" : ">=5.6.0|>=7.0",
|
||||||
"illuminate/support": "~5.3.28|~5.4",
|
"illuminate/support": "~5.3.28|~5.4|~5.5",
|
||||||
"bjeavons/zxcvbn-php": "^0.3"
|
"bjeavons/zxcvbn-php": "0.3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit" : "5.7.*",
|
"phpunit/phpunit" : "5.7.*|~6.0",
|
||||||
"orchestra/testbench": "~3.4"
|
"orchestra/testbench": "~3.3|~3.4|~3.5"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
@ -43,7 +43,12 @@
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.x-dev"
|
"dev-master": "3.x-dev"
|
||||||
|
},
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Olssonm\\Zxcvbn\\ZxcvbnServiceProvider"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "stable"
|
"minimum-stability": "stable"
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@ class ZxcvbnServiceProvider extends ServiceProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($zxcvbn['score'] >= $target);
|
return ($zxcvbn['score'] >= $target);
|
||||||
}, 'Your :input is not secure enough.');
|
}, 'Your :attribute is not secure enough.');
|
||||||
|
|
||||||
Validator::replacer('zxcvbn_min', function($message, $attribute, $rule, $parameters) {
|
Validator::replacer('zxcvbn_min', function($message, $attribute, $rule, $parameters) {
|
||||||
$message = str_replace(':input', $attribute, $message);
|
$message = str_replace(':attribute', $attribute, $message);
|
||||||
return $message;
|
return $message;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -59,10 +59,10 @@ class ZxcvbnServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}, 'Your :input is insecure. It either matches a commonly used password, or you have used a similar username/password combination.');
|
}, 'Your :attribute is insecure. It either matches a commonly used password, or you have used a similar username/password combination.');
|
||||||
|
|
||||||
Validator::replacer('zxcvbn_dictionary', function($message, $attribute, $rule, $parameters) {
|
Validator::replacer('zxcvbn_dictionary', function($message, $attribute, $rule, $parameters) {
|
||||||
$message = str_replace(':input', $attribute, $message);
|
$message = str_replace(':attribute', $attribute, $message);
|
||||||
return $message;
|
return $message;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue