@@ -165,6 +165,10 @@ Add type hint to an argument No
165
165
Remove type hint of an argument No
166
166
Change argument type No
167
167
Change return type No
168
+ **Constants **
169
+ Add constant Yes
170
+ Remove constant No
171
+ Change value of a constant Yes [1 ]_ [5 ]_
168
172
============================================== ==============
169
173
170
174
Changing Classes
@@ -248,6 +252,10 @@ Change return type Yes
248
252
**Static Methods **
249
253
Turn non static into static No
250
254
Turn static into non static No
255
+ **Constants **
256
+ Add constant Yes
257
+ Remove constant No
258
+ Change value of a constant Yes [1 ]_ [5 ]_
251
259
================================================== ==============
252
260
253
261
.. [1 ] Should be avoided. When done, this change must be documented in the
@@ -262,6 +270,13 @@ Turn static into non static No
262
270
.. [4 ] When changing the parent class, the original parent class must remain an
263
271
ancestor of the class.
264
272
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
+
265
280
.. _Semantic Versioning : http://semver.org/
266
281
.. _scalar type : http://php.net/manual/en/function.is-scalar.php
267
282
.. _boolean values : http://php.net/manual/en/function.boolval.php
0 commit comments