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

Commit6d9edf1

Browse files
committed
Improved wording: Changed "safe" to "guaranteed"
1 parentef1f021 commit6d9edf1

File tree

1 file changed

+58
-58
lines changed

1 file changed

+58
-58
lines changed

‎contributing/code/bc.rst

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,14 @@ Normal Interfaces
3232
All interfaces in the ``Symfony`` namespace are **safe for use**. That means
3333
that:
3434

35-
* You cansafelytype hint against the interface.
35+
* You can type hint against the interface.
3636

37-
* You cansafelycall any of the methods provided by the interface.
37+
* You can call any of the methods provided by the interface.
3838

3939
However:
4040

41-
* You cannot safely implement the interface. The interface may change, but all
42-
changes will be documented in the UPGRADE file.
43-
44-
Methods tagged with ``@api`` are treated as if they belonged to an API
45-
interface.
41+
* You cannot implement the interface. The interface may change, but all changes
42+
will be documented in the UPGRADE file.
4643

4744

4845
API Interfaces
@@ -51,7 +48,7 @@ API Interfaces
5148
All interfaces tagged with ``@api`` are also **safe for implementation**. That
5249
means that:
5350

54-
* You cansafelyimplement the interface.
51+
* You can implement the interface.
5552

5653

5754
Internal Interfaces
@@ -68,24 +65,25 @@ Interfaces or interface methods tagged with ``@deprecated`` will be removed in
6865
a future Symfony version. You should never use nor implement them.
6966

7067

71-
Safe Operations
72-
...............
68+
Guarantee Details
69+
.................
7370

74-
The following table summarizes the safe operations when using our interfaces:
71+
When using our interfaces, we guarantee full backwards compatibility for the
72+
following use cases:
7573

7674
============================================== ============== ==============
77-
Operation Normal API
75+
Use Case Normal API
7876
============================================== ============== ==============
79-
Type hint againstSafeSafe
80-
Call methodSafeSafe
77+
Type hint againstYes Yes
78+
Call methodYes Yes
8179
**In Implementing Classes**
82-
Implement methodNot Safe[1]_Safe
83-
Add custom methodNot Safe[1]_Safe
84-
Add custom method parameterNot Safe[1]_Safe
85-
Add parameter default valueSafeSafe
80+
Implement methodNo[1]_ Yes
81+
Add custom methodNo[1]_ Yes
82+
Add custom method parameterNo[1]_ Yes
83+
Add parameter default valueYes Yes
8684
============================================== ============== ==============
8785

88-
If you need to do any of the things markedas "Not Safe" above, feel free to
86+
If you need to do any of the things markedwith "No" above, feel free to
8987
ask us whether the ``@api`` tag can be added on the respective Symfony code.
9088
For that, simply open a `new ticket on GitHub`_.
9189

@@ -98,27 +96,24 @@ Normal Classes
9896

9997
All classes in the ``Symfony`` namespace are **safe for use**. That means that:
10098

101-
* You cansafelytype hint against the class' name.
99+
* You can type hint against the class' name.
102100

103-
* You cansafelycreate new instances.
101+
* You can create new instances.
104102

105-
* You cansafelyextend the class.
103+
* You can extend the class.
106104

107-
* You cansafelyaccess public properties.
105+
* You can access public properties.
108106

109-
* You cansafelycall public methods.
107+
* You can call public methods.
110108

111109
When extending the class:
112110

113-
* You cansafelyoverride public properties.
111+
* You can override public properties.
114112

115113
However:
116114

117-
* You cannot safely override methods in extending classes. The class may change,
118-
but all changes will be documented in the UPGRADE file.
119-
120-
Properties and methods tagged with ``@api`` are treated as if they belonged
121-
to an API class.
115+
* You cannot override methods in extending classes. The class may change, but
116+
all changes will be documented in the UPGRADE file.
122117

123118

124119
API Classes
@@ -127,27 +122,31 @@ API Classes
127122
All classes tagged with ``@api`` are also **safe for extension**. That means
128123
that:
129124

130-
* You cansafelyaccess protected properties and methods.
125+
* You can access protected properties and methods.
131126

132-
* You cansafelycall protected methods.
127+
* You can call protected methods.
133128

134-
* You cansafelyoverride protected properties.
129+
* You can override protected properties.
135130

136-
* You can safely override public and protected methods.
131+
* You can override public and protected methods.
132+
133+
Properties and methods tagged with ``@api`` are treated as if they belonged
134+
to an API class. That means that you can call or override them regardless of
135+
whether their class has the ``@api`` tag or not.
137136

138137

139138
Internal Classes
140139
................
141140

142-
Classes, properties andclassmethods tagged with ``@internal`` are meant for
143-
internaluse in Symfony only. You should never use nor extend them.
141+
Classes, properties and methods tagged with ``@internal`` are meant for internal
142+
use in Symfony only. You should never use nor extend them.
144143

145144

146145
Deprecated Classes
147146
..................
148147

149-
Classes, properties andclassmethods tagged with ``@deprecated`` will be
150-
removed ina future Symfony version. You should never use nor extend them.
148+
Classes, properties and methods tagged with ``@deprecated`` will be removed in
149+
a future Symfony version. You should never use nor extend them.
151150

152151

153152
Test Classes
@@ -157,33 +156,34 @@ All classes located in the various ``*\\Tests\\`` namespaces are meant for
157156
internal use only. You should never create, extend or call them directly.
158157

159158

160-
Safe Operations
161-
...............
159+
Guarantee Details
160+
.................
162161

163-
The following table summarizes the safe operations when using our classes:
162+
When using our classes, we guarantee full backwards compatibility for the
163+
following use cases:
164164

165165
============================================== ============== ==============
166-
Operation Normal API
166+
Use Case Normal API
167167
============================================== ============== ==============
168-
Type hint againstSafeSafe
169-
Create instanceSafeSafe
170-
ExtendSafeSafe
171-
Access public propertySafeSafe
172-
Call public methodSafeSafe
168+
Type hint againstYes Yes
169+
Create instanceYes Yes
170+
ExtendYes Yes
171+
Access public propertyYes Yes
172+
Call public methodYes Yes
173173
**In Extending Classes**
174-
Access protected propertyNot Safe[1]_Safe
175-
Call protected methodNot Safe[1]_Safe
176-
Override public propertySafeSafe
177-
Override protected propertyNot Safe[1]_Safe
178-
Override public methodNot Safe[1]_Safe
179-
Override protected methodNot Safe[1]_Safe
180-
Add custom propertyNot SafeNot Safe
181-
Add custom methodNot SafeNot Safe
182-
Add custom method parameterNot Safe[1]_Safe
183-
Add parameter default valueSafeSafe
174+
Access protected propertyNo[1]_ Yes
175+
Call protected methodNo[1]_ Yes
176+
Override public propertyYes Yes
177+
Override protected propertyNo[1]_ Yes
178+
Override public methodNo[1]_ Yes
179+
Override protected methodNo[1]_ Yes
180+
Add custom propertyNo No
181+
Add custom methodNo No
182+
Add custom method parameterNo[1]_ Yes
183+
Add parameter default valueYes Yes
184184
============================================== ============== ==============
185185

186-
If you need to do any of the things markedas "Not Safe" above, feel free to
186+
If you need to do any of the things markedwith "No" above, feel free to
187187
ask us whether the ``@api`` tag can be added on the respective Symfony code.
188188
For that, simply open a `new ticket on GitHub`_.
189189

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp