Skip to content

Commit 7522189

Browse files
committed
ext/spl: Follow-up on phpGH-9704
1 parent 43def0a commit 7522189

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ PHP NEWS
3838
. INI settings session.sid_length and session.sid_bits_per_character are now
3939
deprecated. (timwolla)
4040

41+
- SPL:
42+
. The SplFixedArray::__wakeup() method has been deprecated as it implements
43+
__serialize() and __unserialize() which need to be overwritten instead.
44+
(TysonAndre)
45+
4146
- Standard:
4247
. Unserializing the uppercase 'S' tag is now deprecated. (timwolla)
4348

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ PHP 8.4 UPGRADE NOTES
463463
hexadecimal session IDs and stop changing these two INI settings.
464464
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
465465

466+
- SPL:
467+
. The SplFixedArray::__wakeup() method has been deprecated as it implements
468+
__serialize() and __unserialize() which need to be overwritten instead.
469+
466470
- Standard:
467471
. Calling stream_context_set_option() with 2 arguments is deprecated.
468472
Use stream_context_set_options() instead.

ext/spl/spl_fixedarray.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "php.h"
2323
#include "zend_interfaces.h"
2424
#include "zend_exceptions.h"
25+
#include "zend_attributes.h"
2526

2627
#include "spl_fixedarray_arginfo.h"
2728
#include "spl_fixedarray.h"

ext/spl/spl_fixedarray.stub.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ class SplFixedArray implements IteratorAggregate, ArrayAccess, Countable, JsonSe
66
{
77
public function __construct(int $size = 0) {}
88

9-
/**
10-
* @tentative-return-type
11-
* @deprecated
12-
*/
9+
/** @tentative-return-type */
10+
#[\Deprecated(since: '8.4', message: 'the __unserialize() method must be overloaded instead')]
1311
public function __wakeup(): void {}
1412

1513
public function __serialize(): array {}

ext/spl/spl_fixedarray_arginfo.h

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)