mirror of
https://github.com/guzzle/guzzle.git
synced 2025-01-17 21:38:16 +01:00
Merge branch '7.5' into 7.6
This commit is contained in:
commit
8444a2bacf
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
|
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
|
||||||
|
|
||||||
|
## 7.6.1 - 2023-05-15
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values
|
||||||
|
|
||||||
## 7.6.0 - 2023-05-14
|
## 7.6.0 - 2023-05-14
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -58,7 +58,13 @@ class SetCookie
|
|||||||
} else {
|
} else {
|
||||||
foreach (\array_keys(self::$defaults) as $search) {
|
foreach (\array_keys(self::$defaults) as $search) {
|
||||||
if (!\strcasecmp($search, $key)) {
|
if (!\strcasecmp($search, $key)) {
|
||||||
$data[$search] = $value;
|
if ($search === 'Max-Age') {
|
||||||
|
if (is_numeric($value)) {
|
||||||
|
$data[$search] = (int) $value;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$data[$search] = $value;
|
||||||
|
}
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -367,14 +367,44 @@ class SetCookieTest extends TestCase
|
|||||||
'Value' => 'synced',
|
'Value' => 'synced',
|
||||||
'Domain' => '.example.com',
|
'Domain' => '.example.com',
|
||||||
'Path' => '/',
|
'Path' => '/',
|
||||||
'Expires' => \time() + 604800,
|
'Expires' => null,
|
||||||
'Secure' => true,
|
'Secure' => true,
|
||||||
'Discard' => false,
|
'Discard' => false,
|
||||||
'Max-Age' => 604800,
|
'Max-Age' => null,
|
||||||
'HttpOnly' => true,
|
'HttpOnly' => true,
|
||||||
'SameSite' => 'None',
|
'SameSite' => 'None',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'SESS3a6f27284c4d8b34b6f4ff98cb87703e=Ts-5YeSyvOCMS%2CzkEb9eDfW4C4ZNFOcRYdu-3JpEAXIm58aH; expires=Wed, 07-Jun-2023 15:56:35 GMT; Max-Age=2000000; path=/; domain=.example.com; HttpOnly; SameSite=Lax',
|
||||||
|
[
|
||||||
|
'Name' => 'SESS3a6f27284c4d8b34b6f4ff98cb87703e',
|
||||||
|
'Value' => 'Ts-5YeSyvOCMS%2CzkEb9eDfW4C4ZNFOcRYdu-3JpEAXIm58aH',
|
||||||
|
'Domain' => '.example.com',
|
||||||
|
'Path' => '/',
|
||||||
|
'Expires' => 'Wed, 07-Jun-2023 15:56:35 GMT',
|
||||||
|
'Secure' => false,
|
||||||
|
'Discard' => false,
|
||||||
|
'Max-Age' => 2000000,
|
||||||
|
'HttpOnly' => true,
|
||||||
|
'SameSite' => 'Lax',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'SESS3a6f27284c4d8b34b6f4ff98cb87703e=Ts-5YeSyvOCMS%2CzkEb9eDfW4C4ZNFOcRYdu-3JpEAXIm58aH; expires=Wed, 07-Jun-2023 15:56:35 GMT; Max-Age=qwerty; path=/; domain=.example.com; HttpOnly; SameSite=Lax',
|
||||||
|
[
|
||||||
|
'Name' => 'SESS3a6f27284c4d8b34b6f4ff98cb87703e',
|
||||||
|
'Value' => 'Ts-5YeSyvOCMS%2CzkEb9eDfW4C4ZNFOcRYdu-3JpEAXIm58aH',
|
||||||
|
'Domain' => '.example.com',
|
||||||
|
'Path' => '/',
|
||||||
|
'Expires' => 'Wed, 07-Jun-2023 15:56:35 GMT',
|
||||||
|
'Secure' => false,
|
||||||
|
'Discard' => false,
|
||||||
|
'Max-Age' => null,
|
||||||
|
'HttpOnly' => true,
|
||||||
|
'SameSite' => 'Lax',
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user