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

Commitf2f5e9a

Browse files
committed
bug#3421 [Contributing] Cleaning the "contributing patch" page a bit (lemoinem)
This PR was merged into the 2.4 branch.Discussion----------[Contributing] Cleaning the "contributing patch" page a bit| Q | A| ------------- | ---| Doc fix? | no| New docs? | no| Applies to | all| Fixed tickets | N/AI just mentioned the fact that `push -f` is required when rebasing and explicit that the "2.2 when bugfixing" is a follow up on the previous example (Not necessarily explicit at first).I also worked my way through the all document to replace wrong single back-tick occurrences by double backticks.Finally, I converted the mentions of PSR-1 and PSR-2 to links toward the respective PSR.PS: as per@wouterj request (#3421 (comment)), I also replaced mentions of 2.2 by 2.3Commits-------c0de1cb [Contributing] Replace HEAD~3 by upstream/master732758b [Contributing] Fix "When you finish" => "When you are finished"b25ec96 [Contributing] Replace mentions of 2.2 for 2.370ed645 [Contributing] Add PSR-1 and 2 links6796ba8 [Contributing] Fix single vs double backtick issuesb35e62b [Contributing] Clarify the rebase operation
2 parentsf08e2a5 +c0de1cb commitf2f5e9a

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

‎contributing/code/patches.rst

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Get the Symfony2 source code:
7272
* Fork the `Symfony2 repository`_ (click on the "Fork" button);
7373

7474
* After the "forking action" has completed, clone your fork locally
75-
(this will create a `symfony` directory):
75+
(this will create a ``symfony`` directory):
7676

7777
..code-block::bash
7878
@@ -105,16 +105,16 @@ Choose the right Branch
105105
~~~~~~~~~~~~~~~~~~~~~~~
106106

107107
Before working on a patch, you must determine on which branch you need to
108-
work. The branch should be based on the `master` branch if you want to add a
108+
work. The branch should be based on the ``master`` branch if you want to add a
109109
new feature. But if you want to fix a bug, use the oldest but still maintained
110-
version of Symfony where the bug happens (like `2.2`).
110+
version of Symfony where the bug happens (like ``2.3``).
111111

112112
..note::
113113

114114
All bug fixes merged into maintenance branches are also merged into more
115115
recent branches on a regular basis. For instance, if you submit a patch
116-
for the `2.2` branch, the patch will also be applied by the core team on
117-
the `master` branch.
116+
for the ``2.3`` branch, the patch will also be applied by the core team on
117+
the ``master`` branch.
118118

119119
Create a Topic Branch
120120
~~~~~~~~~~~~~~~~~~~~~
@@ -126,26 +126,26 @@ topic branch:
126126
127127
$ git checkout -b BRANCH_NAME master
128128
129-
Or, if you want to provide a bugfix for the2.2 branch, first track the remote
130-
`2.2` branch locally:
129+
Or, if you want to provide a bugfix for the``2.3`` branch, first track the remote
130+
``2.3`` branch locally:
131131

132132
..code-block::bash
133133
134-
$ git checkout -t origin/2.2
134+
$ git checkout -t origin/2.3
135135
136-
Then create a new branch off the2.2 branch to work on the bugfix:
136+
Then create a new branch off the``2.3`` branch to work on the bugfix:
137137

138138
..code-block::bash
139139
140-
$ git checkout -b BRANCH_NAME 2.2
140+
$ git checkout -b BRANCH_NAME 2.3
141141
142142
..tip::
143143

144-
Use a descriptive name for your branch (`ticket_XXX` where `XXX` is the
144+
Use a descriptive name for your branch (``ticket_XXX`` where ``XXX`` is the
145145
ticket number is a good convention for bug fixes).
146146

147147
The above checkout commands automatically switch the code to the newly created
148-
branch (check the branch you are working on with `git branch`).
148+
branch (check the branch you are working on with ``git branch``).
149149

150150
Work on your Patch
151151
~~~~~~~~~~~~~~~~~~
@@ -154,7 +154,7 @@ Work on the code as much as you want and commit as much as you want; but keep
154154
in mind the following:
155155

156156
* Read about the Symfony:doc:`conventions<conventions>` and follow the
157-
coding:doc:`standards<standards>` (use `git diff --check` to check for
157+
coding:doc:`standards<standards>` (use ``git diff --check`` to check for
158158
trailing spaces -- also read the tip below);
159159

160160
* Add unit tests to prove that the bug is fixed or that the new feature
@@ -164,7 +164,7 @@ in mind the following:
164164
provide a compatibility layer to support the old way) -- patches that break
165165
backward compatibility have less chance to be merged;
166166

167-
* Do atomic and logically separate commits (use the power of `git rebase` to
167+
* Do atomic and logically separate commits (use the power of ``git rebase`` to
168168
have a clean and logical history);
169169

170170
* Squash irrelevant commits that are just about fixing coding standards or
@@ -179,7 +179,7 @@ in mind the following:
179179

180180
When submitting pull requests, `fabbot`_ checks your code
181181
for common typos and verifies that you are using the PHP coding standards
182-
as defined in PSR-1 and PSR-2.
182+
as defined in`PSR-1`_ and`PSR-2`_.
183183

184184
A status is posted below the pull request description with a summary
185185
of any problems it detects or any Travis CI build failures.
@@ -199,11 +199,11 @@ Prepare your Patch for Submission
199199
When your patch is not about a bug fix (when you add a new feature or change
200200
an existing one for instance), it must also include the following:
201201

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

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

209209
Step 3: Submit your Patch
@@ -228,7 +228,8 @@ while to finish your changes):
228228
229229
..tip::
230230

231-
Replace `master` with `2.2` if you are working on a bugfix
231+
Replace ``master`` with the branch you selected previously (e.g. ``2.3``)
232+
if you are working on a bugfix
232233

233234
When doing the ``rebase`` command, you might have to fix merge conflicts.
234235
``git status`` will show you the *unmerged* files. Resolve all the conflicts,
@@ -243,7 +244,7 @@ Check that all tests still pass and push your branch remotely:
243244

244245
..code-block::bash
245246
246-
$ git push origin BRANCH_NAME
247+
$ git push-forigin BRANCH_NAME
247248
248249
Make a Pull Request
249250
~~~~~~~~~~~~~~~~~~~
@@ -252,8 +253,8 @@ You can now make a pull request on the ``symfony/symfony`` Github repository.
252253

253254
..tip::
254255

255-
Take care to point your pull request towards ``symfony:2.2`` if you want
256-
the core team to pull a bugfix based on the2.2 branch.
256+
Take care to point your pull request towards ``symfony:2.3`` if you want
257+
the core team to pull a bugfix based on the``2.3`` branch.
257258

258259
To ease the core team work, always include the modified components in your
259260
pull request message, like in:
@@ -316,10 +317,10 @@ Some answers to the questions trigger some more requirements:
316317
documentation and reference it under the "Doc PR" section;
317318

318319
* If you answer yes to "BC breaks?", the patch must contain updates to the
319-
relevant CHANGELOG and UPGRADE files;
320+
relevant``CHANGELOG`` and``UPGRADE`` files;
320321

321322
* If you answer yes to "Deprecations?", the patch must contain updates to the
322-
relevant CHANGELOG and UPGRADE files;
323+
relevant``CHANGELOG`` and``UPGRADE`` files;
323324

324325
* If you answer no to "Tests pass", you must add an item to a todo-list with
325326
the actions that must be done to fix the tests;
@@ -381,7 +382,7 @@ convert many commits to one commit. To do this, use the rebase command:
381382

382383
..code-block::bash
383384
384-
$ git rebase -iHEAD~3
385+
$ git rebase -iupstream/master
385386
$ git push -f origin BRANCH_NAME
386387
387388
The number 3 here must equal the amount of commits in your branch. After you
@@ -393,11 +394,11 @@ type this command, an editor will popup showing a list of commits:
393394
pick 7fc64b4 second commit
394395
pick 7d33018 third commit
395396
396-
To squash all commits into the first one, remove the word"pick" before the
397-
second and the last commits, and replace it by the word"squash" or just "s".
398-
When you save, Git will start rebasing, and if successful, will ask you to
399-
edit the commit message, which by default is a listing of the commit messages
400-
of all the commits. When youfinish, execute the push command.
397+
To squash all commits into the first one, remove the word``pick`` before the
398+
second and the last commits, and replace it by the word``squash`` or just
399+
``s``.When you save, Git will start rebasing, and if successful, will ask
400+
you toedit the commit message, which by default is a listing of the commit
401+
messagesof all the commits. When youare finished, execute the push command.
401402

402403
.. _ProGit:http://git-scm.com/book
403404
.. _GitHub:https://github.com/signup/free
@@ -409,3 +410,5 @@ of all the commits. When you finish, execute the push command.
409410
.. _`travis-ci.org Getting Started Guide`:http://about.travis-ci.org/docs/user/getting-started/
410411
.. _`documentation repository`:https://github.com/symfony/symfony-docs
411412
.. _`fabbot`:http://fabbot.io
413+
.. _`PSR-1`:http://www.php-fig.org/psr/psr-1/
414+
.. _`PSR-2`:http://www.php-fig.org/psr/psr-2/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp