Skip to content

Commit 4078cde

Browse files
committed
Add guideline that changing default values is a BC break
1 parent e27de86 commit 4078cde

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Always remove trailing whitespace

contributing/code/bc.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ Add constructor without mandatory arguments Yes
264264
Add argument with a default value Yes :ref:`[11] <note-11>`
265265
Remove argument No :ref:`[3] <note-3>`
266266
Add default value to an argument Yes
267+
Change default value of an argument No :ref:`[12] <note-12>`
267268
Remove default value of an argument No
268269
Add type hint to an argument No
269270
Remove type hint of an argument Yes
@@ -490,6 +491,11 @@ code when upgrading to newer Symfony versions.
490491

491492
**[11]** Only optional argument(s) of a constructor at last position may be added.
492493

494+
.. _note-12:
495+
496+
**[12]** Changing a default value is a BC break because it changes the behavior
497+
of existing code that relies on the current default value.
498+
493499
Making Code Changes in a Backward Compatible Way
494500
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
495501

0 commit comments

Comments
 (0)