@@ -169,6 +169,10 @@ Add type hint to an argument No
169
169
Remove type hint of an argument No
170
170
Change argument type No
171
171
Change return type No
172
+ **Constants **
173
+ Add constant Yes
174
+ Remove constant No
175
+ Change value of a constant Yes [1 ]_ [5 ]_
172
176
============================================== ==============
173
177
174
178
Changing Classes
@@ -253,6 +257,10 @@ Change return type Yes
253
257
**Static Methods **
254
258
Turn non static into static No
255
259
Turn static into non static No
260
+ **Constants **
261
+ Add constant Yes
262
+ Remove constant No
263
+ Change value of a constant Yes [1 ]_ [5 ]_
256
264
================================================== ==============
257
265
258
266
.. [1 ] Should be avoided. When done, this change must be documented in the
@@ -267,6 +275,13 @@ Turn static into non static No
267
275
.. [4 ] When changing the parent class, the original parent class must remain an
268
276
ancestor of the class.
269
277
278
+ .. [5 ] The value of a constant may only be changed when the constants aren't
279
+ used in configuration (e.g. Yaml and XML files), as these do not support
280
+ constants and have to hardcode the value. For instance, event name
281
+ constants can't change the value without introducing a BC break.
282
+ Additionally, if a constant will likely be used in objects that are
283
+ serialized, the value of a constant should not be changed.
284
+
270
285
.. _Semantic Versioning : http://semver.org/
271
286
.. _scalar type : http://php.net/manual/en/function.is-scalar.php
272
287
.. _boolean values : http://php.net/manual/en/function.boolval.php
0 commit comments