Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55582fd

Browse files
committed
minor #51617 [PsrHttpMessageBridge] Remove Cookie::create() detection (derrabus)
This PR was merged into the 6.4 branch. Discussion ---------- [PsrHttpMessageBridge] Remove `Cookie::create()` detection | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A This method exists since #28447 (Symfony 4.2) Commits ------- 94e75e6 [PsrHttpMessageBridge] Remove Cookie::create() detection
2 parents 1f257d3 + 94e75e6 commit 55582fd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Bridge/PsrHttpMessage/Tests/Functional/CovertTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ public static function responseProvider(): array
195195
['x-symfony' => ['3.4']]
196196
);
197197

198-
if (method_exists(Cookie::class, 'create')) {
199-
$cookie = Cookie::create('city', 'Lille', new \DateTime('Wed, 13 Jan 2021 22:23:01 GMT'));
200-
} else {
201-
$cookie = new Cookie('city', 'Lille', new \DateTime('Wed, 13 Jan 2021 22:23:01 GMT'));
202-
}
198+
$cookie = Cookie::create('city', 'Lille', new \DateTime('Wed, 13 Jan 2021 22:23:01 GMT'));
203199

204200
$sfResponse->headers->setCookie($cookie);
205201
$body = Psr7Stream::create();

0 commit comments

Comments
 (0)