@@ -15,11 +15,17 @@ the rules listed below.
1515 parts of it if we discover problems or limitations.
1616
1717
18- Interfaces
19- ----------
18+ Using Symfony Code
19+ ------------------
2020
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
2329
2430All interfaces in the ``Symfony `` namespace are **safe for use **. That means
2531that:
@@ -37,17 +43,15 @@ Methods tagged with ``@api`` are treated as if they belonged to an API
3743interface.
3844
3945
40- API Interfaces
41- ~~~~~~~~~~~~~~
46+ ### API Interfaces
4247
4348All interfaces tagged with ``@api `` are also **safe for implementation **. That
4449means that:
4550
4651* You can safely implement the interface.
4752
4853
49- Safe Operations
50- ~~~~~~~~~~~~~~~
54+ ### Safe Operations
5155
5256The following table summarizes the safe operations when using our interfaces:
5357
@@ -64,39 +68,10 @@ Add parameter default value Safe Safe
6468============================================== ============== ==============
6569
6670
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+ ~~~~~~~~~~~~~~~~~
9773
98- Normal Classes
99- ~~~~~~~~~~~~~~
74+ ### Normal Classes
10075
10176All classes in the ``Symfony `` namespace are **safe for use **. That means that:
10277
@@ -121,8 +96,7 @@ Properties and methods tagged with ``@api`` are treated as if they belonged
12196to an API class.
12297
12398
124- API Classes
125- ~~~~~~~~~~~
99+ ### API Classes
126100
127101All classes tagged with ``@api `` are also **safe for extension **. That means
128102that:
@@ -134,8 +108,7 @@ that:
134108* You can safely override public or protected methods.
135109
136110
137- Safe Operations
138- ~~~~~~~~~~~~~~~
111+ ### Safe Operations
139112
140113The following table summarizes the safe operations when using our classes:
141114
@@ -160,11 +133,46 @@ Add parameter default value Safe Safe
160133============================================== ============== ==============
161134
162135
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+ ~~~~~~~~~~~~~~~~~~~~
165173
166174This table tells you which changes you are allowed to do when working on the
167- code of Symfony's classes
175+ Symfony's classes
168176
169177================================================== ============== ==============
170178Type of Change Normal API
0 commit comments