Skip to content

Commit 8d76d00

Browse files
Internal: Add __serialize() and __unserialize() to AppKernel.php to improve support for PHP 8.1+
1 parent 6482a47 commit 8d76d00

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/AppKernel.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ class AppKernel extends Kernel
1212
{
1313
protected $rootDir;
1414

15+
/*
16+
Update for PHP 8 support DamienR : AppKernel implements the Serializable interface, which is deprecated.
17+
Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)
18+
*/
19+
public function __serialize(): array
20+
{
21+
return [];
22+
}
23+
24+
public function __unserialize(array $data): void
25+
{
26+
// Implement the logic to unserialize the object
27+
}
28+
1529
public function registerBundles()
1630
{
1731
$bundles = array(

0 commit comments

Comments
 (0)