Skip to content

Commit 3fa98ce

Browse files
committed
Require mercure 0.6.2 and no publish abilities on client subscribe cookies
1 parent 863919d commit 3fa98ce

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"symfony/dotenv": "^6.1",
8888
"symfony/http-client": "^6.1",
8989
"symfony/maker-bundle": "^1.0",
90-
"symfony/mercure-bundle": "^0.3.4",
90+
"symfony/mercure": "^0.6.2",
91+
"symfony/mercure-bundle": "^0.3.5",
9192
"symfony/messenger": "^6.1",
9293
"symfony/monolog-bundle": "^3.8",
9394
"symfony/phpunit-bridge": "^6.1.3",

src/Mercure/MercureAuthorization.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ public function __construct(
4141
public function getAuthorizationCookie(): Cookie
4242
{
4343
$subscribeTopics = $this->getSubscribeTopics();
44-
// TODO: await merge of https://github.com/symfony/mercure/pull/93 to remove ability to publish any updates and set to null
45-
// May also be able to await a mercure bundle update to set the cookie samesite in mercure configs
46-
$cookie = $this->mercureAuthorization->createCookie($this->requestStack->getCurrentRequest(), $subscribeTopics, [], [], $this->hubName);
44+
$cookie = $this->mercureAuthorization->createCookie($this->requestStack->getCurrentRequest(), $subscribeTopics, null, [], $this->hubName);
4745

4846
return $cookie
4947
->withSameSite($this->cookieSameSite)

0 commit comments

Comments
 (0)