Skip to content

Commit 4b62871

Browse files
Merge branch '6.4' into 7.3
* 6.4: Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages
2 parents 333b9bd + 6740cdc commit 4b62871

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Chunk/ErrorChunk.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ public function didThrow(?bool $didThrow = null): bool
9292
return $this->didThrow;
9393
}
9494

95-
public function __sleep(): array
95+
public function __serialize(): array
9696
{
9797
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
9898
}
9999

100-
public function __wakeup(): void
100+
public function __unserialize(array $data): void
101101
{
102102
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
103103
}

HttplugClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ public function createUri(string $uri = ''): UriInterface
198198
throw new \LogicException(\sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
199199
}
200200

201-
public function __sleep(): array
201+
public function __serialize(): array
202202
{
203203
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
204204
}
205205

206-
public function __wakeup(): void
206+
public function __unserialize(array $data): void
207207
{
208208
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
209209
}

Response/AmpResponseV4.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ public function getInfo(?string $type = null): mixed
142142
return null !== $type ? $this->info[$type] ?? null : $this->info;
143143
}
144144

145-
public function __sleep(): array
145+
public function __serialize(): array
146146
{
147147
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
148148
}
149149

150-
public function __wakeup(): void
150+
public function __unserialize(array $data): void
151151
{
152152
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
153153
}

Response/AmpResponseV5.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ public function getInfo(?string $type = null): mixed
123123
return null !== $type ? $this->info[$type] ?? null : $this->info;
124124
}
125125

126-
public function __sleep(): array
126+
public function __serialize(): array
127127
{
128128
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
129129
}
130130

131-
public function __wakeup(): void
131+
public function __unserialize(array $data): void
132132
{
133133
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
134134
}

Response/CommonResponseTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ public function toStream(bool $throw = true)
119119
return $stream;
120120
}
121121

122-
public function __sleep(): array
122+
public function __serialize(): array
123123
{
124124
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
125125
}
126126

127-
public function __wakeup(): void
127+
public function __unserialize(array $data): void
128128
{
129129
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
130130
}

Response/TraceableResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public function __construct(
3939
) {
4040
}
4141

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

47-
public function __wakeup(): void
47+
public function __unserialize(array $data): void
4848
{
4949
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
5050
}

0 commit comments

Comments
 (0)