Skip to content

Commit

Permalink
Internal: Add __serialize() and __unserialize() to AppKernel.php to i…
Browse files Browse the repository at this point in the history
…mprove support for PHP 8.1+
  • Loading branch information
LudiscapeXApi authored Oct 12, 2024
1 parent 6482a47 commit 8d76d00
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ class AppKernel extends Kernel
{
protected $rootDir;

/*
Update for PHP 8 support DamienR : AppKernel implements the Serializable interface, which is deprecated.
Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)
*/
public function __serialize(): array
{
return [];
}

public function __unserialize(array $data): void
{
// Implement the logic to unserialize the object
}

public function registerBundles()
{
$bundles = array(
Expand Down

0 comments on commit 8d76d00

Please sign in to comment.