Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add guideline that changing default values is a BC break#21371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
OskarStark wants to merge3 commits intosymfony:6.4
base:6.4
Choose a base branch
Loading
fromOskarStark:feature/bc-break-default-value-change

Conversation

OskarStark
Copy link
Contributor

No description provided.

@OskarStarkOskarStark self-assigned thisSep 13, 2025
@carsonbotcarsonbot added this to the6.4 milestoneSep 13, 2025
@carsonbotcarsonbot changed the titleAdd guideline that changing default values is a BC break Add guideline that changing default values is a BC breakSep 13, 2025
Comment on lines +139 to +142
| Change default value of an argument| No:ref:`[12]<note-12>`|
+-----------------------------------------------+-----------------------------+
| Remove default value of an argument| No:ref:`[13]<note-13>`|
+-----------------------------------------------+-----------------------------+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The BC promise consist of 2 main sections:

  • The first part is "Using Symfony Code", here we explain "if you use an interface/class from Symfony and do this, you can expect your code to keep working"
  • The second part is "Working on Symfony Code", where we explain which changes we and our contributors are allowed to make to Symfony interfaces/classes.

Given this table is part of the first section, we should either revert both of them or change the first to "Yes" and revert the last one.
If you change the default value when implementing an interface, no change in the interface will break your code. So it's OK to change the default value.
And removing a default value while the interface has a default value is not possible in PHP.

Remove argument No:ref:`[3]<note-3>`
Add default value to an argument No:ref:`[7]<note-7>`:ref:`[8]<note-8>`
Remove default value of an argument No
Remove default value of an argument No:ref:`[13]<note-13>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is there a reason not to add "Change default value of an argument No" here and for protected methods below?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@wouterjwouterjwouterj requested changes

@xabbuhxabbuhxabbuh approved these changes

@fabpotfabpotAwaiting requested review from fabpot

Assignees

@OskarStarkOskarStark

Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

4 participants
@OskarStark@wouterj@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp