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

Commit7c1f536

Browse files
committed
Added hints about receiving feedback
1 parent98dfd5d commit7c1f536

File tree

1 file changed

+71
-36
lines changed

1 file changed

+71
-36
lines changed

‎contributing/code/patches.rst

Lines changed: 71 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
Submitting aPatch
2-
==================
1+
Submitting aChange
2+
===================
33

4-
Patches arethe best way to provide a bug fix or to propose enhancements to
5-
Symfony.
4+
A pull request, "PR" for short, isthe best way to provide a bug fix or to propose
5+
enhancements toSymfony.
66

7-
Step 1: Setup your Environment
7+
Step 1: Check existing issues and PRs
8+
-------------------------------------
9+
10+
Before working on a change, check to see if someone else also raised the topic
11+
or maybe even started working on a PR by `searching on GitHub`_.
12+
13+
If you are still unsure or if you have any questions during this entire process,
14+
please ask your questions on the #contribs channel on `Symfony Slack`_.
15+
16+
Step 2: Setup your Environment
817
------------------------------
918

1019
Install the Software Stack
@@ -90,20 +99,25 @@ Check that the current Tests Pass
9099
Now that Symfony is installed, check that all unit tests pass for your
91100
environment as explained in the dedicated:doc:`document<tests>`.
92101

93-
Step 2: Work on your Patch
94-
--------------------------
102+
..tip::
103+
104+
If tests are failing, check on `Travis-CI`_ if the tests are failing
105+
there as well. Normally they should be green but if they also fail
106+
there you don't have to alarmed if you also fail locally.
107+
108+
Step 3: Work on your PR
109+
-----------------------
95110

96111
The License
97112
~~~~~~~~~~~
98113

99-
Before you start, you must know that all the patches you are going to submit
100-
must be released under the *MIT license*, unless explicitly specified in your
101-
commits.
114+
Before you start, you must know that all the code you are going to submit
115+
must be released under the *MIT license*.
102116

103117
Choose the right Branch
104118
~~~~~~~~~~~~~~~~~~~~~~~
105119

106-
Before working on apatch, you must determine on which branch you need to
120+
Before working on aPR, you must determine on which branch you need to
107121
work:
108122

109123
* ``3.4``, if you are fixing a bug for an existing feature or want to make a
@@ -116,28 +130,28 @@ work:
116130
..note::
117131

118132
All bug fixes merged into maintenance branches are also merged into more
119-
recent branches on a regular basis. For instance, if you submit apatch
120-
for the ``3.4`` branch, thepatch will also be applied by the core team on
133+
recent branches on a regular basis. For instance, if you submit aPR
134+
for the ``3.4`` branch, thePR will also be applied by the core team on
121135
the ``master`` branch.
122136

123137
Create a Topic Branch
124138
~~~~~~~~~~~~~~~~~~~~~
125139

126-
Each time you want to work on apatch for a bug or on an enhancement, create a
140+
Each time you want to work on aPR for a bug or on an enhancement, create a
127141
topic branch:
128142

129143
..code-block::terminal
130144
131145
$ git checkout -b BRANCH_NAME master
132146
133-
Or, if you want to provide abugfix for the ``3.4`` branch, first track the remote
147+
Or, if you want to provide abug fix for the ``3.4`` branch, first track the remote
134148
``3.4`` branch locally:
135149

136150
..code-block::terminal
137151
138152
$ git checkout -t origin/3.4
139153
140-
Then create a new branch off the ``3.4`` branch to work on thebugfix:
154+
Then create a new branch off the ``3.4`` branch to work on thebug fix:
141155

142156
..code-block::terminal
143157
@@ -167,8 +181,8 @@ uses, and replaces them by symbolic links to the ones in the Git repository.
167181
Before running the ``link`` command, be sure that the dependencies of the project you
168182
want to debug are installed by running ``composer install`` inside it.
169183

170-
Work on yourPatch
171-
~~~~~~~~~~~~~~~~~~
184+
Work on yourPR
185+
~~~~~~~~~~~~~~~
172186

173187
Work on the code as much as you want and commit as much as you want; but keep
174188
in mind the following:
@@ -181,7 +195,7 @@ in mind the following:
181195
actually works;
182196

183197
* Try hard to not break backward compatibility (if you must do so, try to
184-
provide a compatibility layer to support the old way) --patches that break
198+
provide a compatibility layer to support the old way) --PRs that break
185199
backward compatibility have less chance to be merged;
186200

