Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb426fc

Browse files
authored
Fixes#162: __sleep() & __wakeup() is deprecated in PHP 8.5 (#163)
1 parent7159809 commitbb426fc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎src/Enum.php‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ final public function __sleep()
9696
thrownewLogicException('Serialization is not supported by default in this pseudo-enum implementation');
9797
}
9898

99+
/**
100+
* @throws LogicException Serialization is not supported by default in this pseudo-enum implementation
101+
*
102+
* @return array<string, mixed>
103+
*/
104+
publicfunction__serialize():array
105+
{
106+
thrownewLogicException('Serialization is not supported by default in this pseudo-enum implementation');
107+
}
108+
99109
/**
100110
* @throws LogicException Serialization is not supported by default in this pseudo-enum implementation
101111
*
@@ -106,6 +116,16 @@ final public function __wakeup()
106116
thrownewLogicException('Serialization is not supported by default in this pseudo-enum implementation');
107117
}
108118

119+
/**
120+
* @throws LogicException Serialization is not supported by default in this pseudo-enum implementation
121+
*
122+
* @param array<string, mixed> $data
123+
*/
124+
publicfunction__unserialize(array$data):void
125+
{
126+
thrownewLogicException('Serialization is not supported by default in this pseudo-enum implementation');
127+
}
128+
109129
/**
110130
* Get the value of the enumerator
111131
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp