Skip to content

Commit 4a1920e

Browse files
committed
Hack to support Symfony 6 on PHP 8+ using attribute as comment marker
1 parent af3f617 commit 4a1920e

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
, "symfony/routing": "^2.6|^3.0|^4.0|^5.0|^6.0"
3636
}
3737
, "require-dev": {
38-
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
39-
"symfony/http-foundation": "^2.6|^3.0|^4.0|^5.0"
38+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
4039
}
4140
}

src/Ratchet/Session/Storage/Proxy/VirtualProxy.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public function __construct(\SessionHandlerInterface $handler) {
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function getId() {
29+
#[HackSupportForSymfony6] public function getId(): string { /*
30+
public function getId() { /**/
3031
return $this->_sessionId;
3132
}
3233

@@ -40,7 +41,8 @@ public function setId($id) {
4041
/**
4142
* {@inheritdoc}
4243
*/
43-
public function getName() {
44+
#[HackSupportForSymfony6] public function getName(): string { /*
45+
public function getName() { /**/
4446
return $this->_sessionName;
4547
}
4648

src/Ratchet/Session/Storage/VirtualSessionStorage.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function __construct(\SessionHandlerInterface $handler, $sessionId, Handl
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
public function start() {
28+
#[HackSupportForSymfony6] public function start(): bool { /*
29+
public function start() { /**/
2930
if ($this->started && !$this->closed) {
3031
return true;
3132
}
@@ -51,8 +52,10 @@ public function start() {
5152
/**
5253
* {@inheritdoc}
5354
*/
54-
public function regenerate($destroy = false, $lifetime = null) {
55+
#[HackSupportForSymfony6] public function regenerate(bool $destroy = false, ?int $lifetime = null): bool { /*
56+
public function regenerate($destroy = false, $lifetime = null) { /**/
5557
// .. ?
58+
return false;
5659
}
5760

5861
/**

0 commit comments

Comments
 (0)