Skip to content

Commit ab05dd3

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [Console] Prevent PHP 8.1 str_replace deprec on null Improve DE translations for Form/Validator [Serializer] Fix ignore attribute in Xml files [Console] Escape % in command name & description from getDefault*() [WebProfilerBundle] Fix dark theme selected line highlight color & reuse css vars [Mime] Check that the path is a file in the DataPart::fromPath [Cache] do not pass null to strlen() [Mailer] Sort transports alphabetically [Security] Fix some phpdoc [Serializer] Get attributeContext after converting name
2 parents 7350abf + 8531f00 commit ab05dd3

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Authenticator/Passport/Credentials/PasswordCredentials.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* Implements password credentials.
1818
*
19-
* These plaintext passwords are checked by the UserPasswordEncoder during
19+
* These plaintext passwords are checked by the UserPasswordHasher during
2020
* authentication.
2121
*
2222
* @author Wouter de Jong <[email protected]>

Authenticator/Passport/Passport.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\CredentialsInterface;
1818

1919
/**
20-
* The default implementation for passports.
20+
* A Passport contains all security-related information that needs to be
21+
* validated during authentication.
22+
*
23+
* A passport badge can be used to add any additional information to the
24+
* passport.
2125
*
2226
* @author Wouter de Jong <[email protected]>
2327
*/
@@ -55,7 +59,16 @@ public function getUser(): UserInterface
5559
return $this->user;
5660
}
5761

58-
public function addBadge(BadgeInterface $badge): static
62+
/**
63+
* Adds a new security badge.
64+
*
65+
* A passport can hold only one instance of the same security badge.
66+
* This method replaces the current badge if it is already set on this
67+
* passport.
68+
*
69+
* @return $this
70+
*/
71+
public function addBadge(BadgeInterface $badge): PassportInterface
5972
{
6073
$this->badges[\get_class($badge)] = $badge;
6174

0 commit comments

Comments
 (0)