Skip to content

ext/spl: Follow-up on GH-9704 #15295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ PHP NEWS
. INI settings session.sid_length and session.sid_bits_per_character are now
deprecated. (timwolla)

- SPL:
. The SplFixedArray::__wakeup() method has been deprecated as it implements
__serialize() and __unserialize() which need to be overwritten instead.
(TysonAndre)

- Standard:
. Unserializing the uppercase 'S' tag is now deprecated. (timwolla)

Expand Down
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ PHP 8.4 UPGRADE NOTES
hexadecimal session IDs and stop changing these two INI settings.
RFC: https://wiki.php.net/rfc/deprecations_php_8_4

- SPL:
. The SplFixedArray::__wakeup() method has been deprecated as it implements
__serialize() and __unserialize() which need to be overwritten instead.

- Standard:
. Calling stream_context_set_option() with 2 arguments is deprecated.
Use stream_context_set_options() instead.
Expand Down
1 change: 1 addition & 0 deletions ext/spl/spl_fixedarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "php.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "zend_attributes.h"

#include "spl_fixedarray_arginfo.h"
#include "spl_fixedarray.h"
Expand Down
6 changes: 2 additions & 4 deletions ext/spl/spl_fixedarray.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ class SplFixedArray implements IteratorAggregate, ArrayAccess, Countable, JsonSe
{
public function __construct(int $size = 0) {}

/**
* @tentative-return-type
* @deprecated
*/
/** @tentative-return-type */
#[\Deprecated(since: '8.4', message: 'this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()')]
public function __wakeup(): void {}

public function __serialize(): array {}
Expand Down
15 changes: 14 additions & 1 deletion ext/spl/spl_fixedarray_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading