Skip to content

Commit 8b16954

Browse files
Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages
1 parent 2eda8a1 commit 8b16954

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Adapter/ExtLdap/Connection.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,12 @@ class Connection extends AbstractConnection
3939
private bool $bound = false;
4040
private ?LDAPConnection $connection = null;
4141

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

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

Adapter/ExtLdap/Query.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@ class Query extends AbstractQuery
3030

3131
private array $serverctrls = [];
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)