Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5428fef

Browse filesBrowse files
Merge branch '5.0'
* 5.0: [Security/Core] fix merge fix typo [Validator] clarify stringable type annotations [Security/Core] fix some annotations
2 parents 14c95a9 + 2f94386 commit 5428fef
Copy full SHA for 5428fef

7 files changed

+42-33Lines changed: 42 additions & 33 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14+
use Symfony\Component\Security\Core\User\UserInterface;
15+
1416
/**
1517
* AnonymousToken represents an anonymous token.
1618
*
@@ -21,9 +23,9 @@ class AnonymousToken extends AbstractToken
2123
private $secret;
2224

2325
/**
24-
* @param string $secret A secret used to make sure the token is created by the app and not by a malicious client
25-
* @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string
26-
* @param string[] $roles An array of roles
26+
* @param string $secret A secret used to make sure the token is created by the app and not by a malicious client
27+
* @param string|\Stringable|UserInterface $user
28+
* @param string[] $roles
2729
*/
2830
public function __construct(string $secret, $user, array $roles = [])
2931
{
Collapse file

‎src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14+
use Symfony\Component\Security\Core\User\UserInterface;
15+
1416
/**
1517
* PreAuthenticatedToken implements a pre-authenticated token.
1618
*
@@ -22,10 +24,10 @@ class PreAuthenticatedToken extends AbstractToken
2224
private $providerKey;
2325

2426
/**
25-
* @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string
26-
* @param mixed $credentials The user credentials
27-
* @param string $providerKey The provider key
28-
* @param string[] $roles An array of roles
27+
* @param string|\Stringable|UserInterface $user
28+
* @param mixed $credentials
29+
* @param string $providerKey
30+
* @param string[] $roles
2931
*/
3032
public function __construct($user, $credentials, string $providerKey, array $roles = [])
3133
{
Collapse file

‎src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14+
use Symfony\Component\Security\Core\User\UserInterface;
15+
1416
/**
1517
* TokenInterface is the interface for the user authentication information.
1618
*
@@ -45,8 +47,7 @@ public function getCredentials();
4547
/**
4648
* Returns a user representation.
4749
*
48-
* @return string|object Can be a UserInterface instance, an object implementing a __toString method,
49-
* or the username as a regular string
50+
* @return string|\Stringable|UserInterface
5051
*
5152
* @see AbstractToken::setUser()
5253
*/
@@ -58,7 +59,7 @@ public function getUser();
5859
* The user can be a UserInterface instance, or an object implementing
5960
* a __toString method or the username as a regular string.
6061
*
61-
* @param string|object $user The user
62+
* @param string|\Stringable|UserInterface $user
6263
*
6364
* @throws \InvalidArgumentException
6465
*/
Collapse file

‎src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication\Token;
1313

14+
use Symfony\Component\Security\Core\User\UserInterface;
15+
1416
/**
1517
* UsernamePasswordToken implements a username and password token.
1618
*
@@ -22,10 +24,10 @@ class UsernamePasswordToken extends AbstractToken
2224
private $providerKey;
2325

2426
/**
25-
* @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method
26-
* @param mixed $credentials This usually is the password of the user
27-
* @param string $providerKey The provider key
28-
* @param string[] $roles An array of roles
27+
* @param string|\Stringable|UserInterface $user The username (like a nickname, email address, etc.) or a UserInterface instance
28+
* @param mixed $credentials
29+
* @param string $providerKey
30+
* @param string[] $roles
2931
*
3032
* @throws \InvalidArgumentException
3133
*/
Collapse file

‎src/Symfony/Component/Validator/ConstraintViolation.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ConstraintViolation.php
+16-14Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,22 @@ class ConstraintViolation implements ConstraintViolationInterface
3232
/**
3333
* Creates a new constraint violation.
3434
*
35-
* @param string|object $message The violation message as a string or a stringable object
36-
* @param string $messageTemplate The raw violation message
37-
* @param array $parameters The parameters to substitute in the
38-
* raw violation message
39-
* @param mixed $root The value originally passed to the
40-
* validator
41-
* @param string $propertyPath The property path from the root
42-
* value to the invalid value
43-
* @param mixed $invalidValue The invalid value that caused this
44-
* violation
45-
* @param int|null $plural The number for determining the plural
46-
* form when translating the message
47-
* @param string|null $code The error code of the violation
48-
* @param mixed $cause The cause of the violation
35+
* @param string|\Stringable $message The violation message as a string or a stringable object
36+
* @param string $messageTemplate The raw violation message
37+
* @param array $parameters The parameters to substitute in the
38+
* raw violation message
39+
* @param mixed $root The value originally passed to the
40+
* validator
41+
* @param string $propertyPath The property path from the root
42+
* value to the invalid value
43+
* @param mixed $invalidValue The invalid value that caused this
44+
* violation
45+
* @param int|null $plural The number for determining the plural
46+
* form when translating the message
47+
* @param mixed $code The error code of the violation
48+
* @param Constraint|null $constraint The constraint whose validation
49+
* caused the violation
50+
* @param mixed $cause The cause of the violation
4951
*/
5052
public function __construct($message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, string $code = null, Constraint $constraint = null, $cause = null)
5153
{
Collapse file

‎src/Symfony/Component/Validator/ConstraintViolationInterface.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ConstraintViolationInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface ConstraintViolationInterface
3636
/**
3737
* Returns the violation message.
3838
*
39-
* @return string|object The violation message as a string or a stringable object
39+
* @return string|\Stringable The violation message as a string or a stringable object
4040
*/
4141
public function getMessage();
4242

Collapse file

‎src/Symfony/Component/Validator/Context/ExecutionContextInterface.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Context/ExecutionContextInterface.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ interface ExecutionContextInterface
6464
/**
6565
* Adds a violation at the current node of the validation graph.
6666
*
67-
* @param string|object $message The error message as a string or a stringable object
68-
* @param array $params The parameters substituted in the error message
67+
* @param string|\Stringable $message The error message as a string or a stringable object
68+
* @param array $params The parameters substituted in the error message
6969
*/
7070
public function addViolation(string $message, array $params = []);
7171

@@ -81,8 +81,8 @@ public function addViolation(string $message, array $params = []);
8181
* ->setTranslationDomain('number_validation')
8282
* ->addViolation();
8383
*
84-
* @param string|object $message The error message as a string or a stringable object
85-
* @param array $parameters The parameters substituted in the error message
84+
* @param string|\Stringable $message The error message as a string or a stringable object
85+
* @param array $parameters The parameters substituted in the error message
8686
*
8787
* @return ConstraintViolationBuilderInterface The violation builder
8888
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.