Skip to content

Commit 7032f90

Browse files
authored
Update for PHP 8 (#17)
* Update for PHP 8 * Switch to bjeavons/zxcvbn-php-library
1 parent 4fff615 commit 7032f90

File tree

5 files changed

+14
-18
lines changed

5 files changed

+14
-18
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ script:
1111

1212
matrix:
1313
include:
14-
- php: 7.1
15-
env: ILLUMINATE_VERSION=5.8.*
16-
- php: 7.2
14+
- php: 7.3
1715
env: ILLUMINATE_VERSION=^6.0
18-
- php: 7.2
19-
env: ILLUMINATE_VERSION=^7.0
2016
- php: 7.3
2117
env: ILLUMINATE_VERSION=^7.0
22-
- php: 7.4
23-
env: ILLUMINATE_VERSION=^7.0
2418
- php: 7.3
2519
env: ILLUMINATE_VERSION=^8.0
2620
- php: 7.4
2721
env: ILLUMINATE_VERSION=^8.0
22+
- php: 8.0
23+
env: ILLUMINATE_VERSION=^8.0

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The MIT License (MIT)
22

3-
Copyright (c) 2019 Marcus Olsson <[email protected]>
3+
Copyright (c) 2020 Marcus Olsson <[email protected]>
44

55
> Permission is hereby granted, free of charge, to any person obtaining a copy
66
> of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
A simple implementation of zxcvbn for Laravel. This package allows you to access "zxcvbn-related" data on a passphrase in the application and also to use zxcvbn as a standard validator.
1212

13-
Uses [Zxcvbn-PHP](https://github.com/mkopinsky/zxcvbn-php) by [@mkopinsky](https://github.com/mkopinsky) (originally by [@bjeavons](https://github.com/bjeavons)), which in turn is inspired by [zxcvbn](https://github.com/dropbox/zxcvbn) by [@dropbox](https://github.com/dropbox).
13+
Uses [Zxcvbn-PHP](https://github.com/bjeavons/zxcvbn-php) by [@bjeavons](https://github.com/bjeavons) and [@mkopinsky](https://github.com/mkopinsky), which in turn is inspired by [zxcvbn](https://github.com/dropbox/zxcvbn) by [@dropbox](https://github.com/dropbox).
1414

1515
## Install
1616

@@ -110,7 +110,7 @@ This is a bit more interesting. `zxcvbn_dictionary` allows you to input both the
110110
'email' => '[email protected]'
111111
];
112112
$validator = Validator::make($password, [
113-
'password' => 'zxcvbn_dictionary:' . $data['username'] . ',' . $data['email'] . '|required',
113+
'password' => sprintf('required|zxcvbn_dictionary:%s,%s', $data['username'], $data['email'])
114114
]);
115115

116116
dd($validator->passes());
@@ -125,7 +125,7 @@ This is a bit more interesting. `zxcvbn_dictionary` allows you to input both the
125125
'email' => '[email protected]'
126126
];
127127
$validator = Validator::make($password, [
128-
'password' => 'zxcvbn_dictionary:' . $data['username'] . ',' . $data['email'] . '|required',
128+
'password' => sprintf('required|zxcvbn_dictionary:%s,%s', $data['username'], $data['email'])
129129
]);
130130

131131
dd($validator->passes());
@@ -148,7 +148,7 @@ $ phpunit
148148

149149
The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.
150150

151-
© 2019 [Marcus Olsson](https://marcusolsson.me).
151+
© 2020 [Marcus Olsson](https://marcusolsson.me).
152152

153153
[ico-version]: https://img.shields.io/packagist/v/olssonm/l5-zxcvbn.svg?style=flat-square
154154

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
}
2121
],
2222
"require": {
23-
"php" : "^7.1",
24-
"illuminate/support": ">=5.8|^6.0|^7.0|^8.0",
25-
"mkopinsky/zxcvbn-php": "^4.4"
23+
"php": "^7.3|^8.0",
24+
"illuminate/support": "^6.0|^7.0|^8.0",
25+
"bjeavons/zxcvbn-php": "^1.2"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "^7.5 || ^8.0",
29-
"orchestra/testbench": ">=3.4.0"
28+
"phpunit/phpunit": "^8.0|^9.0",
29+
"orchestra/testbench": ">=4.0"
3030
},
3131
"autoload": {
3232
"psr-4": {

src/ZxcvbnServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function boot()
3636
});
3737

3838
/**
39-
* Extend the Laravel Validator with the "zxcvbn_min" rule
39+
* Extend the Laravel Validator with the "zxcvbn_dictionary" rule
4040
*/
4141
Validator::extend('zxcvbn_dictionary', function($attribute, $value, $parameters) {
4242
$email = null;

0 commit comments

Comments
 (0)