Skip to content

Commit b230059

Browse files
Merge branch '7.4' into 8.0
* 7.4: [PhpUnitBridge] Silence deprecation of __sleep/wakeup() use non-reserved keyword as key column name, quote key value
2 parents 86d305f + b276908 commit b230059

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

DeprecationErrorHandler.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ public function handleError($type, $msg, $file, $line, $context = [])
171171
exit(1);
172172
}
173173

174+
if (\PHP_VERSION_ID >= 80500 && \in_array($msg, [
175+
'The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary)',
176+
'The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary)',
177+
], true)) {
178+
return null;
179+
}
180+
174181
if ('legacy' === $group) {
175182
$this->deprecationGroups[$group]->addNotice();
176183
} elseif ($deprecation->originatesFromAnObject()) {

0 commit comments

Comments
 (0)