Skip to content

Commit b040bd9

Browse files
committed
Merge pull request symfony#2137 from fabpot/contrib-updates
Tweak the PR check-list and add more information about how to contribute
2 parents 1695853 + ea65196 commit b040bd9

File tree

1 file changed

+74
-23
lines changed

1 file changed

+74
-23
lines changed

contributing/code/patches.rst

+74-23
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,12 @@ Prepare your Patch for Submission
200200
When your patch is not about a bug fix (when you add a new feature or change
201201
an existing one for instance), it must also include the following:
202202

203-
* An explanation of the changes in the relevant CHANGELOG file(s);
203+
* An explanation of the changes in the relevant CHANGELOG file(s) (the ``[BC
204+
BREAK]`` or the ``[DEPRECATION]`` prefix must be used when relevant);
204205

205206
* An explanation on how to upgrade an existing application in the relevant
206-
UPGRADE file(s) if the changes break backward compatibility.
207+
UPGRADE file(s) if the changes break backward compatibility or if you
208+
deprecate something that will ultimately break backward compatibility.
207209

208210
Step 3: Submit your Patch
209211
-------------------------
@@ -262,38 +264,87 @@ pull request message, like in:
262264
[Yaml] fixed something
263265
[Form] [Validator] [FrameworkBundle] added something
264266
265-
.. tip::
266-
267-
Please use the title with "[WIP]" if the submission is not yet completed
268-
or the tests are incomplete or not yet passing.
269-
270267
The pull request description must include the following check list to ensure
271268
that contributions may be reviewed without needless feedback loops and that
272269
your contributions can be included into Symfony2 as quickly as possible:
273270

274271
.. code-block:: text
275272
276-
Bug fix: [yes|no]
277-
Feature addition: [yes|no]
278-
Backwards compatibility break: [yes|no]
279-
Deprecations: [what, when|no]
280-
Symfony2 tests pass: [yes|no]
281-
Fixes the following tickets: [comma separated list of tickets fixed by the PR]
282-
Todo: [list of todos pending]
283-
License of the code: MIT
284-
Documentation PR: [The reference to the documentation PR if any]
273+
| Q | A
274+
| ------------- | ---
275+
| Bug fix? | [yes|no]
276+
| New feature? | [yes|no]
277+
| BC breaks? | [yes|no]
278+
| Deprecations? | [yes|no]
279+
| Tests pass? | [yes|no]
280+
| Fixed tickets | [comma separated list of tickets fixed by the PR]
281+
| License | MIT
282+
| Doc PR | [The reference to the documentation PR if any]
285283
286284
An example submission could now look as follows:
287285

288286
.. code-block:: text
289287
290-
Bug fix: no
291-
Feature addition: yes
292-
Backwards compatibility break: no
293-
Fixes the following tickets: #12, #43
294-
Todo: -
295-
License of the code: MIT
296-
Documentation PR: symfony/symfony-docs#123
288+
| Q | A
289+
| ------------- | ---
290+
| Bug fix? | no
291+
| New feature? | no
292+
| BC breaks? | no
293+
| Deprecations? | no
294+
| Tests pass? | yes
295+
| Fixed tickets | #12, #43
296+
| License | MIT
297+
| Doc PR | symfony/symfony-docs#123
298+
299+
For typos, minor changes in the PHPDocs, or changes in translation files, use
300+
the shorter version of the check-list:
301+
302+
.. code-block:: text
303+
304+
| Q | A
305+
| ------------- | ---
306+
| Fixed tickets | [comma separated list of tickets fixed by the PR]
307+
| License | MIT
308+
309+
Some answers to the questions trigger some more requirements:
310+
311+
* If you answer yes to "Bug fix?", check if the bug is already listed in the
312+
Symfony issues and reference it/them in "Fixed tickets";
313+
314+
* If you answer yes to "New feature?", you must submit a pull request to the
315+
documentation and reference it under the "Doc PR" section;
316+
317+
* If you answer yes to "BC breaks?", the patch must contain updates to the
318+
relevant CHANGELOG and UPGRADE files;
319+
320+
* If you answer yes to "Deprecations?", the patch must contain updates to the
321+
relevant CHANGELOG and UPGRADE files;
322+
323+
* If you answer no to "Tests pass", you must add an item to a todo-list with
324+
the actions that must be done to fix the tests;
325+
326+
* If the "license" is not MIT, just don't submit the pull request as it won't
327+
be accepted anyway.
328+
329+
If some of the previous requirements are not met, create a todo-list and add
330+
relevant items:
331+
332+
.. code-block:: text
333+
334+
- [ ] fix the tests as they have not been updated yet
335+
- [ ] submit changes to the documentation
336+
- [ ] document the BC breaks
337+
338+
If the code is not finished yet because you don't have time to finish it or
339+
because you want early feedback on your work, add an item to todo-list:
340+
341+
.. code-block:: text
342+
343+
- [ ] finish the code
344+
- [ ] gather feedback my changes
345+
346+
As long as you have items in the todo-list, please prefix the pull request
347+
title with "[WIP]".
297348

298349
In the pull request description, give as much details as possible about your
299350
changes (don't hesitate to give code examples to illustrate your points). If

0 commit comments

Comments
 (0)