@@ -165,6 +165,10 @@ Add type hint to an argument No
165165Remove type hint of an argument No
166166Change argument type No
167167Change return type No
168+ **Constants **
169+ Add constant Yes
170+ Remove constant No
171+ Change value of a constant Yes [1 ]_ [5 ]_
168172============================================== ==============
169173
170174Changing Classes
@@ -248,6 +252,10 @@ Change return type Yes
248252**Static Methods **
249253Turn non static into static No
250254Turn static into non static No
255+ **Constants **
256+ Add constant Yes
257+ Remove constant No
258+ Change value of a constant Yes [1 ]_ [5 ]_
251259================================================== ==============
252260
253261.. [1 ] Should be avoided. When done, this change must be documented in the
@@ -262,6 +270,13 @@ Turn static into non static No
262270 .. [4 ] When changing the parent class, the original parent class must remain an
263271 ancestor of the class.
264272
273+ .. [5 ] The value of a constant may only be changed when the constants aren't
274+ used in configuration (e.g. Yaml and XML files), as these do not support
275+ constants and have to hardcode the value. For instance, event name
276+ constants can't change the value without introducing a BC break.
277+ Additionally, if a constant will likely be used in objects that are
278+ serialized, the value of a constant should not be changed.
279+
265280 .. _Semantic Versioning : http://semver.org/
266281.. _scalar type : http://php.net/manual/en/function.is-scalar.php
267282.. _boolean values : http://php.net/manual/en/function.boolval.php
0 commit comments