blob: eff6b00b4e3a7c54e43d6c60c2f81e1922787b17 [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
26guide change log <https://github.com/EllisLab/CodeIgniter/blob/develop/user_guide/changelog.html>`_.
27
28*******************
29Server Requirements
30*******************
31
32- PHP version 5.1.6 or newer.
33
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
93CodeIgniter is compatible with PHP 5.1.6 so all code supplied must stick to
94this requirement. If PHP 5.2 or 5.3 functions or features are used then there
95must be a fallback for PHP 5.1.6.
96
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
118************
119How-to Guide
120************
121
122There are two ways to make changes, the easy way and the hard way. Either way
123you will need to `create a GitHub account <https://github.com/signup/free>`_.
124
125Easy way GitHub allows in-line editing of files for making simple typo changes
126and quick-fixes. This is not the best way as you are unable to test the code
127works. If you do this you could be introducing syntax errors, etc, but for a
128Git-phobic user this is good for a quick-fix.
129
130Hard way The best way to contribute is to "clone" your fork of CodeIgniter to
131your development area. That sounds like some jargon, but "forking" on GitHub
132means "making a copy of that repo to your account" and "cloning" means
133"copying that code to your environment so you can work on it".
134
135# Set up Git (Windows, Mac & Linux)
136# Go to the CodeIgniter repo
137# Fork it
138# Clone your CodeIgniter repo: git@github.com:<your-name>/CodeIgniter.git
139# Checkout the "develop" branch At this point you are ready to start making
140 changes.
141# Fix existing bugs on the Issue tracker after taking a look to see nobody
142 else is working on them.
143# Commit the files
144# Push your develop branch to your fork
145# Send a pull request http://help.github.com/send-pull-requests/
146
147The Reactor Engineers will now be alerted about the change and at least one of
148the team will respond. If your change fails to meet the guidelines it will be
149bounced, or feedback will be provided to help you improve it.
150
151Once the Reactor Engineer handling your pull request is happy with it they
152will post it to the internal EllisLab discussion area to be double checked by
153the other Engineers and EllisLab developers. If nobody has a problem with the
154change then it will be merged into develop and will be part of the next
155release. Keeping your fork up-to-date
156
157Unlike systems like Subversion, Git can have multiple remotes. A remote is the
158name for a URL of a Git repository. By default your fork will have a remote
159named "origin" which points to your fork, but you can add another remote named
160"codeigniter" which points to git://github.com/EllisLab/CodeIgniter.git. This
161is a read-only remote but you can pull from this develop branch to update your
162own.
163
164If you are using command-line you can do the following:
165
166# git remote add codeigniter git://github.com/EllisLab/CodeIgniter.git
167# git pull codeigniter develop
168# git push origin develop
169
170Now your fork is up to date. This should be done regularly, or before you send
171a pull request at least.
172
173*******
174License
175*******
176
177Please see the `license
178agreement <http://codeigniter.com/user_guide/license.html>`_
179
180*********
181Resources
182*********
183
184- `User Guide <http://codeigniter.com/user_guide/>`_
185- `Community Forums <http://codeigniter.com/forums/>`_
186- `User
187 Voice <http://codeigniter.uservoice.com/forums/40508-codeigniter-reactor>`_
188- `Community Wiki <http://codeigniter.com/wiki/>`_
189- `Community IRC <http://codeigniter.com/irc/>`_
190
191***************
192Acknowledgement
193***************
194
195The EllisLab team and The Reactor Engineers would like to thank all the
196contributors to the CodeIgniter project and you, the CodeIgniter user.