language/oop5/changelog.xml
8d181538611c512546ac394511aa1d8e900dd9a3
...
...
@@ -3,8 +3,8 @@
3
3
<sect1 xml:id="language.oop5.changelog" xmlns="http://docbook.org/ns/docbook">
4
4
<title>OOP Changelog</title>
5
5
<para>
6
-
Changes to the PHP 5 OOP model are logged here. Descriptions and other notes regarding
7
-
these features are documented within the OOP 5 documentation.
6
+
Changes to the PHP OOP model are logged here. Descriptions and other notes regarding
7
+
these features are documented within the OOP model documentation.
8
8
</para>
9
9
<para>
10
10
<informaltable>
...
...
@@ -17,9 +17,157 @@
17
17
</thead>
18
18
<tbody>
19
19
<row>
20
+
<entry>8.1.0</entry>
21
+
<entry>
22
+
Added: Support for the <modifier>final</modifier> modifier for class constants. Also, interface constants become overridable by default.
23
+
</entry>
24
+
</row>
25
+
<row>
26
+
<entry>8.0.0</entry>
27
+
<entry>
28
+
Added: Support for the <link linkend="language.oop5.basic.nullsafe">nullsafe operator</link> <emphasis>?-&gt;</emphasis> to access properties and methods on objects that may be null.
29
+
</entry>
30
+
</row>
31
+
<row>
32
+
<entry>7.4.0</entry>
33
+
<entry>
34
+
Changed: It is now possible to throw exception within
35
+
<function>__toString</function>.
36
+
</entry>
37
+
</row>
38
+
<row>
39
+
<entry>7.4.0</entry>
40
+
<entry>
41
+
Added: Support for limited return type covariance and argument
42
+
type contravariance. Full variance support is only available if
43
+
autoloading is used. Inside a single file only non-cyclic type
44
+
references are possible.
45
+
</entry>
46
+
</row>
47
+
<row>
48
+
<entry>7.4.0</entry>
49
+
<entry>
50
+
Added: It is now possible to type class properties.
51
+
</entry>
52
+
</row>
53
+
<row>
54
+
<entry>7.3.0</entry>
55
+
<entry>
56
+
Incompatibility: Argument unpacking of
57
+
<classname>Traversable</classname>s with non-&integer; keys is no longer
58
+
supported. This behaviour was not intended and thus has been removed.
59
+
</entry>
60
+
</row>
61
+
<row>
62
+
<entry>7.3.0</entry>
63
+
<entry>
64
+
Incompatibility: In previous versions it was possible to separate the
65
+
static properties by assigning a reference. This has been removed.
66
+
</entry>
67
+
</row>
68
+
<row>
69
+
<entry>7.3.0</entry>
70
+
<entry>
71
+
Changed: The <link linkend="language.operators.type">instanceof</link>
72
+
operator now allows literals as the first operand, in which case the
73
+
result is always &false;.
74
+
</entry>
75
+
</row>
76
+
<row>
77
+
<entry>7.2.0</entry>
78
+
<entry>
79
+
Deprecated: The <function>__autoload</function> method has been
80
+
deprecated in favour of <function>spl_autoload_register</function>.
81
+
</entry>
82
+
</row>
83
+
<row>
84
+
<entry>7.2.0</entry>
85
+
<entry>
86
+
Changed: The following name cannot be used to name classes, interfaces,
87
+
or traits: <literal>object</literal>.
88
+
</entry>
89
+
</row>
90
+
<row>
91
+
<entry>7.2.0</entry>
92
+
<entry>
93
+
Changed: A trailing comma can now be added to the group-use syntax
94
+
for namespaces.
95
+
</entry>
96
+
</row>
97
+
<row>
98
+
<entry>7.2.0</entry>
99
+
<entry>
100
+
Changed: Parameter type widening. Parameter types from overridden
101
+
methods and from interface implementations may now be omitted.
102
+
</entry>
103
+
</row>
104
+
<row>
105
+
<entry>7.2.0</entry>
106
+
<entry>
107
+
Changed: Abstract methods can now be overridden when an abstract class
108
+
extends another abstract class.
109
+
</entry>
110
+
</row>
111
+
<row>
112
+
<entry>7.1.0</entry>
113
+
<entry>
114
+
Changed: The following names cannot be used to name classes, interfaces,
115
+
or traits: <literal>void</literal> and <literal>iterable</literal>.
116
+
</entry>
117
+
</row>
118
+
<row>
119
+
<entry>7.1.0</entry>
120
+
<entry>
121
+
Added: It is now possible to specify the
122
+
<link linkend="language.oop5.visiblity-constants">visibility of
123
+
class constants</link>.
124
+
</entry>
125
+
</row>
126
+
<row>
127
+
<entry>7.0.0</entry>
128
+
<entry>
129
+
Deprecated: <link linkend="language.oop5.static">Static</link> calls
130
+
to methods that are not declared static.
131
+
</entry>
132
+
</row>
133
+
<row>
134
+
<entry>7.0.0</entry>
135
+
<entry>
136
+
Deprecated: PHP 4 style <link linkend="language.oop5.decon">
137
+
constructor</link>. I.e. methods that have the same name as the class
138
+
they are defined in.
139
+
</entry>
140
+
</row>
141
+
<row>
142
+
<entry>7.0.0</entry>
143
+
<entry>
144
+
Added: Group <emphasis>use</emphasis> declaration: classes, functions
145
+
and constants being imported from the same namespace can now be grouped
146
+
together in a single use statement.
147
+
</entry>
148
+
</row>
149
+
<row>
150
+
<entry>7.0.0</entry>
151
+
<entry>
152
+
Added: Support for
153
+
<link linkend="language.oop5.anonymous">anonymous classes</link>
154
+
has been added via <literal>new class</literal>.
155
+
</entry>
156
+
</row>
157
+
<row>
158
+
<entry>7.0.0</entry>
159
+
<entry>
160
+
Incompatibility: Iterating over a non-<classname>Traversable</classname>
161
+
&object; will now have the same behaviour as iterating over by-reference
162
+
&array;s.
163
+
</entry>
164
+
</row>
165
+
<row>
20
166
<entry>7.0.0</entry>
21
167
<entry>
22
-
Defining (compatible) properties in two used traits no longer triggers an error.
168
+
Changed: Defining (compatible) properties in two used
169
+
<link linkend="language.oop5.traits">traits</link> no longer
170
+
triggers an error.
23
171
</entry>
24
172
</row>
25
173
<row>
...
...
@@ -50,7 +198,8 @@
50
198
<entry>5.4.0</entry>
51
199
<entry>
52
200
Changed: If an <link linkend="language.oop5.abstract">abstract</link> class
53
-
defines a signature for the constructor it will now be enforced.
201
+
defines a signature for the <link linkend="language.oop5.decon">
202
+
constructor</link> it will now be enforced.
54
203
</entry>
55
204
</row>
56
205
<row>
...
...
@@ -112,10 +261,10 @@
112
261
<entry>5.3.0</entry>
113
262
<entry>
114
263
Added: <link linkend="language.types.string.syntax.heredoc">heredoc</link>
115
-
and <link linkend="language.types.string.syntax.heredoc">nowdoc</link>
264
+
and <link linkend="language.types.string.syntax.nowdoc">nowdoc</link>
116
265
support for class <emphasis>const</emphasis> and property definitions.
117
266
Note: heredoc values must follow the same rules as double-quoted strings,
118
-
(e.g., no variables within).
267
+
(e.g. no variables within).
119
268
</entry>
120
269
</row>
121
270
<row>
...
...
@@ -136,11 +285,12 @@
136
285
Changed: The <link linkend="object.tostring">__toString()</link>
137
286
method was only called when it was directly combined with
138
287
<function>echo</function> or <function>print</function>.
139
-
But now, it is called in any string context (e.g. in
288
+
But now, it is called in any &string; context (e.g. in
140
289
<function>printf</function> with <literal>%s</literal> modifier) but not
141
290
in other types contexts (e.g. with <literal>%d</literal> modifier).
142
-
Since PHP 5.2.0, converting objects without a <literal>__toString</literal>
143
-
method to string emits a <constant>E_RECOVERABLE_ERROR</constant> level error.
291
+
As of PHP 5.2.0, converting &object;s without a
292
+
<link linkend="object.tostring">__toString</link> method to &string;
293
+
emits a <constant>E_RECOVERABLE_ERROR</constant> level error.
144
294
</entry>
145
295
</row>
146
296
<row>
147
297