187201
* Do atomic and logically separate commits (use the power of ``git rebase`` to
@@ -210,10 +224,10 @@ in mind the following:
210224
verb (``fixed ...``, ``added ...``, ...) to start the summary and don't
211225
add a period at the end.
212226

213-
Prepare yourPatch for Submission
214-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227+
Prepare yourPR for Submission
228+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215229

216-
When yourpatch is not about a bug fix (when you add a new feature or change
230+
When yourPR is not about a bug fix (when you add a new feature or change
217231
an existing one for instance), it must also include the following:
218232

219233
* An explanation of the changes in the relevant ``CHANGELOG`` file(s) (the
@@ -223,16 +237,16 @@ an existing one for instance), it must also include the following:
223237
``UPGRADE`` file(s) if the changes break backward compatibility or if you
224238
deprecate something that will ultimately break backward compatibility.
225239

226-
Step3: Submit yourPatch
227-
-------------------------
240+
Step4: Submit yourPR
241+
----------------------
228242

229-
Whenever you feel that yourpatch is ready for submission, follow the
243+
Whenever you feel that yourPR is ready for submission, follow the
230244
following steps.
231245

232-
Rebase yourPatch
233-
~~~~~~~~~~~~~~~~~
246+
Rebase yourPR
247+
~~~~~~~~~~~~~~
234248

235-
Before submitting yourpatch, update your branch (needed if it takes you a
249+
Before submitting yourPR, update your branch (needed if it takes you a
236250
while to finish your changes):
237251

238252
..code-block::terminal
@@ -246,7 +260,7 @@ while to finish your changes):
246260
..tip::
247261

248262
Replace ``master`` with the branch you selected previously (e.g. ``3.4``)
249-
if you are working on abugfix
263+
if you are working on abug fix.
250264

251265
When doing the ``rebase`` command, you might have to fix merge conflicts.
252266
``git status`` will show you the *unmerged* files. Resolve all the conflicts,
@@ -273,7 +287,7 @@ You can now make a pull request on the ``symfony/symfony`` GitHub repository.
273287
..tip::
274288

275289
Take care to point your pull request towards ``symfony:3.4`` if you want
276-
the core team to pull abugfix based on the ``3.4`` branch.
290+
the core team to pull abug fix based on the ``3.4`` branch.
277291

278292
To ease the core team work, always include the modified components in your
279293
pull request message, like in:
@@ -296,10 +310,10 @@ Some answers to the questions trigger some more requirements:
296310
* If you answer yes to "New feature?", you must submit a pull request to the
297311
documentation and reference it under the "Doc PR" section;
298312

299-
* If you answer yes to "BC breaks?", thepatch must contain updates to the
313+
* If you answer yes to "BC breaks?", thePR must contain updates to the
300314
relevant ``CHANGELOG`` and ``UPGRADE`` files;
301315

302-
* If you answer yes to "Deprecations?", thepatch must contain updates to the
316+
* If you answer yes to "Deprecations?", thePR must contain updates to the
303317
relevant ``CHANGELOG`` and ``UPGRADE`` files;
304318

305319
* If you answer no to "Tests pass", you must add an item to a todo-list with
@@ -326,7 +340,8 @@ because you want early feedback on your work, add an item to todo-list:
326340
- [ ] gather feedback for my changes
327341
328342
As long as you have items in the todo-list, please prefix the pull request
329-
title with "[WIP]".
343+
title with "[WIP]". If you do not yet want to trigger the automated tests,
344+
you can also set the PR to `draft status`_.
330345

331346
In the pull request description, give as much details as possible about your
332347
changes (don't hesitate to give code examples to illustrate your points). If
@@ -339,11 +354,27 @@ commit message).
339354
In addition to this "code" pull request, you must also send a pull request to
340355
the `documentation repository`_ to update the documentation when appropriate.
341356

342-
Rework your Patch
343-
~~~~~~~~~~~~~~~~~
357+
Step 5: Receiving Feedback
358+
--------------------------
359+
360+
We ask all contributors to follow some
361+
:doc:`best practices</contributing/community/reviews>`
362+
to ensure a constructive feedback process.
363+
364+
If you think someone fails to keep this advice in mind and you want another
365+
perspective, once again please join channel on `Symfony Slack`_. If you
366+
receive feedback you find abusive please contact the
367+
:doc:`CARE team</contributing/code_of_conduct/care_team.rst>`.
368+
369+
The:doc:`core team<contributing/code/core_team>` is responsible for deciding
370+
which PR gets merged, so their feedback is the most relevant. So do not feel
371+
pressured to refactor your code immediately when someone provides feedback.
372+
373+
Rework your PR
374+
~~~~~~~~~~~~~~
344375

345376
Based on the feedback on the pull request, you might need to rework your
346-
patch. Before re-submitting thepatch, rebase with ``upstream/master`` or
377+
PR. Before re-submitting thePR, rebase with ``upstream/master`` or
347378
``upstream/3.4``, don't merge; and force the push to the origin:
348379

349380
..code-block::terminal
@@ -374,3 +405,7 @@ before merging.
374405
.. _`fabbot`:https://fabbot.io
375406
.. _`PSR-1`:https://www.php-fig.org/psr/psr-1/
376407
.. _`PSR-2`:https://www.php-fig.org/psr/psr-2/
408+
.. _``searching on GitHub: https://github.com/symfony/symfony/issues?q=+is%3Aopen+
409+
.. _`Symfony Slack`:https://symfony.com/slack-invite
410+
.. _`Travis-CI`:https://travis-ci.org/symfony/symfony
411+
.. _`draft status`:https://help.github.com/en/articles/about-pull-requests#draft-pull-requests

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp