-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Review] Added detailed Backwards Compatibility Promise text #3439
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
Changes from 1 commit
840073c
7320ed0
dacd7ce
79ca9f7
0e925cb
44ecf16
afadaab
345410c
a3ad08c
31ab2db
502ed95
4c5a55d
c6e850d
db76288
54fd836
00c6ebe
efd3911
dcbe79a
af3a645
be76644
dfb3e8b
6501a35
0c6420f
69768dd
5a160c5
ef1f021
6d9edf1
8c6c7bf
4868452
e11335f
25443c0
11bb879
fd1d912
bdd3c03
2320906
90c4de6
be2251c
ce58ee9
0717192
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,7 +194,8 @@ Add default value to a parameter Yes [2]_ No | |
Remove default value of a parameter No No | ||
Add type hint to a parameter No No | ||
Remove type hint of a parameter Yes [2]_ No | ||
Change return type Yes [2]_ [4]_ No | ||
Change parameter type Yes [2]_ [4]_ No | ||
Change return type Yes [2]_ [5]_ No | ||
============================================== ============== ============== | ||
|
||
|
||
|
@@ -211,7 +212,7 @@ Remove entirely No No | |
Make final Yes [2]_ No | ||
Make abstract No No | ||
Change name or namespace No No | ||
Change parent class Yes [5]_ Yes [5]_ | ||
Change parent class Yes [6]_ Yes [6]_ | ||
Add interface Yes Yes | ||
Remove interface No No | ||
**Public Properties** | ||
|
@@ -237,9 +238,10 @@ Add parameter with a default value Yes [2]_ No | |
Remove parameter Yes [3]_ Yes [3]_ | ||
Add default value to a parameter Yes [2]_ No | ||
Remove default value of a parameter No No | ||
Add type hint to a parameter Yes [6]_ No | ||
Add type hint to a parameter Yes [7]_ No | ||
Remove type hint of a parameter Yes [2]_ No | ||
Change return type Yes [2]_ [4]_ No | ||
Change parameter type Yes [2]_ [4]_ No | ||
Change return type Yes [2]_ [5]_ No | ||
**Protected Methods** | ||
Add protected method Yes Yes | ||
Remove protected method Yes [2]_ No | ||
|
@@ -252,7 +254,8 @@ Add default value to a parameter Yes [2]_ No | |
Remove default value of a parameter Yes [2]_ No | ||
Add type hint to a parameter Yes [2]_ No | ||
Remove type hint of a parameter Yes [2]_ No | ||
Change return type Yes [2]_ [4]_ No | ||
Change parameter type Yes [2]_ [4]_ No | ||
Change return type Yes [2]_ [5]_ No | ||
================================================== ============== ============== | ||
|
||
|
||
|
@@ -264,8 +267,22 @@ Change return type Yes [2]_ [4]_ No | |
|
||
.. [3] Only the last parameter(s) of a method may be removed. | ||
|
||
.. [4] The return type may only be changed to compatible types. The following | ||
type changes are allowed: | ||
.. [4] The parameter type may only be changed to a compatible or less specific | ||
type. The following type changes are allowed: | ||
|
||
=================== ================================================================== | ||
Original Type New Type | ||
=================== ================================================================== | ||
boolean any `scalar type`_ with equivalent `boolean values`_ | ||
string any `scalar type`_ or object with equivalent `string values`_ | ||
integer any `scalar type`_ with equivalent `integer values`_ | ||
float any `scalar type`_ with equivalent `float values`_ | ||
class ``<C>`` any superclass or interface of ``<C>`` | ||
interface ``<I>`` any superinterface of ``<I>`` | ||
=================== ================================================================== | ||
|
||
.. [5] The return type may only be changed to a compatible or more specific | ||
type. The following type changes are allowed: | ||
|
||
=================== ================================================================== | ||
Original Type New Type | ||
|
@@ -282,10 +299,10 @@ Change return type Yes [2]_ [4]_ No | |
interface ``<I>`` any subinterface or implementing class of ``<I>`` | ||
=================== ================================================================== | ||
|
||
.. [5] When changing the parent class, the original parent class must remain an | ||
.. [6] When changing the parent class, the original parent class must remain an | ||
ancestor of the class. | ||
|
||
.. [6] A type hint may only be added if passing a value with a different type | ||
.. [7] A type hint may only be added if passing a value with a different type | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @webmozart i think it would be useful to have links to the sami docu http://api.symfony.com/2.4/index.html and maybe direct links to interfaces per component. Right now is all spread out like butter but there are not further filters to actually allow for good usage for people that are implementing say only a component's interface set. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, the API docs need to be improved a lot for example to filter by |
||
previously generated a fatal error. | ||
|
||
.. _scalar type: http://php.net/manual/en/function.is-scalar.php | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you mention that it won't break any code as PHP does not care if you pass too many arguments to a method call? Reassurance here is the key.