8000 [BC] Allow more changes when the class/method is final · symfony/symfony-docs@038b76b · GitHub
[go: up one dir, main page]

Skip to content

Commit 038b76b

Browse files
committed
[BC] Allow more changes when the class/method is final
1 parent 0f5cf62 commit 038b76b

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

contributing/code/bc.rst

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Symfony's classes:
181181
Type of Change Change Allowed
182182
================================================== ==============
183183
Remove entirely No
184-
Make final No
184+
Make final No [6]_
185185
Make abstract No
186186
Change name or namespace No
187187
Change parent class Yes [4]_
@@ -194,8 +194,8 @@ Reduce visibility No
194194
Move to parent class Yes
195195
**Protected Properties**
196196
Add protected property Yes
197-
Remove protected property No
198-
Reduce visibility No
197+
Remove protected property No [7]_
198+
Reduce visibility No [7]_
199199
Move to parent class Yes
200200
**Private Properties**
201201
Add private property Yes
@@ -204,38 +204,38 @@ Remove private property Yes
204204
Add constructor without mandatory arguments Yes [1]_
205205
Remove constructor No
206206
Reduce visibility of a public constructor No
207-
Reduce visibility of a protected constructor No
207+
Reduce visibility of a protected constructor No [7]_
208208
Move to parent class Yes
209209
**Public Methods**
210210
Add public method Yes
211211
Remove public method No
212212
Change name No
213213
Reduce visibility No
214214
Move to parent class Yes
215-
Add argument without a default value No
216-
Add argument with a default value No
215+
Add argument without a default value No [7]_
216+
Add argument with a default value No [7]_
217217
Remove argument Yes [3]_
218-
Add default value to an argument No
219-
Remove default value of an argument No
220-
Add type hint to an argument No
221-
Remove type hint of an argument No
222-
Change argument type No
223-
Change return type No
218+
Add default value to an argument No [7]_
219+
Remove default value of an argument No [7]_
220+
Add type hint to an argument No [7]_
221+
Remove type hint of an argument No [7]_
222+
Change argument type No [7]_
223+
Change return type No [7]_
224224
**Protected Methods**
225225
Add protected method Yes
226-
Remove protected method No
227-
Change name No
228-
Reduce visibility No
226+
Remove protected method No [7]_
227+
Change name No [7]_
228+
Reduce visibility No [7]_
229229
Move to parent class Yes
230-
Add argument without a default value No
231-
Add argument with a default value No
230+
Add argument without a default value No [7]_
231+
Add argument with a default value No [7]_
232232
Remove argument Yes [3]_
233-
Add default value to an argument No
234-
Remove default value of an argument No
235-
Add type hint to an argument No
236-
Remove type hint of an argument No
237-
Change argument type No
238-
Change return type No
233+
Add default value to an argument No [7]_
234+
Remove default value of an argument No [7]_
235+
Add type hint to an argument No [7]_
236+
Remove type hint of an argument No [7]_
237+
Change argument type No [7]_
238+
Change return type No [7]_
239239
**Private Methods**
240240
Add private method Yes
241241
Remove private method Yes
@@ -250,7 +250,7 @@ Remove type hint of an argument Yes
250250
Change argument type Yes
251251
Change return type Yes
252252
**Static Methods**
253-
Turn non static into static No
253+
Turn non static into static No [7]_
254254
Turn static into non static No
255255
**Constants**
256256
Add constant Yes
@@ -277,6 +277,11 @@ Change value of a constant Yes [1]_ [5]_
277277
Additionally, if a constant will likely be used in objects that are
278278
serialized, the value of a constant should not be changed.
279279
280+
.. [6] Allowed using the `@final` annotation.
281+
282+
.. [7] Allowed if the class/method is final (or marked with the `@final`
283+
annotation).
284+
280285
.. _Semantic Versioning: http://semver.org/
281286
.. _scalar type: http://php.net/manual/en/function.is-scalar.php
282287
.. _boolean values: http://php.net/manual/en/function.boolval.php

0 commit comments

Comments
 (0)
0