Skip to content

Commit 48bad91

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

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Pipes/UnixPipes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public function __construct(?bool $ttyMode, bool $ptyMode, mixed $input, bool $h
3535
parent::__construct($input);
3636
}
3737

38-
public function __sleep(): array
38+
public function __serialize(): array
3939
{
4040
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
4141
}
4242

43-
public function __wakeup(): void
43+
public function __unserialize(array $data): void
4444
{
4545
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
4646
}

Pipes/WindowsPipes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ public function __construct(mixed $input, bool $haveReadSupport)
8888
parent::__construct($input);
8989
}
9090

91-
public function __sleep(): array
91+
public function __serialize(): array
9292
{
9393
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
9494
}
9595

96-
public function __wakeup(): void
96+
public function __unserialize(array $data): void
9797
{
9898
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
9999
}

Process.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,12 @@ public static function fromShellCommandline(string $command, ?string $cwd = null
194194
return $process;
195195
}
196196

197-
public function __sleep(): array
197+
public function __serialize(): array
198198
{
199199
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
200200
}
201201

202-
/**
203-
* @return void
204-
*/
205-
public function __wakeup()
202+
public function __unserialize(array $data): void
206203
{
207204
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
208205
}

0 commit comments

Comments
 (0)