Skip to content

Commit 0cdf7f7

Browse files
authored
refactor #67 Remove deprecated validators (sstok)
This PR was merged into the 2.0-dev branch. labels: bc-break Discussion ---------- | Q | A | ------------- | --- | Branch? | main | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Fixed tickets | | License | MIT Commits ------- f46273d Update branch-alias 2dd89be Remove deprecated validators
2 parents 7ad6e57 + 2dd89be commit 0cdf7f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+11
-2933
lines changed

README.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -48,40 +48,6 @@ Validates the passwords strength-level (weak, medium, strong etc).
4848

4949
Validates the passwords using explicitly configured requirements (letters, caseDiff, numbers, requireSpecialCharacter).
5050

51-
### [Password blacklisting](docs/blacklist.md) (deprecated)
52-
53-
⚠️ **DEPRECATED**
54-
55-
> This validator is deprecated in favor of the [PasswordCommonList Validator](https://github.com/rollerworks/password-common-list).
56-
>
57-
> The PasswordCommonList validator contains a big list of commonly used passwords, many that are known to be insecure.
58-
> As updating the list of forbidden passwords is not something done regularly this is recommended over manually updating.
59-
>
60-
> Alternatively the Symfony [NotCompromisedPassword] validator can be used for a more regularly updated list.
61-
62-
There are times you want forbid (blacklist) a password from usage.
63-
64-
Passwords are blacklisted using providers which can either be an array or
65-
(flat-file) database (which you can update regularly).
66-
67-
With the default installation the following providers can be used:
68-
69-
* Noop: Default provider, does nothing.
70-
71-
* Array: Simple in memory blacklist provider (not recommended for big lists)
72-
73-
* Sqlite: Provides the blacklist using a SQLite3 database file.
74-
75-
* Pdo: Provides the blacklist using the PDO extension.
76-
77-
### PwnedPassword (deprecated)
78-
79-
⚠️ **This validator is deprecated in favor of the Symfony [NotCompromisedPassword] validator.**
80-
81-
Validates that the requested password was not found in a trove of compromised passwords found at <https://haveibeenpwned.com/>.
82-
83-
To enable this you must install the suggested package "guzzlehttp/psr7" as well as a HttpClient such as "php-http/guzzle6-adapter".
84-
8551
## Versioning
8652

8753
For transparency and insight into the release cycle, and for striving

UPGRADE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
UPGRADE
22
=======
33

4+
## Upgrade from 1.7 to 2.0
5+
6+
* The blacklist validator was removed.
7+
8+
Use the [NotCompromisedPassword](https://symfony.com/doc/current/reference/constraints/NotCompromisedPassword.html)
9+
validator or [PasswordCommonList Validator](https://github.com/rollerworks/password-common-list) instead.
10+
11+
* The PwnedPassword validator was removed in favor of the Symfon
12+
[NotCompromisedPassword](https://symfony.com/doc/current/reference/constraints/NotCompromisedPassword.html) validator
13+
414
## Upgrade from 1.6 to 1.7
515

616
* The blacklist validator was deprecated in favor of the [PasswordCommonList Validator](https://github.com/rollerworks/password-common-list).

composer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,17 @@
1616
],
1717
"require": {
1818
"php": ">=7.3",
19-
"psr/container": "^1.0 || ^2.0",
2019
"symfony/deprecation-contracts": "^2.4 || ^3.0",
2120
"symfony/polyfill-mbstring": "^1.5.0",
2221
"symfony/translation": "^4.4 || ^5.0 || ^6.0",
2322
"symfony/validator": "^4.4 || ^5.0 || ^6.0"
2423
},
2524
"require-dev": {
26-
"guzzlehttp/psr7": "^1.4",
27-
"php-http/httplug": "^1.1",
2825
"phpspec/prophecy": "^1.10.3",
2926
"phpspec/prophecy-phpunit": "^2.0",
3027
"phpunit/phpunit": "^9.5",
3128
"psr/log": "^1.0 || ^2.0",
3229
"symfony/config": "^4.4 || ^5.0 || ^6.0",
33-
"symfony/console": "^4.4 || ^5.0 || ^6.0",
3430
"symfony/phpunit-bridge": "^5.3 || ^6.0"
3531
},
3632
"autoload": {
@@ -46,7 +42,7 @@
4642
},
4743
"extra": {
4844
"branch-alias": {
49-
"dev-main": "1.7-dev"
45+
"dev-main": "2.0-dev"
5046
}
5147
},
5248
"config": {

docs/blacklist.md

Lines changed: 0 additions & 205 deletions
This file was deleted.

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ parameters:
1212
- "#Casting to string something that's already string#"
1313

1414
# Tests
15-
- '#Parameter \#1 \$password of method Rollerworks\\Component\\PasswordStrength\\Blacklist\\[a-zA-Z]+\:\:isBlacklisted\(\) expects string#'
1615
- '#Call to an undefined method Prophecy\\Prophecy\\ObjectProphecy::[a-zA-Z0-9_]+\(\)#'

src/Blacklist/ArrayProvider.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Blacklist/BlacklistProviderInterface.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)