This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Wouter de Jong c757845643 feature #39802 [Security] Extract password hashing from security-core - with proper wording (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Extract password hashing from security-core - with proper wording

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fixes #39698
| License       | MIT
| Doc PR        | todo

This PR renames password "encoders" to password _hashers_ (naming widely used, see e.g. django or laravel).
This also takes the opportunity to extract the logic related to password hashing from security-core, moving it to a new password-hasher component.
Nowadays, many modern web apps and APIs don't deal with passwords at all, that's why splitting makes sense as a step towards making security-core not tied to the password concept.

For upgrading, applications will have to use `passwords_hashers` instead of `encoders` in their security configuration,  and type-hint against `PasswordHasherInterface` (and related) instead of `PasswordEncoderInterface`.

The proposed API is not much different from the encoder one regarding behavior and signatures, and it is slightly more close to the PHP built-in password hashing API:

```php
namespace Symfony\Component\PasswordHasher;

interface PasswordHasherInterface
{
    public function hash(string $plainPassword): string;

    public function verify(string $hashedPassword, string $plainPassword): bool;

    public function needsRehash(string $hashedPassword): bool;
}
```

Commits
-------

c5c981c559 [Security] Extract password hashing from security-core - using the right naming
2021-02-12 16:53:00 +01:00
..
Asset Merge branch '5.2' into 5.x 2021-01-27 11:19:48 +01:00
BrowserKit Merge branch '5.2' into 5.x 2021-01-27 17:29:32 +01:00
Cache Merge branch '5.2' into 5.x 2021-02-08 11:24:30 +01:00
Config Merge branch '5.1' into 5.2 2021-01-27 11:15:41 +01:00
Console feature #39976 [Console] Add bright colors to console. (CupOfTea696) 2021-01-28 23:09:26 +01:00
CssSelector Merge branch '4.4' into 5.1 2021-01-27 11:01:46 +01:00
DependencyInjection Merge branch '5.2' into 5.x 2021-02-08 11:24:30 +01:00
DomCrawler Merge branch '5.2' into 5.x 2021-01-27 11:19:48 +01:00
Dotenv Merge branch '4.4' into 5.1 2021-01-27 11:01:46 +01:00
ErrorHandler Merge branch '5.2' into 5.x 2021-02-11 09:21:33 +01:00
EventDispatcher Merge branch '5.1' into 5.2 2021-01-27 11:36:42 +01:00
ExpressionLanguage Merge branch '4.4' into 5.2 2021-02-12 11:38:38 +01:00
Filesystem Merge branch '5.2' into 5.x 2021-02-12 11:47:00 +01:00
Finder Merge branch '4.4' into 5.2 2021-02-12 11:38:38 +01:00
Form Merge branch '5.2' into 5.x 2021-02-10 18:27:22 +01:00
HttpClient Merge branch '5.2' into 5.x 2021-02-08 11:24:30 +01:00
HttpFoundation bug #40114 [HttpFoundation] Fix consistency in sessions not found exceptions (jderusse) 2021-02-11 20:46:04 +01:00
HttpKernel Merge branch '5.2' into 5.x 2021-02-10 18:27:22 +01:00
Inflector Changed private static array-properties to const 2021-01-25 00:44:26 +01:00
Intl Merge branch '5.2' into 5.x 2021-02-12 11:47:00 +01:00
Ldap Merge branch '5.2' into 5.x 2021-01-27 12:30:19 +01:00
Lock Merge branch '5.2' into 5.x 2021-02-05 18:04:25 +01:00
Mailer Merge branch '5.2' into 5.x 2021-02-03 05:42:38 +01:00
Messenger [Messenger] Added RouterContextMiddleware 2021-02-08 23:23:42 +01:00
Mime Merge branch '4.4' into 5.2 2021-02-05 18:02:58 +01:00
Notifier Fix CS 2021-02-11 08:50:48 +01:00
OptionsResolver Merge branch '5.1' into 5.2 2021-01-27 13:56:27 +01:00
PasswordHasher [Security] Extract password hashing from security-core - using the right naming 2021-02-12 16:42:42 +01:00
Process Merge branch '5.1' into 5.2 2021-01-27 11:15:41 +01:00
PropertyAccess Merge branch '5.1' into 5.2 2021-01-27 11:15:41 +01:00
PropertyInfo Merge branch '5.2' into 5.x 2021-01-27 11:19:48 +01:00
RateLimiter Merge branch '5.2' into 5.x 2021-02-11 09:21:33 +01:00
Routing feature #39732 [Routing] don't decode nor double-encode already encoded slashes when generating URLs (nicolas-grekas) 2021-02-05 09:40:44 +01:00
Security [Security] Extract password hashing from security-core - using the right naming 2021-02-12 16:42:42 +01:00
Semaphore [Semaphore] remove "experimental" status 2021-01-28 15:38:19 +01:00
Serializer Merge branch '5.2' into 5.x 2021-02-03 05:42:38 +01:00
Stopwatch Merge branch '5.1' into 5.2 2021-01-27 11:15:41 +01:00
String [String] Make AsciiSlugger fallback to parent locale's symbolsMap 2021-01-26 10:33:05 +01:00
Templating Merge branch '4.4' into 5.1 2021-01-27 11:01:46 +01:00
Translation Merge branch '5.2' into 5.x 2021-02-08 11:24:30 +01:00
Uid [Uid] Add UuidFactory to create Ulid and Uuid from timestamps, namespaces and nodes 2021-02-11 13:13:32 +01:00
Validator Merge branch '5.2' into 5.x 2021-01-28 23:08:00 +01:00
VarDumper Merge branch '5.2' into 5.x 2021-01-27 11:19:48 +01:00
VarExporter Merge branch '4.4' into 5.1 2021-01-27 11:01:46 +01:00
WebLink Merge branch '4.4' into 5.1 2021-01-10 17:29:19 +01:00
Workflow Merge branch '5.1' into 5.2 2021-01-27 11:15:41 +01:00
Yaml Merge branch '5.2' into 5.x 2021-02-03 05:42:38 +01:00