Skip to content

BC promise: only optional arguments can be removed #12606

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2019
Merged
Changes from all commits
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
10 changes: 5 additions & 5 deletions contributing/code/bc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Change name No
Move to parent interface Yes
Add argument without a default value No
Add argument with a default value No
Remove argument Yes [3]_
Remove argument No [3]_
Add default value to an argument No
Remove default value of an argument No
Add type hint to an argument No
Expand Down Expand Up @@ -272,7 +272,7 @@ Make final No [6]_
Move to parent class Yes
Add argument without a default value No
Add argument with a default value No [7]_ [8]_
Remove argument Yes [3]_
Remove argument No [3]_
Add default value to an argument No [7]_ [8]_
Remove default value of an argument No
Add type hint to an argument No [7]_ [8]_
Expand All @@ -291,7 +291,7 @@ Make public No [7]_ [8]_
Move to parent class Yes
Add argument without a default value No [7]_
Add argument with a default value No [7]_ [8]_
Remove argument Yes [3]_
Remove argument No [3]_
Add default value to an argument No [7]_ [8]_
Remove default value of an argument No [7]_
Add type hint to an argument No [7]_ [8]_
Expand Down Expand Up @@ -416,8 +416,8 @@ Turn static into non static No
.. [2] The added parent interface must not introduce any new methods that don't
exist in the interface already.

.. [3] Only the last argument(s) of a method may be removed, as PHP does not
care about additional arguments that you pass to a method.
.. [3] Only the last optional argument(s) of a method may be removed, as PHP
does not care about additional arguments that you pass to a method.

.. [4] When changing the parent class, the original parent class must remain an
ancestor of the class.
Expand Down