@@ -15,11 +15,17 @@ the rules listed below.
15
15
parts of it if we discover problems or limitations.
16
16
17
17
18
- Interfaces
19
- ----------
18
+ Using Symfony Code
19
+ ------------------
20
20
21
- Normal Interfaces
22
- ~~~~~~~~~~~~~~~~~
21
+ You are using Symfony in your projects? Stick to the guidelines in this section
22
+ in order to guarantee smooth upgrades to all future 2.x versions.
23
+
24
+
25
+ Using Our Interfaces
26
+ ~~~~~~~~~~~~~~~~~~~~
27
+
28
+ ### Normal Interfaces
23
29
24
30
All interfaces in the ``Symfony `` namespace are **safe for use **. That means
25
31
that:
@@ -37,17 +43,15 @@ Methods tagged with ``@api`` are treated as if they belonged to an API
37
43
interface.
38
44
39
45
40
- API Interfaces
41
- ~~~~~~~~~~~~~~
46
+ ### API Interfaces
42
47
43
48
All interfaces tagged with ``@api `` are also **safe for implementation **. That
44
49
means that:
45
50
46
51
* You can safely implement the interface.
47
52
48
53
49
- Safe Operations
50
- ~~~~~~~~~~~~~~~
54
+ ### Safe Operations
51
55
52
56
The following table summarizes the safe operations when using our interfaces:
53
57
@@ -64,39 +68,10 @@ Add parameter default value Safe Safe
64
68
============================================== ============== ==============
65
69
66
70
67
- Allowed Changes
68
- ~~~~~~~~~~~~~~~
69
-
70
- This table tells you which changes you are allowed to do when working on the
71
- code of Symfony's interfaces:
72
-
73
- ============================================== ============== ==============
74
- Type of Change Normal API
75
- ============================================== ============== ==============
76
- Remove entirely No No
77
- Change name or namespace No No
78
- Add parent interface Yes [2 ]_ No
79
- Remove parent interface No No
80
- **Methods **
81
- Add method Yes [2 ]_ No
82
- Remove method No No
83
- Change name No No
84
- Add parameter without a default value No 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
88
- Remove default value of a parameter No No
89
- Add type hint to a parameter No No
90
- Remove type hint of a parameter Yes [2 ]_ No
91
- Change return type Yes [2 ]_ [4 ]_ No
92
- ============================================== ============== ==============
93
-
94
-
95
- Classes
96
- -------
71
+ Using Our Classes
72
+ ~~~~~~~~~~~~~~~~~
97
73
98
- Normal Classes
99
- ~~~~~~~~~~~~~~
74
+ ### Normal Classes
100
75
101
76
All classes in the ``Symfony `` namespace are **safe for use **. That means that:
102
77
@@ -121,8 +96,7 @@ Properties and methods tagged with ``@api`` are treated as if they belonged
121
96
to an API class.
122
97
123
98
124
- API Classes
125
- ~~~~~~~~~~~
99
+ ### API Classes
126
100
127
101
All classes tagged with ``@api `` are also **safe for extension **. That means
128
102
that:
@@ -134,8 +108,7 @@ that:
134
108
* You can safely override public or protected methods.
135
109
136
110
137
- Safe Operations
138
- ~~~~~~~~~~~~~~~
111
+ ### Safe Operations
139
112
140
113
The following table summarizes the safe operations when using our classes:
141
114
@@ -160,11 +133,46 @@ Add parameter default value Safe Safe
160
133
============================================== ============== ==============
161
134
162
135
163
- Allowed Changes
164
- ~~~~~~~~~~~~~~~
136
+ Working on Symfony Code
137
+ -----------------------
138
+
139
+ Do you want to help us improve Symfony? That's great! However, please stick
140
+ to the rules listed below in order to ensure smooth upgrades for our users.
141
+
142
+
143
+ Changing Our Interfaces
144
+ ~~~~~~~~~~~~~~~~~~~~~~~
145
+
146
+ This table tells you which changes you are allowed to do when working on
147
+ Symfony's interfaces:
148
+
149
+ ============================================== ============== ==============
150
+ Type of Change Normal API
151
+ ============================================== ============== ==============
152
+ Remove entirely No No
153
+ Change name or namespace No No
154
+ Add parent interface Yes [2 ]_ No
155
+ Remove parent interface No No
156
+ **Methods **
157
+ Add method Yes [2 ]_ No
158
+ Remove method No No
159
+ Change name No No
160
+ Add parameter without a default value No No
161
+ Add parameter with a default value Yes [2 ]_ No
162
+ Remove parameter Yes [3 ]_ Yes [3 ]_
163
+ Add default value to a parameter Yes [2 ]_ No
164
+ Remove default value of a parameter No No
165
+ Add type hint to a parameter No No
166
+ Remove type hint of a parameter Yes [2 ]_ No
167
+ Change return type Yes [2 ]_ [4 ]_ No
168
+ ============================================== ============== ==============
169
+
170
+
171
+ Changing Our Classes
172
+ ~~~~~~~~~~~~~~~~~~~~
165
173
166
174
This table tells you which changes you are allowed to do when working on the
167
- code of Symfony's classes
175
+ Symfony's classes
168
176
169
177
================================================== ============== ==============
170
178
Type of Change Normal API
0 commit comments