Skip to content

Commit c54fe77

Browse files
authored
Merge pull request #5 from olssonm/dev
L5.5 support.
2 parents 9979f4c + 26ba285 commit c54fe77

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: php
22
php:
33
- 5.6
44
- 7.0
5+
- 7.1
56

67
before_script:
78
- travis_retry composer self-update

composer.json

+11-6
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
}
2121
],
2222
"require": {
23-
"php" : ">=5.6.0",
24-
"illuminate/support": "~5.3.28|~5.4",
25-
"bjeavons/zxcvbn-php": "^0.3"
23+
"php" : ">=5.6.0|>=7.0",
24+
"illuminate/support": "~5.3.28|~5.4|~5.5",
25+
"bjeavons/zxcvbn-php": "0.3.0"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit" : "5.7.*",
29-
"orchestra/testbench": "~3.4"
28+
"phpunit/phpunit" : "5.7.*|~6.0",
29+
"orchestra/testbench": "~3.3|~3.4|~3.5"
3030
},
3131
"autoload": {
3232
"psr-4": {
@@ -43,7 +43,12 @@
4343
},
4444
"extra": {
4545
"branch-alias": {
46-
"dev-master": "2.x-dev"
46+
"dev-master": "3.x-dev"
47+
},
48+
"laravel": {
49+
"providers": [
50+
"Olssonm\\Zxcvbn\\ZxcvbnServiceProvider"
51+
]
4752
}
4853
},
4954
"minimum-stability": "stable"

src/ZxcvbnServiceProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public function boot()
2828
}
2929

3030
return ($zxcvbn['score'] >= $target);
31-
}, 'Your :input is not secure enough.');
31+
}, 'Your :attribute is not secure enough.');
3232

3333
Validator::replacer('zxcvbn_min', function($message, $attribute, $rule, $parameters) {
34-
$message = str_replace(':input', $attribute, $message);
34+
$message = str_replace(':attribute', $attribute, $message);
3535
return $message;
3636
});
3737

@@ -59,10 +59,10 @@ public function boot()
5959

6060
return true;
6161

62-
}, 'Your :input is insecure. It either matches a commonly used password, or you have used a similar username/password combination.');
62+
}, 'Your :attribute is insecure. It either matches a commonly used password, or you have used a similar username/password combination.');
6363

6464
Validator::replacer('zxcvbn_dictionary', function($message, $attribute, $rule, $parameters) {
65-
$message = str_replace(':input', $attribute, $message);
65+
$message = str_replace(':attribute', $attribute, $message);
6666
return $message;
6767
});
6868
}

0 commit comments

Comments
 (0)