-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CONTRIBUTING.md File #854
CONTRIBUTING.md File #854
Changes from 9 commits
0e40659
8313587
d3a0d50
4bc5bb7
bab78d1
df88fef
4fd7a4e
288a1ec
a16bc3d
486a356
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Contributing | ||
============ | ||
Help is very welcomed. Code contributions must be done in respect of [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). | ||
More details on how to contribute and guidelines for [pull requests](http://elastica.io/contribute/pull-request.html) can be found [here](http://elastica.io/contribute/). | ||
|
||
See [Coding guidelines](http://elastica.io/contribute/coding-guidelines.html) for tips on how to do so. | ||
All changes which are made to the project are added to the [CHANGELOG.md](https://github.com/ruflin/Elastica/blob/master/CHANGELOG.md). | ||
|
||
|
||
Issues | ||
------ | ||
* Bugs & Feature requests: If you found a bug, open an issue on [Github](https://github.com/ruflin/Elastica/issues). Before you open it search the issues which were already reported to make sure the issue doesn't already exist. Make sure to report the issue in a way that it can be reproduced and you report which version of Elastica and its dependencies you are using. Best is to report the problem with a code example. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better: "If you found a bug, open an issue on Github. Please search for already reported similary issues before opening a new one. You should include code examples (with dependencies if needed) and your Elastica version to the issue description." |
||
* Questions & Problems: If you have questions or a specific problem, use the [Elastica Gitter](https://gitter.im/ruflin/Elastica) Chat or open an issue on [Stackoverflow](http://stackoverflow.com/questions/tagged/elastica). Make sure to assign the tag Elastica. | ||
|
||
|
||
Setup | ||
----- | ||
Elastica currently allows two setups for development. Either through vagrant or docker-compose. To use the vagrant environment, run `vagrant up`. To use the docker environment, check out the Makefile for the necessary commands. | ||
* Run your changes / tests in the virtual environment to make sure it is reproducible. Don't use a local setup | ||
* Run tests locally on your machine first | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a bit confusing with that "Don't use a local setup" before. Better:
|
||
|
||
Commands | ||
-------- | ||
To run the commands below, you must have docker-compose [installed](https://docs.docker.com/compose/install/). The first time the commands are run it takes some time to download all the partial images. Form then on the commands should run very fast. The advantage in using the commands below is that no local tools and libraries have to be installed and it is guaranteed that everytone is using the same tools. | ||
|
||
## Check style of your code | ||
This command will call php-cs-fixer with the predefined settings for the elastica project. No local setup of the tools is needed as everything will happen directly in the container. | ||
``` | ||
make run RUN="make lint" | ||
``` | ||
|
||
|
||
Coding | ||
------ | ||
|
||
### Rules | ||
* Changes are never pushed into master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't get this one. Is it the same as the last point? |
||
* Pull requests are made to master | ||
* We use the Forking Workflow. https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow | ||
* Follow the coding guidelines. | ||
* Use a feature branch for every pull request. Don't open a pull request from your master branch. | ||
|
||
### Pull Requests | ||
* One change per pull requests: Keep your pull requests as small as possible. Only one change should happen per pull request. This makes it easier to review and provided feedback. If you have a large pull request, try to split it up in multiple smaller requests. | ||
* Commit messages: Make sure that your commit messages have meaning and provide an understanding on what was changed without looking at the code. | ||
* Pull requests should be opened as early as possible as pull requests are also here for communication / discussing changes. Add a comment when your pull request is ready to be merged. | ||
* Tests: Your addition / change must be tested and the builds must be green. Test your changes locally. Add unit tests and if possible functional tests. Don't forget to add the group to your tests. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good to mention group names here |
||
* Update the CHANGELOG.md file with your changes | ||
* Backward Compatibility breaks: In case you break backward compatibility, provide details on why this is needed. | ||
* Merge: No one should ever merge his own pull request | ||
|
||
|
||
### Name Spaces & Classes | ||
Most name spaces and classes are self explanotary and use cases can be taken from classes which already exist. | ||
|
||
#### Tool Namespace | ||
The namespace Tool is used for making more complex functionality of Elastica available to the users. In general it maps existing functionality of Elastica and offers simplified functions. | ||
|
||
#### Util Class | ||
The util class is used for all static functions which are used in the Elastica library but don't access the library itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better:
"All changes must be documented in the CHANGELOG."