Skip to content

Commit 68aa201

Browse files
committed
Add constants to BC promise
1 parent 3b2f4d0 commit 68aa201

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

contributing/code/bc.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ Add type hint to an argument No
169169
Remove type hint of an argument No
170170
Change argument type No
171171
Change return type No
172+
**Constants**
173+
Add constant Yes
174+
Remove constant No
175+
Change value of a constant Yes [5]_
172176
============================================== ==============
173177

174178
Changing Classes
@@ -253,6 +257,10 @@ Change return type Yes
253257
**Static Methods**
254258
Turn non static into static No
255259
Turn static into non static No
260+
**Constants**
261+
Add constant Yes
262+
Remove constant No
263+
Change value of a constant Yes [5]_
256264
================================================== ==============
257265

258266
.. [1] Should be avoided. When done, this change must be documented in the
@@ -267,6 +275,11 @@ Turn static into non static No
267275
.. [4] When changing the parent class, the original parent class must remain an
268276
ancestor of the class.
269277
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+
270283
.. _Semantic Versioning: http://semver.org/
271284
.. _scalar type: http://php.net/manual/en/function.is-scalar.php
272285
.. _boolean values: http://php.net/manual/en/function.boolval.php

0 commit comments

Comments
 (0)