1
- Pull request and commit requirements
2
- ====================================
1
+ Commit Conventions
2
+ ==================
3
3
4
- Pull requests
5
- -------------
6
-
7
- The pull request body should adhere to the Symfony standard `as defined here `_
8
-
9
- Commits
10
- -------
11
-
12
- Before a pull request is merged the commit should be squashed (i.e. there
13
- should be a single commit in the pull request with all of your work in it).
4
+ The Symfony CMF uses a convention for the commits. This isn't a requirement
5
+ when contributing to the CMF, but it is created to have meaningfull commits
6
+ for big new features.
14
7
15
8
Squashing
16
- ~~~~~~~~~
9
+ ---------
10
+
11
+ Before a Pull Request is merged, the commits should be squashed (i.e. there
12
+ should be a single commit in the Pull Request with all your work in it).
17
13
18
14
You can easily squash a commit using `git rebase ` as follows:
19
15
@@ -32,32 +28,31 @@ like this:
32
28
33
29
.. code-block :: bash
34
30
35
- pick 608cc0f fix link to CoreBundle Documentation
36
- pick be141b0 Correctly use Testing features
37
- pick 6e2ebf5 Changed PHPunit config
38
- pick c396b08 Changed travis config
31
+ pick 5d4530b port features from simple cms into routing bundle to simplify things
32
+ pick 1a0eea3 cs fixes and cleanups according to feedback
33
+ pick 8cbab56 convert settings to options
34
+ pick 8f3e4f9 cleanups for the options refactoring
39
35
40
36
Tell github to pick the first one and squash the rest as follows:
41
37
42
38
.. code-block :: bash
43
39
44
- pick 608cc0f fix link to CoreBundle Documentation
45
- s be141b0 Correctly use Testing features
46
- s 6e2ebf5 Changed PHPunit config
47
- s c396b08 Changed travis config
40
+ pick 5d4530b port features from simple cms into routing bundle to simplify things
41
+ s 1a0eea3 cs fixes and cleanups according to feedback
42
+ s 8cbab56 convert settings to options
43
+ s 8f3e4f9 cleanups for the options refactoring
48
44
49
45
Save the file and quit. GIT should now squash all your commits and ask you
50
46
for a new commit message.
51
47
52
48
Commit Message
53
- ~~~~~~~~~~~~~~
49
+ --------------
54
50
55
51
The commit message should be formatted as follows:
56
52
57
- .. code-block ::
53
+ .. code-block :: text
58
54
59
- [<subject] <Short description>
60
- ==============================
55
+ [<scope>] <short description>
61
56
62
57
Fixes: <list of issues fixed>
63
58
@@ -73,12 +68,12 @@ The commit message should be formatted as follows:
73
68
74
69
<list of deprecations>
75
70
76
- For example:
71
+ For example, the commit message of a PR fixing 2 issues and adding 2 BC breaks
72
+ would be:
77
73
78
- .. code-block ::
74
+ .. code-block :: text
79
75
80
76
[Initializer] Initializers use ManagerRegistry
81
- ==============================================
82
77
83
78
Fixes: #1234, #4321
84
79
@@ -100,8 +95,16 @@ For example:
100
95
- The first argument to the `GenericInitializer` constructor is now the
101
96
name of the initializer.
102
97
103
- Deprecations
104
- ------------
98
+ Short Commit Message
99
+ ~~~~~~~~~~~~~~~~~~~~
100
+
101
+ Not all Pull Requests require this much information for the commit. In most
102
+ cases, a more simpler commit convention is enough:
103
+
104
+ .. code-block :: text
105
+
106
+ <bug|feature|minor> [<scope>] <short description>
105
107
106
- This is just an example, there are no deprecations, but if there were
107
- deprecations they sure would be listed here.
108
+ Where ``bug `` refers to a commit fixing bugs, ``feature `` to a commit adding
109
+ features and ``minor `` to commits adding less relevant things (fixing code
110
+ standard, adding comments, fixing typos, etc.).
0 commit comments