language/oop5/changelog.xml
6a3ce2f9a191ad00fdd709c249e6dea16df316e3
6a3ce2f9a191ad00fdd709c249e6dea16df316e3
...
...
@@ -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>
...
...
@@ -16,10 +16,170 @@
16
16
</row>
17
17
</thead>
18
18
<tbody>
19
+
<row>
20
+
<entry>8.4.0</entry>
21
+
<entry>
22
+
Added: Support for <link linkend="language.oop5.property-hooks">Property Hooks</link>.
23
+
</entry>
24
+
</row>
25
+
<row>
26
+
<entry>8.4.0</entry>
27
+
<entry>
28
+
Added: Support for <link linkend="language.oop5.lazy-objects">Lazy Objects</link>.
29
+
</entry>
30
+
</row>
31
+
<row>
32
+
<entry>8.1.0</entry>
33
+
<entry>
34
+
Added: Support for the <modifier>final</modifier> modifier for class constants. Also, interface constants become overridable by default.
35
+
</entry>
36
+
</row>
37
+
<row>
38
+
<entry>8.0.0</entry>
39
+
<entry>
40
+
Added: Support for the <link linkend="language.oop5.basic.nullsafe">nullsafe operator</link> <emphasis>?-></emphasis> to access properties and methods on objects that may be null.
41
+
</entry>
42
+
</row>
43
+
<row>
44
+
<entry>7.4.0</entry>
45
+
<entry>
46
+
Changed: It is now possible to throw exception within
47
+
<function>__toString</function>.
48
+
</entry>
49
+
</row>
50
+
<row>
51
+
<entry>7.4.0</entry>
52
+
<entry>
53
+
Added: Support for limited return type covariance and argument
54
+
type contravariance. Full variance support is only available if
55
+
autoloading is used. Inside a single file only non-cyclic type
56
+
references are possible.
57
+
</entry>
58
+
</row>
59
+
<row>
60
+
<entry>7.4.0</entry>
61
+
<entry>
62
+
Added: It is now possible to type class properties.
63
+
</entry>
64
+
</row>
65
+
<row>
66
+
<entry>7.3.0</entry>
67
+
<entry>
68
+
Incompatibility: Argument unpacking of
69
+
<classname>Traversable</classname>s with non-&integer; keys is no longer
70
+
supported. This behaviour was not intended and thus has been removed.
71
+
</entry>
72
+
</row>
73
+
<row>
74
+
<entry>7.3.0</entry>
75
+
<entry>
76
+
Incompatibility: In previous versions it was possible to separate the
77
+
static properties by assigning a reference. This has been removed.
78
+
</entry>
79
+
</row>
80
+
<row>
81
+
<entry>7.3.0</entry>
82
+
<entry>
83
+
Changed: The <link linkend="language.operators.type">instanceof</link>
84
+
operator now allows literals as the first operand, in which case the
85
+
result is always &false;.
86
+
</entry>
87
+
</row>
88
+
<row>
89
+
<entry>7.2.0</entry>
90
+
<entry>
91
+
Deprecated: The <function>__autoload</function> method has been
92
+
deprecated in favour of <function>spl_autoload_register</function>.
93
+
</entry>
94
+
</row>
95
+
<row>
96
+
<entry>7.2.0</entry>
97
+
<entry>
98
+
Changed: The following name cannot be used to name classes, interfaces,
99
+
or traits: <literal>object</literal>.
100
+
</entry>
101
+
</row>
102
+
<row>
103
+
<entry>7.2.0</entry>
104
+
<entry>
105
+
Changed: A trailing comma can now be added to the group-use syntax
106
+
for namespaces.
107
+
</entry>
108
+
</row>
109
+
<row>
110
+
<entry>7.2.0</entry>
111
+
<entry>
112
+
Changed: Parameter type widening. Parameter types from overridden
113
+
methods and from interface implementations may now be omitted.
114
+
</entry>
115
+
</row>
116
+
<row>
117
+
<entry>7.2.0</entry>
118
+
<entry>
119
+
Changed: Abstract methods can now be overridden when an abstract class
120
+
extends another abstract class.
121
+
</entry>
122
+
</row>
123
+
<row>
124
+
<entry>7.1.0</entry>
125
+
<entry>
126
+
Changed: The following names cannot be used to name classes, interfaces,
127
+
or traits: <literal>void</literal> and <literal>iterable</literal>.
128
+
</entry>
129
+
</row>
130
+
<row>
131
+
<entry>7.1.0</entry>
132
+
<entry>
133
+
Added: It is now possible to specify the
134
+
<link linkend="language.oop5.visiblity-constants">visibility of
135
+
class constants</link>.
136
+
</entry>
137
+
</row>
138
+
<row>
139
+
<entry>7.0.0</entry>
140
+
<entry>
141
+
Deprecated: <link linkend="language.oop5.static">Static</link> calls
142
+
to methods that are not declared static.
143
+
</entry>
144
+
</row>
145
+
<row>
146
+
<entry>7.0.0</entry>
147
+
<entry>
148
+
Deprecated: PHP 4 style <link linkend="language.oop5.decon">
149
+
constructor</link>. I.e. methods that have the same name as the class
150
+
they are defined in.
151
+
</entry>
152
+
</row>
153
+
<row>
154
+
<entry>7.0.0</entry>
155
+
<entry>
156
+
Added: Group <emphasis>use</emphasis> declaration: classes, functions
157
+
and constants being imported from the same namespace can now be grouped
158
+
together in a single use statement.
159
+
</entry>
160
+
</row>
161
+
<row>
162
+
<entry>7.0.0</entry>
163
+
<entry>
164
+
Added: Support for
165
+
<link linkend="language.oop5.anonymous">anonymous classes</link>
166
+
has been added via <literal>new class</literal>.
167
+
</entry>
168
+
</row>
169
+
<row>
170
+
<entry>7.0.0</entry>
171
+
<entry>
172
+
Incompatibility: Iterating over a non-<classname>Traversable</classname>
173
+
&object; will now have the same behaviour as iterating over by-reference
174
+
&array;s.
175
+
</entry>
176
+
</row>
19
177
<row>
20
178
<entry>7.0.0</entry>
21
179
<entry>
22
-
Defining (compatible) properties in two used traits no longer triggers an error.
180
+
Changed: Defining (compatible) properties in two used
181
+
<link linkend="language.oop5.traits">traits</link> no longer
182
+
triggers an error.
23
183
</entry>
24
184
</row>
25
185
<row>
...
...
@@ -50,7 +210,8 @@
50
210
<entry>5.4.0</entry>
51
211
<entry>
52
212
Changed: If an <link linkend="language.oop5.abstract">abstract</link> class
53
-
defines a signature for the constructor it will now be enforced.
213
+
defines a signature for the <link linkend="language.oop5.decon">
214
+
constructor</link> it will now be enforced.
54
215
</entry>
55
216
</row>
56
217
<row>
...
...
@@ -112,10 +273,10 @@
112
273
<entry>5.3.0</entry>
113
274
<entry>
114
275
Added: <link linkend="language.types.string.syntax.heredoc">heredoc</link>
115
-
and <link linkend="language.types.string.syntax.heredoc">nowdoc</link>
276
+
and <link linkend="language.types.string.syntax.nowdoc">nowdoc</link>
116
277
support for class <emphasis>const</emphasis> and property definitions.
117
278
Note: heredoc values must follow the same rules as double-quoted strings,
118
-
(e.g., no variables within).
279
+
(e.g. no variables within).
119
280
</entry>
120
281
</row>
121
282
<row>
...
...
@@ -136,11 +297,12 @@
136
297
Changed: The <link linkend="object.tostring">__toString()</link>
137
298
method was only called when it was directly combined with
138
299
<function>echo</function> or <function>print</function>.
139
-
But now, it is called in any string context (e.g. in
300
+
But now, it is called in any &string; context (e.g. in
140
301
<function>printf</function> with <literal>%s</literal> modifier) but not
141
302
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.
303
+
As of PHP 5.2.0, converting &object;s without a
304
+
<link linkend="object.tostring">__toString</link> method to &string;
305
+
emits a <constant>E_RECOVERABLE_ERROR</constant> level error.
144
306
</entry>
145
307
</row>
146
308
<row>
147
309