Skip to content

Commit 6fc4c44

Browse files
Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages
1 parent e4f94e6 commit 6fc4c44

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Loader/Configurator/CollectionConfigurator.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,12 @@ public function __construct(RouteCollection $parent, string $name, ?self $parent
3838
$this->parentPrefixes = $parentPrefixes;
3939
}
4040

41-
public function __sleep(): array
41+
public function __serialize(): array
4242
{
4343
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
4444
}
4545

46-
/**
47-
* @return void
48-
*/
49-
public function __wakeup()
46+
public function __unserialize(array $data): void
5047
{
5148
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
5249
}

Loader/Configurator/ImportConfigurator.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@ public function __construct(RouteCollection $parent, RouteCollection $route)
3030
$this->route = $route;
3131
}
3232

33-
public function __sleep(): array
33+
public function __serialize(): array
3434
{
3535
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
3636
}
3737

38-
/**
39-
* @return void
40-
*/
41-
public function __wakeup()
38+
public function __unserialize(array $data): void
4239
{
4340
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
4441
}

0 commit comments

Comments
 (0)