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

Appearance settings

Commit 502ed95

Browse filesBrowse files
committed
Added: Some breaking changes to unsafe operations are documented in the UPGRADE file
1 parent 31ab2db commit 502ed95
Copy full SHA for 502ed95

File tree

Expand file treeCollapse file tree

1 file changed

+44
-41
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+44
-41
lines changed

‎contributing/code/bc.rst

Copy file name to clipboardExpand all lines: contributing/code/bc.rst
+44-41Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Operation Normal API
5757
Type hint against Safe Safe
5858
Use method Safe Safe
5959
**When Implementing**
60-
Implement method Not Safe Safe
60+
Implement method Not Safe [1]_ Safe
6161
Add custom method Not Safe Not Safe
6262
Add custom method parameter Not Safe Not Safe
6363
Add parameter default value Safe Safe
@@ -75,20 +75,20 @@ Type of Change Normal API
7575
============================================== ============== ==============
7676
Remove entirely No No
7777
Change name or namespace No No
78-
Add parent interface Yes [1]_ No
78+
Add parent interface Yes [2]_ No
7979
Remove parent interface No No
8080
**Methods**
81-
Add method Yes [1]_ No
81+
Add method Yes [2]_ No
8282
Remove method No No
8383
Change name No No
8484
Add parameter without a default value No No
85-
Add parameter with a default value Yes [1]_ No
86-
Remove parameter Yes [2]_ Yes [2]_
87-
Add default value to a parameter Yes [1]_ No
85+
Add parameter with a default value Yes [2]_ No
86+
Remove parameter Yes [3]_ Yes [3]_
87+
Add default value to a parameter Yes [2]_ No
8888
Remove default value of a parameter No No
8989
Add type hint to a parameter No No
90-
Remove type hint of a parameter Yes [1]_ No
91-
Change return type Yes [1]_ [3]_ No
90+
Remove type hint of a parameter Yes [2]_ No
91+
Change return type Yes [2]_ [4]_ No
9292
============================================== ============== ==============
9393

9494

@@ -148,12 +148,12 @@ Extend Safe Safe
148148
Use public property Safe Safe
149149
Use public method Safe Safe
150150
**When Extending**
151-
Use protected property Not Safe Safe
152-
Use protected method Not Safe Safe
151+
Use protected property Not Safe [1]_ Safe
152+
Use protected method Not Safe [1]_ Safe
153153
Override public property Safe Safe
154-
Override protected property Not Safe Safe
155-
Override public method Not Safe Safe
156-
Override protected method Not Safe Safe
154+
Override protected property Not Safe [1]_ Safe
155+
Override public method Not Safe [1]_ Safe
156+
Override protected method Not Safe [1]_ Safe
157157
Add custom method Not Safe Not Safe
158158
Add custom method parameter Not Safe Not Safe
159159
Add parameter default value Safe Safe
@@ -170,10 +170,10 @@ code of Symfony's classes
170170
Type of Change Normal API
171171
================================================== ============== ==============
172172
Remove entirely No No
173-
Make final Yes [1]_ No
173+
Make final Yes [2]_ No
174174
Make abstract No No
175175
Change name or namespace No No
176-
Change parent class Yes [4]_ Yes [4]_
176+
Change parent class Yes [5]_ Yes [5]_
177177
Add interface Yes Yes
178178
Remove interface No No
179179
**Public Properties**
@@ -182,48 +182,51 @@ Remove public property No No
182182
Reduce visibility No No
183183
**Protected Properties**
184184
Add protected property Yes Yes
185-
Remove protected property Yes [1]_ No
186-
Reduce visibility Yes [1]_ No
185+
Remove protected property Yes [2]_ No
186+
Reduce visibility Yes [2]_ No
187187
**Constructors**
188-
Add constructor without mandatory parameters Yes [1]_ Yes [1]_
189-
Remove constructor Yes [1]_ No
188+
Add constructor without mandatory parameters Yes [2]_ Yes [2]_
189+
Remove constructor Yes [2]_ No
190190
Reduce visibility of a public constructor No No
191-
Reduce visibility of a protected constructor Yes [1]_ No
191+
Reduce visibility of a protected constructor Yes [2]_ No
192192
**Public Methods**
193193
Add public method Yes Yes
194194
Remove public method No No
195195
Change name No No
196196
Reduce visibility No No
197197
Add parameter without a default value No No
198-
Add parameter with a default value Yes [1]_ No
199-
Remove parameter Yes [2]_ Yes [2]_
200-
Add default value to a parameter Yes [1]_ No
198+
Add parameter with a default value Yes [2]_ No
199+
Remove parameter Yes [3]_ Yes [3]_
200+
Add default value to a parameter Yes [2]_ No
201201
Remove default value of a parameter No No
202-
Add type hint to a parameter Yes [5]_ No
203-
Remove type hint of a parameter Yes [1]_ No
204-
Change return type Yes [1]_ [3]_ No
202+
Add type hint to a parameter Yes [6]_ No
203+
Remove type hint of a parameter Yes [2]_ No
204+
Change return type Yes [2]_ [4]_ No
205205
**Protected Methods**
206206
Add protected method Yes Yes
207-
Remove protected method Yes [1]_ No
207+
Remove protected method Yes [2]_ No
208208
Change name No No
209-
Reduce visibility Yes [1]_ No
210-
Add parameter without a default value Yes [1]_ No
211-
Add parameter with a default value Yes [1]_ No
212-
Remove parameter Yes [2]_ Yes [2]_
213-
Add default value to a parameter Yes [1]_ No
214-
Remove default value of a parameter Yes [1]_ No
215-
Add type hint to a parameter Yes [1]_ No
216-
Remove type hint of a parameter Yes [1]_ No
217-
Change return type Yes [1]_ [3]_ No
209+
Reduce visibility Yes [2]_ No
210+
Add parameter without a default value Yes [2]_ No
211+
Add parameter with a default value Yes [2]_ No
212+
Remove parameter Yes [3]_ Yes [3]_
213+
Add default value to a parameter Yes [2]_ No
214+
Remove default value of a parameter Yes [2]_ No
215+
Add type hint to a parameter Yes [2]_ No
216+
Remove type hint of a parameter Yes [2]_ No
217+
Change return type Yes [2]_ [4]_ No
218218
================================================== ============== ==============
219219

220220

221-
.. [1] Should be avoided. When done, this change must be documented in the
221+
.. [1] Your code may be broken by changes in the Symfony code. Such changes will
222+
however be documented in the UPGRADE file.
223+
224+
.. [2] Should be avoided. When done, this change must be documented in the
222225
UGPRADE file.
223226
224-
.. [2] Only the last parameter(s) of a method may be removed.
227+
.. [3] Only the last parameter(s) of a method may be removed.
225228
226-
.. [3] The return type may only be changed to compatible types. The following
229+
.. [4] The return type may only be changed to compatible types. The following
227230
type changes are allowed:
228231
229232
=================== ==================================================================
@@ -239,10 +242,10 @@ Change return type Yes [1]_ [3]_ No
239242
``Countable`` array
240243
=================== ==================================================================
241244
242-
.. [4] When changing the parent class, the original parent class must remain an
245+
.. [5] When changing the parent class, the original parent class must remain an
243246
ancestor of the class.
244247
245-
.. [5] A type hint may only be added if passing a value with a different type
248+
.. [6] A type hint may only be added if passing a value with a different type
246249
previously generated a fatal error.
247250
248251
.. _scalar type: http://php.net/manual/en/function.is-scalar.php

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.