Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add guideline that changing default values is a BC break
  • Loading branch information
OskarStark committed Sep 13, 2025
commit 4078cde8afcfbf5f21515ba16ed3a136b09a5316
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Always remove trailing whitespace
6 changes: 6 additions & 0 deletions contributing/code/bc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ Add constructor without mandatory arguments Yes
Add argument with a default value Yes :ref:`[11] <note-11>`
Remove argument No :ref:`[3] <note-3>`
Add default value to an argument Yes
Change default value of an argument No :ref:`[12] <note-12>`
Remove default value of an argument No
Add type hint to an argument No
Remove type hint of an argument Yes
Expand Down Expand Up @@ -490,6 +491,11 @@ code when upgrading to newer Symfony versions.

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

.. _note-12:

**[12]** Changing a default value is a BC break because it changes the behavior
of existing code that relies on the current default value.

Making Code Changes in a Backward Compatible Way
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down