-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from cakephp/github-helper-files
Add GitHub helper files and update the README
- Loading branch information
Showing
4 changed files
with
126 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# How to contribute | ||
|
||
CakePHP loves to welcome your contributions. There are several ways to help out: | ||
|
||
* Create an [issue](https://github.com/cakephp/migrations/issues) on GitHub, if you have found a bug | ||
* Write test cases for open bug issues | ||
* Write patches for open bug/feature issues, preferably with test cases included | ||
* Contribute to the [documentation](https://github.com/cakephp/docs) | ||
|
||
There are a few guidelines that we need contributors to follow so that we have a | ||
chance of keeping on top of things. | ||
|
||
## Code of Conduct | ||
|
||
Help us keep CakePHP open and inclusive. Please read and follow our [Code of Conduct](https://github.com/cakephp/code-of-conduct/blob/master/CODE_OF_CONDUCT.md). | ||
|
||
## Getting Started | ||
|
||
* Make sure you have a [GitHub account](https://github.com/signup/free). | ||
* Submit an [issue](https://github.com/cakephp/migrations/issues), assuming one does not already exist. | ||
* Clearly describe the issue including steps to reproduce when it is a bug. | ||
* Make sure you fill in the earliest version that you know has the issue. | ||
* Fork the repository on GitHub. | ||
|
||
## Making Changes | ||
|
||
* Create a topic branch from where you want to base your work. | ||
* This is usually the master branch. | ||
* Only target release branches if you are certain your fix must be on that | ||
branch. | ||
* To quickly create a topic branch based on master; `git branch | ||
master/my_contribution master` then checkout the new branch with `git | ||
checkout master/my_contribution`. Better avoid working directly on the | ||
`master` branch, to avoid conflicts if you pull in updates from origin. | ||
* Make commits of logical units. | ||
* Check for unnecessary whitespace with `git diff --check` before committing. | ||
* Use descriptive commit messages and reference the #issue number. | ||
* Core test cases should continue to pass. You can run tests locally or enable | ||
[travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs | ||
will be executed. | ||
* Your work should apply the [CakePHP coding standards](http://book.cakephp.org/3.0/en/contributing/cakephp-coding-conventions.html). | ||
|
||
## Submitting Changes | ||
|
||
* Push your changes to a topic branch in your fork of the repository. | ||
* Submit a pull request to the repository in the CakePHP organization, with the | ||
correct target branch. | ||
|
||
## Test cases and codesniffer | ||
|
||
CakePHP tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html). | ||
To install PHPUnit use composer: | ||
|
||
php composer.phar require "phpunit/phpunit:*" | ||
|
||
To run the test cases locally use the following command: | ||
|
||
vendor/bin/phpunit | ||
|
||
You can copy file `phpunit.xml.dist` to `phpunit.xml` and modify the database | ||
driver settings as required to run tests for particular database. | ||
|
||
You can also register on [Travis CI](https://travis-ci.org/) and from your | ||
[profile](https://travis-ci.org/profile) page enable the service hook for your | ||
CakePHP fork on GitHub for automated test builds. | ||
|
||
To run the sniffs for CakePHP coding standards: | ||
|
||
vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src | ||
|
||
Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer) | ||
repository to setup the CakePHP standard. The [README](https://github.com/cakephp/cakephp-codesniffer/blob/master/README.md) contains installation info | ||
for the sniff and phpcs. | ||
|
||
# Additional Resources | ||
|
||
* [CakePHP coding standards](http://book.cakephp.org/3.0/en/contributing/cakephp-coding-conventions.html) | ||
* [Existing issues](https://github.com/cakephp/migrations/issues) | ||
* [General GitHub documentation](https://help.github.com/) | ||
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/) | ||
* `#cakephp` IRC channel on freenode.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
This is a (multiple allowed): | ||
* [x] bug | ||
* [ ] enhancement | ||
* [ ] feature-discussion (RFC) | ||
|
||
* CakePHP Version: EXACT RELEASE VERSION OR COMMIT HASH, HERE. | ||
* Migrations plugin version: EXACT RELEASE VERSION OR COMMIT HASH, HERE. | ||
* Bake plugin version (if relevant): EXACT RELEASE VERSION OR COMMIT HASH, HERE. | ||
* Database server (MySQL, SQLite, Postgres): EXACT RELEASE VERSION | ||
* PHP Version: EXACT RELEASE VERSION | ||
* Platform / OS: Preferably with version number | ||
|
||
### What you did | ||
EXPLAIN WHAT YOU DID, PREFERABLY WITH CODE EXAMPLES, HERE. | ||
Give as much details as possible (preferably using [Gist](https://gist.github.com/)) : | ||
* if your migration file was created with the bake tool or not, | ||
* the exact shell command you used, | ||
* the FULL content of the migration files that cause the issue, | ||
* a way to recreate the schema of your database. | ||
|
||
### Expected Behavior | ||
EXPLAIN WHAT IS TO BE EXPECTED, HERE. | ||
|
||
### Actual Behavior | ||
EXPLAIN WHAT IS ACTUALLY HAPPENING, HERE. | ||
|
||
P.S. Remember, an issue is not the place to ask questions. You can use [Stack Overflow](http://stackoverflow.com/questions/tagged/cakephp) | ||
for that or join the #cakephp channel on irc.freenode.net, where we will be more than happy to help answer your questions. | ||
|
||
Before you open an issue, please check if a similar issue already exists or has been closed before. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. | ||
|
||
The best way to propose a feature is to open an issue first and discuss your ideas there before implementing them. | ||
|
||
Always follow the [contribution guidelines](https://github.com/cakephp/migrations/blob/master/.github/CONTRIBUTING.md) when submitting a pull request. In particular, make sure existing tests still pass, and add tests for all new behavior. When fixing a bug, you may want to add a test to verify the fix. |
Oops, something went wrong.