8000 ext/spl: Follow-up on GH-9704 (#15295) · php/php-src@c8b45aa · GitHub
[go: up one dir, main page]

Skip to content

Commit c8b45aa

Browse files
GirgiasTimWolla
andauthored
ext/spl: Follow-up on GH-9704 (#15295)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
1 parent bb2836e commit c8b45aa

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
@@ -41,6 +41,11 @@ PHP NEWS
4141
. INI settings session.sid_length and session.sid_bits_per_character are now
4242
deprecated. (timwolla)
4343

44+
- SPL:
45+
. The SplFixedArray::__wakeup() method has been deprecated as it implements
46+
__serialize() and __unserialize() which need to be overwritten instead.
47+
(TysonAndre)
48+
4449
- Standard:
4550
. Unserializing the uppercase 'S' tag is now deprecated. (timwolla)
4651

UPGRADING

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

470+
- SPL:
471+
. The SplFixedArray::__wakeup() method has been deprecated as it implements
472+
__serialize() and __unserialize() which need to be overwritten instead.
473+
470474
- Standard:
471475
. Calling stream_context_set_option() with 2 arguments is deprecated.
472476
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: 'this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()')]
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)
0