-
Notifications
You must be signed in to change notification settings - Fork 56
/
deprecated.xml
134 lines (113 loc) · 5.38 KB
/
deprecated.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 65716f4761484e314ee86fa23493f00f7823ace1 Maintainer: mumumu Status: ready -->
<sect1 xml:id="migration82.deprecated">
<title>PHP 8.2.x で推奨されなくなる機能</title>
<sect2 xml:id="migration82.deprecated.core">
<title>PHP コア</title>
<sect3 xml:id="migration82.deprecated.core.dynamic-properties">
<title>動的なプロパティの利用</title>
<para>
クラスにアトリビュート <code>#[\AllowDynamicProperties]</code> を付加していない場合、
動的にプロパティを生成することは推奨されなくなりました。
<classname>stdClass</classname> で動的なプロパティを使うことはまだ許可されています。
マジックメソッド
<link linkend="object.get">__get()</link> / <link linkend="object.set">__set()</link>
を使う場合は、この変更の影響は受けません。
動的なプロパティによる非推奨の警告については、以下によって対応できます:
<simplelist>
<member>プロパティを宣言する (好ましい対応方法です)</member>
<member>
クラスにアトリビュート <code>#[\AllowDynamicProperties]</code> を付加する
(すべての子クラスにも適用されます)
</member>
<member>
追加のデータをオブジェクトと関連付ける必要があるが、
そのオブジェクトがデータを所有していない場合、
<classname>WeakMap</classname> を使う
</member>
</simplelist>
</para>
</sect3>
<sect3 xml:id="migration82.deprecated.core.relative-callables">
<title>部分的にしかサポートされていない callable</title>
<para>
<code>$callable()</code> 形式で呼び出せない
(但し、<function>call_user_func</function> を使うと呼び出せる) callable は、推奨されなくなりました。
特に注意すべきなのは以下です:
<simplelist>
<member><code>"self::method"</code></member>
<member><code>"parent::method"</code></member>
<member><code>"static::method"</code></member>
<member><code>["self", "method"]</code></member>
<member><code>["parent", "method"]</code></member>
<member><code>["static", "method"]</code></member>
<member><code>["Foo", "Bar::method"]</code></member>
<member><code>[new Foo, "Bar::method"]</code></member>
</simplelist>
この変更は、
<code>"A::method"</code> や <code>["A", "method"]</code>
のような通常のメソッド呼び出し形式の callable には影響しません。
</para>
<!-- RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables -->
<!-- RFC: https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices -->
</sect3>
<sect3 xml:id="migration82.deprecated.core.dollar-brace-interpolation">
<title><code>"${var}"</code> / <code>"${expr}"</code> 形式の、文字列への値の埋め込み</title>
<para>
<code>"${var}"</code> と <code>"${expr}"</code> 形式の文字列への値の埋め込みは、推奨されなくなりました。
<code>"$var"/"{$var}"</code> や <code>"{${expr}}"</code> 形式をそれぞれ使ってください。
<!-- RFC: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation -->
</para>
</sect3>
</sect2>
<sect2 xml:id="migration82.deprecated.mbstring">
<title>マルチバイト文字列</title>
<para>
'テキストエンコーディング'
<literal>QPrint</literal>, <literal>Base64</literal>,
<literal>Uuencode</literal>, <literal>HTML-ENTITIES</literal> を使うことは、
全ての mbstring の関数で推奨されなくなりました。
mbstring でサポートされている他のテキストエンコーディングと異なり、
これらは Unicode のコードポイント列でエンコードされておらず、
生のバイト列でエンコードされています。
これらのテキストエンコーディングが指定された場合、
ほとんどの mbstring 関数では、何が正しい戻り値なのか明確でありません。
さらに、これらのエンコーディングについてはすべて、PHP には別の組み込みの実装が存在します。
たとえば、UUencode されたデータについては、
<function>convert_uuencode</function> / <function>convert_uudecode</function> が使えます。
</para>
</sect2>
<sect2 xml:id="migration82.deprecated.spl">
<title>Standard PHP Library(SPL)</title>
<para>
内部メソッド <methodname>SplFileInfo::_bad_state_ex</methodname> は、推奨されなくなりました。
</para>
</sect2>
<sect2 xml:id="migration82.deprecated.standard">
<title>標準ライブラリ</title>
<para>
<function>utf8_encode</function> と <function>utf8_decode</function> は、推奨されなくなりました。
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->