blob: b211ad7cdb259ecefc68d6c26ac6f3be537be85d [file] [log] [blame]
Derek Jonesf4a4bd82011-10-20 12:18:42 -05001###################
2What is CodeIgniter
3###################
4
5CodeIgniter is an Application Development Framework - a toolkit - for people
6who build web sites using PHP. Its goal is to enable you to develop projects
7much faster than you could if you were writing code from scratch, by providing
8a rich set of libraries for commonly needed tasks, as well as a simple
9interface and logical structure to access these libraries. CodeIgniter lets
10you creatively focus on your project by minimizing the amount of code needed
11for a given task.
12
13*******************
14Release Information
15*******************
16
17This repo contains in development code for future releases. To download the
18latest stable release please visit the `CodeIgniter Downloads
19<http://codeigniter.com/downloads/>`_ page.
20
21**************************
22Changelog and New Features
23**************************
24
25You can find a list of all changes for each release in the `user
Andrey Andreev1d477602012-02-09 23:17:26 +020026guide change log <https://github.com/EllisLab/CodeIgniter/blob/develop/user_guide_src/source/changelog.rst>`_.
Derek Jonesf4a4bd82011-10-20 12:18:42 -050027
28*******************
29Server Requirements
30*******************
31
Phil Sturgeon07c1ac82012-03-09 17:03:37 +000032- PHP version 5.2.4 or newer.
Derek Jonesf4a4bd82011-10-20 12:18:42 -050033
34************
35Installation
36************
37
38Please see the `installation section <http://codeigniter.com/user_guide/installation/index.html>`_
39of the CodeIgniter User Guide.
40
41************
42Contributing
43************
44
45CodeIgniter is a community driven project and accepts contributions of code
46and documentation from the community. These contributions are made in the form
47of Issues or `Pull Requests <http://help.github.com/send-pull-requests/>`_ on
48the `EllisLab CodeIgniter repository
49<https://github.com/EllisLab/CodeIgniter>`_ on GitHub.
50
51Issues are a quick way to point out a bug. If you find a bug or documentation
52error in CodeIgniter then please check a few things first:
53
54- There is not already an open Issue
55- The issue has already been fixed (check the develop branch, or look for
56 closed Issues)
57- Is it something really obvious that you fix it yourself?
58
59Reporting issues is helpful but an even better approach is to send a Pull
60Request, which is done by "Forking" the main repository and committing to your
61own copy. This will require you to use the version control system called Git.
62
63**********
64Guidelines
65**********
66
67Before we look into how, here are the guidelines. If your Pull Requests fail
68to pass these guidelines it will be declined and you will need to re-submit
69when youve made the changes. This might sound a bit tough, but it is required
70for us to maintain quality of the code-base.
71
72PHP Style
73=========
74
75All code must meet the `Style Guide
76<http://codeigniter.com/user_guide/general/styleguide.html>`_, which is
77essentially the `Allman indent style
78<http://en.wikipedia.org/wiki/Indent_style#Allman_style>`_, underscores and
79readable operators. This makes certain that all code is the same format as the
80existing code and means it will be as readable as possible.
81
82Documentation
83=============
84
85If you change anything that requires a change to documentation then you will
86need to add it. New classes, methods, parameters, changing default values, etc
87are all things that will require a change to documentation. The change-log
88must also be updated for every change. Also PHPDoc blocks must be maintained.
89
90Compatibility
91=============
92
Phil Sturgeon07c1ac82012-03-09 17:03:37 +000093CodeIgniter is compatible with PHP 5.2.4 so all code supplied must stick to
94this requirement. If PHP 5.3 or 5.4 functions or features are used then there
95must be a fallback for PHP 5.2.4.
Derek Jonesf4a4bd82011-10-20 12:18:42 -050096
97Branching
98=========
99
100CodeIgniter uses the `Git-Flow
101<http://nvie.com/posts/a-successful-git-branching-model/>`_ branching model
102which requires all pull requests to be sent to the "develop" branch. This is
103where the next planned version will be developed. The "master" branch will
104always contain the latest stable version and is kept clean so a "hotfix" (e.g:
105an emergency security patch) can be applied to master to create a new version,
106without worrying about other features holding it up. For this reason all
107commits need to be made to "develop" and any sent to "master" will be closed
108automatically. If you have multiple changes to submit, please place all
109changes into their own branch on your fork.
110
111One thing at a time: A pull request should only contain one change. That does
112not mean only one commit, but one change - however many commits it took. The
113reason for this is that if you change X and Y but send a pull request for both
114at the same time, we might really want X but disagree with Y, meaning we
115cannot merge the request. Using the Git-Flow branching model you can create
116new branches for both of these features and send two requests.
117
Derek Jonesf3ab2572012-07-02 11:12:44 -0700118Signing
119=======
120You must sign your work, certifying that you either wrote the work or
121otherwise have the right to pass it on to an open source project. git makes
122this trivial as you merely have to use `--signoff` on your commits to your
123CodeIgniter fork.
124
125::
126
127 git commit --signoff
128
129or simply::
130
131 git commit -s
132
133This will sign your commits with the information setup in your git config, e.g.
134
135 Signed-off-by: John Q Public <john.public@example.com>
136
137If you are using Tower there is a "Sign-Off" checkbox in the commit window. You
138could even alias git commit to use the -s flag so you dont have to think about
139it.
140
141By signing your work in this manner, you certify to a "Developer's Certificate
142or Origin". The current version of this certificate is in the `DCO.txt` file
143in the root of this repository.
144
145
Derek Jonesf4a4bd82011-10-20 12:18:42 -0500146************
147How-to Guide
148************
149
150There are two ways to make changes, the easy way and the hard way. Either way
151you will need to `create a GitHub account <https://github.com/signup/free>`_.
152
153Easy way GitHub allows in-line editing of files for making simple typo changes
154and quick-fixes. This is not the best way as you are unable to test the code
155works. If you do this you could be introducing syntax errors, etc, but for a
156Git-phobic user this is good for a quick-fix.
157
158Hard way The best way to contribute is to "clone" your fork of CodeIgniter to
159your development area. That sounds like some jargon, but "forking" on GitHub
160means "making a copy of that repo to your account" and "cloning" means
161"copying that code to your environment so you can work on it".
162
Ilias Van Peer3e6286c2011-11-14 21:17:20 +0100163#. Set up Git (Windows, Mac & Linux)
164#. Go to the CodeIgniter repo
165#. Fork it
166#. Clone your CodeIgniter repo: git@github.com:<your-name>/CodeIgniter.git
167#. Checkout the "develop" branch At this point you are ready to start making
168 changes.
169#. Fix existing bugs on the Issue tracker after taking a look to see nobody
170 else is working on them.
171#. Commit the files
172#. Push your develop branch to your fork
173#. Send a pull request http://help.github.com/send-pull-requests/
Derek Jonesf4a4bd82011-10-20 12:18:42 -0500174
175The Reactor Engineers will now be alerted about the change and at least one of
176the team will respond. If your change fails to meet the guidelines it will be
177bounced, or feedback will be provided to help you improve it.
178
179Once the Reactor Engineer handling your pull request is happy with it they
180will post it to the internal EllisLab discussion area to be double checked by
181the other Engineers and EllisLab developers. If nobody has a problem with the
182change then it will be merged into develop and will be part of the next
183release. Keeping your fork up-to-date
184
185Unlike systems like Subversion, Git can have multiple remotes. A remote is the
186name for a URL of a Git repository. By default your fork will have a remote
187named "origin" which points to your fork, but you can add another remote named
188"codeigniter" which points to git://github.com/EllisLab/CodeIgniter.git. This
189is a read-only remote but you can pull from this develop branch to update your
190own.
191
192If you are using command-line you can do the following:
193
Ilias Van Peer3e6286c2011-11-14 21:17:20 +0100194#. git remote add codeigniter git://github.com/EllisLab/CodeIgniter.git
195#. git pull codeigniter develop
196#. git push origin develop
Derek Jonesf4a4bd82011-10-20 12:18:42 -0500197
198Now your fork is up to date. This should be done regularly, or before you send
199a pull request at least.
200
201*******
202License
203*******
204
205Please see the `license
206agreement <http://codeigniter.com/user_guide/license.html>`_
207
208*********
209Resources
210*********
211
212- `User Guide <http://codeigniter.com/user_guide/>`_
213- `Community Forums <http://codeigniter.com/forums/>`_
Derek Jonesf4a4bd82011-10-20 12:18:42 -0500214- `Community Wiki <http://codeigniter.com/wiki/>`_
215- `Community IRC <http://codeigniter.com/irc/>`_
216
217***************
218Acknowledgement
219***************
220
221The EllisLab team and The Reactor Engineers would like to thank all the
Andrey Andreev1d477602012-02-09 23:17:26 +0200222contributors to the CodeIgniter project and you, the CodeIgniter user.