|
| 1 | +Pull request and commit requirements |
| 2 | +==================================== |
| 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). |
| 14 | + |
| 15 | +Squashing |
| 16 | +~~~~~~~~~ |
| 17 | + |
| 18 | +You can easily squash a commit using `git rebase` as follows: |
| 19 | + |
| 20 | +.. code-block:: bash |
| 21 | +
|
| 22 | + $ git rebase --interactive HEAD~<number of commits in your pull request> |
| 23 | +
|
| 24 | +For example, if your pull request on github has 4 commits: |
| 25 | + |
| 26 | +.. code-block:: bash |
| 27 | +
|
| 28 | + $ git rebase --interactive HEAD~4 |
| 29 | +
|
| 30 | +You will then be presented with a screen in your editor which looks something |
| 31 | +like this: |
| 32 | + |
| 33 | +.. code-block:: bash |
| 34 | +
|
| 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 |
| 39 | +
|
| 40 | +Tell github to pick the first one and squash the rest as follows: |
| 41 | + |
| 42 | +.. code-block:: bash |
| 43 | +
|
| 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 |
| 48 | +
|
| 49 | +Save the file and quit. GIT should now squash all your commits and ask you |
| 50 | +for a new commit message. |
| 51 | + |
| 52 | +Commit Message |
| 53 | +~~~~~~~~~~~~~~ |
| 54 | + |
| 55 | +The commit message should be formatted as follows: |
| 56 | + |
| 57 | +.. code-block:: |
| 58 | +
|
| 59 | + [<subject] <Short description> |
| 60 | + ============================== |
| 61 | +
|
| 62 | + Fixes: <list of issues fixed> |
| 63 | +
|
| 64 | + <long description> |
| 65 | +
|
| 66 | + BC Breaks (as required) |
| 67 | + --------- |
| 68 | +
|
| 69 | + <list of BC breaks and required migrations> |
| 70 | +
|
| 71 | + Deprecations (as required) |
| 72 | + ------------ |
| 73 | +
|
| 74 | + <list of deprecations> |
| 75 | +
|
| 76 | +For example: |
| 77 | + |
| 78 | +.. code-block:: |
| 79 | +
|
| 80 | + [Initializer] Initializers use ManagerRegistry |
| 81 | + ============================================== |
| 82 | +
|
| 83 | + Fixes: #1234, #4321 |
| 84 | +
|
| 85 | + Initializers are now passed an instance of `ManagerRegistry` instead |
| 86 | + of the `Phpcr\Session`. This means that initializers can retrieve both |
| 87 | + the PHPCR session and the `DocumentManager`. |
| 88 | +
|
| 89 | + This PR also introduces a requirement that all initializers provide a name |
| 90 | + which can be used in diagnostics. |
| 91 | +
|
| 92 | + BC Breaks |
| 93 | + --------- |
| 94 | +
|
| 95 | + - The `init` method of the InitializerInterface now accepts a |
| 96 | + `ManagerResistry` instead of a `PhpcrSession`. The PHPCR session can |
| 97 | + be retrieved using `$registry->getConnection` and the manager with |
| 98 | + `$registry->getManager()`; |
| 99 | +
|
| 100 | + - The first argument to the `GenericInitializer` constructor is now the |
| 101 | + name of the initializer. |
| 102 | +
|
| 103 | + Deprecations |
| 104 | + ------------ |
| 105 | +
|
| 106 | + This is just an example, there are no deprecations, but if there were |
| 107 | + deprecations they sure would be listed here. |
0 commit comments