From 628c77c28b62a0d564aee29cf7b12b338c0e7607 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 19 Sep 2012 16:29:30 +0100 Subject: Changed the contributing file to a markdown document as Github doesn't support rendering contributing file as rst Signed-off-by: Alex Bilbie --- contributing.md | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 contributing.md (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md new file mode 100644 index 000000000..f3f94fbc8 --- /dev/null +++ b/contributing.md @@ -0,0 +1,92 @@ +# Contributing to CodeIgniter + + +CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or [Pull Requests](http://help.github.com/send-pull-requests/) on the [EllisLab CodeIgniter repository](https://github.com/EllisLab/CodeIgniter>) on GitHub. + +Issues are a quick way to point out a bug. If you find a bug or documentation error in CodeIgniter then please check a few things first: + +1. There is not already an open Issue +2. The issue has already been fixed (check the develop branch, or look for closed Issues) +3. Is it something really obvious that you fix it yourself? + +Reporting issues is helpful but an even better approach is to send a Pull Request, which is done by "Forking" the main repository and committing to your own copy. This will require you to use the version control system called Git. + +## Guidelines + +Before we look into how, here are the guidelines. If your Pull Requests fail +to pass these guidelines it will be declined and you will need to re-submit +when you’ve made the changes. This might sound a bit tough, but it is required +for us to maintain quality of the code-base. + +### PHP Style + +All code must meet the [Style Guide](http://codeigniter.com/user_guide/general/styleguide.html), which is +essentially the [Allman indent style](http://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. + +### Documentation + +If you change anything that requires a change to documentation then you will need to add it. New classes, methods, parameters, changing default values, etc are all things that will require a change to documentation. The change-log must also be updated for every change. Also PHPDoc blocks must be maintained. + +### Compatibility + +CodeIgniter is compatible with PHP 5.2.4 so all code supplied must stick to +this requirement. If PHP 5.3 or 5.4 functions or features are used then there +must be a fallback for PHP 5.2.4. + +### Branching + +CodeIgniter uses the [Git-Flow](http://nvie.com/posts/a-successful-git-branching-model/) branching model which requires all pull requests to be sent to the "develop" branch. This is +where the next planned version will be developed. The "master" branch will always contain the latest stable version and is kept clean so a "hotfix" (e.g: an emergency security patch) can be applied to master to create a new version, without worrying about other features holding it up. For this reason all commits need to be made to "develop" and any sent to "master" will be closed automatically. If you have multiple changes to submit, please place all changes into their own branch on your fork. + +One thing at a time: A pull request should only contain one change. That does not mean only one commit, but one change - however many commits it took. The reason for this is that if you change X and Y but send a pull request for both at the same time, we might really want X but disagree with Y, meaning we cannot merge the request. Using the Git-Flow branching model you can create new branches for both of these features and send two requests. + +### Signing + +You must sign your work, certifying that you either wrote the work or otherwise have the right to pass it on to an open source project. git makes this trivial as you merely have to use `--signoff` on your commits to your CodeIgniter fork. + +`git commit --signoff` + +or simply + +`git commit -s` + +This will sign your commits with the information setup in your git config, e.g. + +`Signed-off-by: John Q Public ` + +If you are using [Tower](http://www.git-tower.com/) there is a "Sign-Off" checkbox in the commit window. You could even alias git commit to use the `-s` flag so you don’t have to think about it. + +By signing your work in this manner, you certify to a "Developer's Certificate of Origin". The current version of this certificate is in the `DCO.txt` file in the root of this repository. + + +## How-to Guide + +There are two ways to make changes, the easy way and the hard way. Either way you will need to [create a GitHub account](https://github.com/signup/free). + +Easy way GitHub allows in-line editing of files for making simple typo changes and quick-fixes. This is not the best way as you are unable to test the code works. If you do this you could be introducing syntax errors, etc, but for a Git-phobic user this is good for a quick-fix. + +Hard way The best way to contribute is to "clone" your fork of CodeIgniter to your development area. That sounds like some jargon, but "forking" on GitHub means "making a copy of that repo to your account" and "cloning" means "copying that code to your environment so you can work on it". + +1. Set up Git (Windows, Mac & Linux) +2. Go to the CodeIgniter repo +3. Fork it +4. Clone your CodeIgniter repo: git@github.com:/CodeIgniter.git +5. Checkout the "develop" branch At this point you are ready to start making changes. +6. Fix existing bugs on the Issue tracker after taking a look to see nobody else is working on them. +7. Commit the files +8. Push your develop branch to your fork +9. Send a pull request [http://help.github.com/send-pull-requests/](http://help.github.com/send-pull-requests/) + +The Reactor Engineers will now be alerted about the change and at least one of the team will respond. If your change fails to meet the guidelines it will be bounced, or feedback will be provided to help you improve it. + +Once the Reactor Engineer handling your pull request is happy with it they will post it to the internal EllisLab discussion area to be double checked by the other Engineers and EllisLab developers. If nobody has a problem with the change then it will be merged into develop and will be part of the next release. Keeping your fork up-to-date + +Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for a URL of a Git repository. By default your fork will have a remote named "origin" which points to your fork, but you can add another remote named "codeigniter" which points to `git://github.com/EllisLab/CodeIgniter.git`. This is a read-only remote but you can pull from this develop branch to update your own. + +If you are using command-line you can do the following: + +1. `git remote add codeigniter git://github.com/EllisLab/CodeIgniter.git` +2. `git pull codeigniter develop` +3. `git push origin develop` + +Now your fork is up to date. This should be done regularly, or before you send a pull request at least. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b7869fbeb2abc78cb1650b95f151c9e262e7e58b Mon Sep 17 00:00:00 2001 From: Daniel Paul Searles Date: Mon, 5 Nov 2012 16:42:01 -0800 Subject: Fixed a grammatical typo. --- contributing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index f3f94fbc8..405aaec63 100644 --- a/contributing.md +++ b/contributing.md @@ -7,7 +7,7 @@ Issues are a quick way to point out a bug. If you find a bug or documentation er 1. There is not already an open Issue 2. The issue has already been fixed (check the develop branch, or look for closed Issues) -3. Is it something really obvious that you fix it yourself? +3. Is it something really obvious that you can fix yourself? Reporting issues is helpful but an even better approach is to send a Pull Request, which is done by "Forking" the main repository and committing to your own copy. This will require you to use the version control system called Git. @@ -89,4 +89,4 @@ If you are using command-line you can do the following: 2. `git pull codeigniter develop` 3. `git push origin develop` -Now your fork is up to date. This should be done regularly, or before you send a pull request at least. \ No newline at end of file +Now your fork is up to date. This should be done regularly, or before you send a pull request at least. -- cgit v1.2.3-24-g4f1b From 8d3afde93f9ff7f461095d5b9147b662610c045b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 6 Nov 2012 12:53:47 +0200 Subject: Fix a lang key typo --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 405aaec63..b6d486d00 100644 --- a/contributing.md +++ b/contributing.md @@ -89,4 +89,4 @@ If you are using command-line you can do the following: 2. `git pull codeigniter develop` 3. `git push origin develop` -Now your fork is up to date. This should be done regularly, or before you send a pull request at least. +Now your fork is up to date. This should be done regularly, or before you send a pull request at least. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 49af828cd3dca90260237e93dcf23d086e6ca5c2 Mon Sep 17 00:00:00 2001 From: Imran Latif Date: Sat, 17 May 2014 19:33:51 +0500 Subject: Fixed wrong url for Style Guide in Contributing Guide --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index b6d486d00..29673aa5b 100644 --- a/contributing.md +++ b/contributing.md @@ -20,7 +20,7 @@ for us to maintain quality of the code-base. ### PHP Style -All code must meet the [Style Guide](http://codeigniter.com/user_guide/general/styleguide.html), which is +All code must meet the [Style Guide](http://ellislab.com/codeigniter/user-guide/general/styleguide.html), which is essentially the [Allman indent style](http://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. ### Documentation -- cgit v1.2.3-24-g4f1b From 98251706c81a7ca6057430c7c6a56ee4dfbe10a0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Oct 2014 01:55:22 +0200 Subject: [ci skip] Update the contribution guide --- contributing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 29673aa5b..99ed85909 100644 --- a/contributing.md +++ b/contributing.md @@ -1,7 +1,7 @@ # Contributing to CodeIgniter -CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or [Pull Requests](http://help.github.com/send-pull-requests/) on the [EllisLab CodeIgniter repository](https://github.com/EllisLab/CodeIgniter>) on GitHub. +CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or [Pull Requests](http://help.github.com/send-pull-requests/) on the [CodeIgniter repository](https://github.com/bcit-ci/CodeIgniter>) on GitHub. Issues are a quick way to point out a bug. If you find a bug or documentation error in CodeIgniter then please check a few things first: @@ -20,7 +20,7 @@ for us to maintain quality of the code-base. ### PHP Style -All code must meet the [Style Guide](http://ellislab.com/codeigniter/user-guide/general/styleguide.html), which is +All code must meet the [Style Guide](http://codeigniter.com/user_guide/general/styleguide.html), which is essentially the [Allman indent style](http://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. ### Documentation @@ -79,13 +79,13 @@ Hard way The best way to contribute is to "clone" your fork of CodeIgniter to yo The Reactor Engineers will now be alerted about the change and at least one of the team will respond. If your change fails to meet the guidelines it will be bounced, or feedback will be provided to help you improve it. -Once the Reactor Engineer handling your pull request is happy with it they will post it to the internal EllisLab discussion area to be double checked by the other Engineers and EllisLab developers. If nobody has a problem with the change then it will be merged into develop and will be part of the next release. Keeping your fork up-to-date +Once the Reactor Engineer handling your pull request is happy with it they will merge it into develop and your patch will be part of the next release. Keeping your fork up-to-date -Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for a URL of a Git repository. By default your fork will have a remote named "origin" which points to your fork, but you can add another remote named "codeigniter" which points to `git://github.com/EllisLab/CodeIgniter.git`. This is a read-only remote but you can pull from this develop branch to update your own. +Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for a URL of a Git repository. By default your fork will have a remote named "origin" which points to your fork, but you can add another remote named "codeigniter" which points to `git://github.com/bcit-ci/CodeIgniter.git`. This is a read-only remote but you can pull from this develop branch to update your own. If you are using command-line you can do the following: -1. `git remote add codeigniter git://github.com/EllisLab/CodeIgniter.git` +1. `git remote add codeigniter git://github.com/bcit-ci/CodeIgniter.git` 2. `git pull codeigniter develop` 3. `git push origin develop` -- cgit v1.2.3-24-g4f1b From 3c71f44c6cc26dfe655298b66defdf4890bf6d8b Mon Sep 17 00:00:00 2001 From: Hans Anderson Date: Thu, 4 Dec 2014 18:36:48 -0600 Subject: Fixed sub-section header Signed-off-by: Hans Anderson --- contributing.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 99ed85909..126bdc74f 100644 --- a/contributing.md +++ b/contributing.md @@ -79,7 +79,9 @@ Hard way The best way to contribute is to "clone" your fork of CodeIgniter to yo The Reactor Engineers will now be alerted about the change and at least one of the team will respond. If your change fails to meet the guidelines it will be bounced, or feedback will be provided to help you improve it. -Once the Reactor Engineer handling your pull request is happy with it they will merge it into develop and your patch will be part of the next release. Keeping your fork up-to-date +Once the Reactor Engineer handling your pull request is happy with it they will merge it into develop and your patch will be part of the next release. + +### Keeping your fork up-to-date Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for a URL of a Git repository. By default your fork will have a remote named "origin" which points to your fork, but you can add another remote named "codeigniter" which points to `git://github.com/bcit-ci/CodeIgniter.git`. This is a read-only remote but you can pull from this develop branch to update your own. @@ -89,4 +91,4 @@ If you are using command-line you can do the following: 2. `git pull codeigniter develop` 3. `git push origin develop` -Now your fork is up to date. This should be done regularly, or before you send a pull request at least. \ No newline at end of file +Now your fork is up to date. This should be done regularly, or before you send a pull request at least. -- cgit v1.2.3-24-g4f1b From fe9309d22c1b088f5363954d6dac013c8c955894 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Jan 2015 17:48:58 +0200 Subject: Bulk (mostly documentation) update - Remove PHP version from license notices - Bump year number in copyright notices - Recommend PHP 5.4 or newer to be used - Tell Travis-CI to test on PHP 5.3.0 instead of the latest 5.3 version Related: #3450 --- contributing.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 126bdc74f..5296daa88 100644 --- a/contributing.md +++ b/contributing.md @@ -29,9 +29,10 @@ If you change anything that requires a change to documentation then you will nee ### Compatibility -CodeIgniter is compatible with PHP 5.2.4 so all code supplied must stick to -this requirement. If PHP 5.3 or 5.4 functions or features are used then there -must be a fallback for PHP 5.2.4. +CodeIgniter recommends PHP 5.4 or newer to be used, but is is compatible with +PHP 5.2.4 so all code supplied must stick to this requirement. If PHP 5.3 +(and above) functions or features are used then there must be a fallback for +PHP 5.2.4. ### Branching @@ -91,4 +92,4 @@ If you are using command-line you can do the following: 2. `git pull codeigniter develop` 3. `git push origin develop` -Now your fork is up to date. This should be done regularly, or before you send a pull request at least. +Now your fork is up to date. This should be done regularly, or before you send a pull request at least. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 934d6d9797f4dadd4e4d05b12bc4d7309fedb6c3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Jan 2015 15:03:10 +0200 Subject: [ci skip] Make it clear that PHP <5.4 usage is discouraged Related: #3450 --- contributing.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 5296daa88..5a25698bf 100644 --- a/contributing.md +++ b/contributing.md @@ -29,10 +29,10 @@ If you change anything that requires a change to documentation then you will nee ### Compatibility -CodeIgniter recommends PHP 5.4 or newer to be used, but is is compatible with -PHP 5.2.4 so all code supplied must stick to this requirement. If PHP 5.3 -(and above) functions or features are used then there must be a fallback for -PHP 5.2.4. +CodeIgniter recommends PHP 5.4 or newer to be used, but it should be +compatible with PHP 5.2.4 so all code supplied must stick to this +requirement. If PHP 5.3 (and above) functions or features are used then +there must be a fallback for PHP 5.2.4. ### Branching -- cgit v1.2.3-24-g4f1b From bd202c91b0e9cf0a8c93bcaa71df9574f5909346 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:50:18 +0200 Subject: [ci skip] Update codeigniter.com links to https --- contributing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 5a25698bf..2037e0424 100644 --- a/contributing.md +++ b/contributing.md @@ -20,8 +20,8 @@ for us to maintain quality of the code-base. ### PHP Style -All code must meet the [Style Guide](http://codeigniter.com/user_guide/general/styleguide.html), which is -essentially the [Allman indent style](http://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. +All code must meet the [Style Guide](https://codeigniter.com/user_guide/general/styleguide.html), which is +essentially the [Allman indent style](https://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. ### Documentation -- cgit v1.2.3-24-g4f1b