@@ -73,6 +73,8 @@ backward compatibility promise:
73
73
+-----------------------------------------------+-----------------------------+
74
74
| Add a default value to an argument | Yes |
75
75
+-----------------------------------------------+-----------------------------+
76
+ | Add a return type to an implemented method | Yes |
77
+ +-----------------------------------------------+-----------------------------+
76
78
77
79
Using our Classes
78
80
~~~~~~~~~~~~~~~~~
@@ -164,6 +166,8 @@ Remove default value of an argument No
164
166
Add type hint to an argument No
165
167
Remove type hint of an argument No
166
168
Change argument type No
169
+ Add return type No
170
+ Remove return type No [9 ]_
167
171
Change return type No
168
172
**Constants **
169
173
Add constant Yes
@@ -220,6 +224,8 @@ Remove default value of an argument No
220
224
Add type hint to an argument No [7 ]_ [8 ]_
221
225
Remove type hint of an argument No [7 ]_ [8 ]_
222
226
Change argument type No [7 ]_ [8 ]_
227
+ Add return type No [7 ]_ [8 ]_
228
+ Remove return type No [7 ]_ [8 ]_ [9 ]_
223
229
Change return type No [7 ]_ [8 ]_
224
230
**Protected Methods **
225
231
Add protected method Yes
@@ -235,6 +241,8 @@ Remove default value of an argument No [7]_
235
241
Add type hint to an argument No [7 ]_ [8 ]_
236
242
Remove type hint of an argument No [7 ]_ [8 ]_
237
243
Change argument type No [7 ]_ [8 ]_
244
+ Add return type No [7 ]_ [8 ]_
245
+ Remove return type No [7 ]_ [8 ]_ [9 ]_
238
246
Change return type No [7 ]_ [8 ]_
239
247
**Private Methods **
240
248
Add private method Yes
@@ -248,6 +256,8 @@ Remove default value of an argument Yes
248
256
Add type hint to an argument Yes
249
257
Remove type hint of an argument Yes
250
258
Change argument type Yes
259
+ Add return type Yes
260
+ Remove return type Yes
251
261
Change return type Yes
252
262
**Static Methods **
253
263
Turn non static into static No [7 ]_ [8 ]_
@@ -291,6 +301,8 @@ Change value of a constant Yes [1]_ [5]_
291
301
Changing an argument type is only possible with a parent type.
292
302
Changing a return type is only possible with a child type.
293
303
304
+ .. [9 ] Allowed for the ``void `` return type.
305
+
294
306
.. _Semantic Versioning : https://semver.org/
295
307
.. _scalar type : https://php.net/manual/en/function.is-scalar.php
296
308
.. _boolean values : https://php.net/manual/en/function.boolval.php
0 commit comments