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

Commit4868452

Browse files
committed
Added prose about the difference between regular/API classes/interfaces
1 parent8c6c7bf commit4868452

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

‎contributing/code/bc.rst

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ are marked with an ``@api`` tag in their source code. For example::
3939
interface HttpKernelInterface
4040
{
4141

42-
When using these interfaces, we guarantee full backwards compatibility for the
43-
following use cases:
42+
In simple words, the difference between regular and API interfaces is that you
43+
can implement API interfaces yourself and we will guarantee full backwards
44+
compatibility. The same is not true for regular interfaces: We may, for example,
45+
add an optional parameter or a new method to them and thus break your own
46+
implementation.
47+
48+
In detail, we guarantee full backwards compatibility for the following use
49+
cases:
4450

4551
============================================== ============== ==============
4652
Use Case Regular API
@@ -80,8 +86,13 @@ Like API interfaces, API classes are marked with an ``@api`` tag::
8086
class Request
8187
{
8288

83-
When using these classes, we guarantee full backwards compatibility for the
84-
following use cases:
89+
The difference between regular and API classes is that we guarantee full
90+
backwards compatibility if you extend an API class and override its methods,
91+
but not for regular classes. In regular classes, we may for example add an
92+
optional parameter to a method and thus break your overridden method.
93+
94+
Again, here are the details about which use cases we guarantee full backwards
95+
compatibility for:
8596

8697
============================================== ============== ==============
8798
Use Case Regular API

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp