Skip to content

Commit 95b3540

Browse files
committed
fix: DataCollector __wakeup changed to __unserialize in Symfony 8
1 parent ef11ccf commit 95b3540

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
44

55
# Version 2
66

7+
# 2.3.1 - 2026-04-25
8+
9+
- Fix compatibility issue with Symfony 8.
10+
711
# 2.3.0 - 2025-01-05
812

913
- Compatibility with Symfony 8.

src/Collector/Collector.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ public function __construct(?int $capturedBodyLength = null)
3030
$this->reset();
3131
}
3232

33+
public function __unserialize(array $data): void
34+
{
35+
$this->capturedBodyLength = null;
36+
37+
parent::__unserialize($data);
38+
}
39+
40+
/**
41+
* @legacy Support Symfony < 7.4
42+
*/
3343
public function __wakeup(): void
3444
{
3545
$this->capturedBodyLength = null;

0 commit comments

Comments
 (0)