Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 38999ab

Browse files
committed
Made standard not that strict
1 parent dfe5ed3 commit 38999ab

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

contributing/code.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ Contributing
44
The Symfony2 CMF team follows all the rules and guidelines of the core
55
Symfony2 `development process`_.
66

7-
When creating Pull Requests, please follow the Symfony `Submitting a Patch`_ guidlines
8-
with the added requirement of our :doc:`pr_style_and_commits`.
7+
When creating Pull Requests, please follow the Symfony `Submitting a Patch`_ guidlines.
98

9+
.. tip::
10+
11+
See :doc:`pr_style_and_commits` for the commit conventions used by the
12+
Symfony CMF team.
1013

1114
Resources / Links
1215
-----------------

contributing/pr_style_and_commits.rst

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
Pull request and commit requirements
2-
====================================
1+
Commit Conventions
2+
==================
33

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.
147

158
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).
1713

1814
You can easily squash a commit using `git rebase` as follows:
1915

@@ -32,32 +28,31 @@ like this:
3228

3329
.. code-block:: bash
3430
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
3935
4036
Tell github to pick the first one and squash the rest as follows:
4137

4238
.. code-block:: bash
4339
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
4844
4945
Save the file and quit. GIT should now squash all your commits and ask you
5046
for a new commit message.
5147

5248
Commit Message
53-
~~~~~~~~~~~~~~
49+
--------------
5450

5551
The commit message should be formatted as follows:
5652

57-
.. code-block::
53+
.. code-block:: text
5854
59-
[<subject] <Short description>
60-
==============================
55+
[<scope>] <short description>
6156
6257
Fixes: <list of issues fixed>
6358
@@ -73,12 +68,12 @@ The commit message should be formatted as follows:
7368
7469
<list of deprecations>
7570
76-
For example:
71+
For example, the commit message of a PR fixing 2 issues and adding 2 BC breaks
72+
would be:
7773

78-
.. code-block::
74+
.. code-block:: text
7975
8076
[Initializer] Initializers use ManagerRegistry
81-
==============================================
8277
8378
Fixes: #1234, #4321
8479
@@ -100,8 +95,16 @@ For example:
10095
- The first argument to the `GenericInitializer` constructor is now the
10196
name of the initializer.
10297
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>
105107
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

Comments
 (0)