You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RememberMe/RememberMeDetails.php
+6-66Lines changed: 6 additions & 66 deletions
Original file line number
Diff line number
Diff line change
@@ -21,56 +21,11 @@ class RememberMeDetails
21
21
{
22
22
publicconstCOOKIE_DELIMITER = ':';
23
23
24
-
private ?string$userFqcn = null;
25
-
privatestring$userIdentifier;
26
-
privateint$expires;
27
-
privatestring$value;
28
-
29
-
/**
30
-
* @param string $userIdentifier
31
-
* @param int $expires
32
-
* @param string $value
33
-
*/
34
24
publicfunction__construct(
35
-
$userIdentifier,
36
-
$expires,
37
-
$value,
25
+
privatestring$userIdentifier,
26
+
privateint$expires,
27
+
privatestring$value,
38
28
) {
39
-
if (\func_num_args() > 3) {
40
-
if (\func_num_args() < 5 || func_get_arg(4)) {
41
-
trigger_deprecation('symfony/security-http', '7.4', 'Passing a user FQCN to %s() is deprecated. The user class will be removed from the remember-me cookie in 8.0.', __CLASS__, __NAMESPACE__);
42
-
}
43
-
44
-
if (!\is_string($userIdentifier)) {
45
-
thrownew \TypeError(\sprintf('Argument 1 passed to "%s()" must be a string, "%s" given.', __METHOD__, get_debug_type($userIdentifier)));
46
-
}
47
-
48
-
$this->userFqcn = $userIdentifier;
49
-
$userIdentifier = $expires;
50
-
$expires = $value;
51
-
52
-
if (\func_num_args() <= 3) {
53
-
thrownew \TypeError(\sprintf('Argument 4 passed to "%s()" must be a string, the argument is missing.', __METHOD__));
54
-
}
55
-
56
-
$value = func_get_arg(3);
57
-
}
58
-
59
-
if (!\is_string($userIdentifier)) {
60
-
thrownew \TypeError(\sprintf('The $userIdentifier argument passed to "%s()" must be a string, "%s" given.', __METHOD__, get_debug_type($userIdentifier)));
61
-
}
62
-
63
-
if (!\is_int($expires) && !preg_match('/^\d+$/', $expires)) {
64
-
thrownew \TypeError(\sprintf('$The $expires argument passed to "%s()" must be an integer, "%s" given.', __METHOD__, get_debug_type($expires)));
65
-
}
66
-
67
-
if (!\is_string($value)) {
68
-
thrownew \TypeError(\sprintf('The $value argument passed to "%s()" must be a string, "%s" given.', __METHOD__, get_debug_type($value)));
@@ -112,16 +62,6 @@ public function withValue(string $value): self
112
62
return$details;
113
63
}
114
64
115
-
/**
116
-
* @deprecated since Symfony 7.4, the user FQCN will be removed from the remember-me cookie in 8.0
117
-
*/
118
-
publicfunctiongetUserFqcn(): string
119
-
{
120
-
trigger_deprecation('symfony/security-http', '7.4', 'The "%s()" method is deprecated: the user FQCN will be removed from the remember-me cookie in 8.0.', __METHOD__);
121
-
122
-
return$this->userFqcn ?? '';
123
-
}
124
-
125
65
publicfunctiongetUserIdentifier(): string
126
66
{
127
67
return$this->userIdentifier;
@@ -140,6 +80,6 @@ public function getValue(): string
140
80
publicfunctiontoString(): string
141
81
{
142
82
// $userIdentifier is encoded because it might contain COOKIE_DELIMITER, we assume other values don't
0 commit comments