Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame^] | 1 | ################### |
| 2 | What is CodeIgniter |
| 3 | ################### |
| 4 | |
| 5 | CodeIgniter is an Application Development Framework - a toolkit - for people |
| 6 | who build web sites using PHP. Its goal is to enable you to develop projects |
| 7 | much faster than you could if you were writing code from scratch, by providing |
| 8 | a rich set of libraries for commonly needed tasks, as well as a simple |
| 9 | interface and logical structure to access these libraries. CodeIgniter lets |
| 10 | you creatively focus on your project by minimizing the amount of code needed |
| 11 | for a given task. |
| 12 | |
| 13 | ******************* |
| 14 | Release Information |
| 15 | ******************* |
| 16 | |
| 17 | This repo contains in development code for future releases. To download the |
| 18 | latest stable release please visit the `CodeIgniter Downloads |
| 19 | <http://codeigniter.com/downloads/>`_ page. |
| 20 | |
| 21 | ************************** |
| 22 | Changelog and New Features |
| 23 | ************************** |
| 24 | |
| 25 | You can find a list of all changes for each release in the `user |
| 26 | guide change log <https://github.com/EllisLab/CodeIgniter/blob/develop/user_guide/changelog.html>`_. |
| 27 | |
| 28 | ******************* |
| 29 | Server Requirements |
| 30 | ******************* |
| 31 | |
| 32 | - PHP version 5.1.6 or newer. |
| 33 | |
| 34 | ************ |
| 35 | Installation |
| 36 | ************ |
| 37 | |
| 38 | Please see the `installation section <http://codeigniter.com/user_guide/installation/index.html>`_ |
| 39 | of the CodeIgniter User Guide. |
| 40 | |
| 41 | ************ |
| 42 | Contributing |
| 43 | ************ |
| 44 | |
| 45 | CodeIgniter is a community driven project and accepts contributions of code |
| 46 | and documentation from the community. These contributions are made in the form |
| 47 | of Issues or `Pull Requests <http://help.github.com/send-pull-requests/>`_ on |
| 48 | the `EllisLab CodeIgniter repository |
| 49 | <https://github.com/EllisLab/CodeIgniter>`_ on GitHub. |
| 50 | |
| 51 | Issues are a quick way to point out a bug. If you find a bug or documentation |
| 52 | error 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 | |
| 59 | Reporting issues is helpful but an even better approach is to send a Pull |
| 60 | Request, which is done by "Forking" the main repository and committing to your |
| 61 | own copy. This will require you to use the version control system called Git. |
| 62 | |
| 63 | ********** |
| 64 | Guidelines |
| 65 | ********** |
| 66 | |
| 67 | Before we look into how, here are the guidelines. If your Pull Requests fail |
| 68 | to pass these guidelines it will be declined and you will need to re-submit |
| 69 | when you’ve made the changes. This might sound a bit tough, but it is required |
| 70 | for us to maintain quality of the code-base. |
| 71 | |
| 72 | PHP Style |
| 73 | ========= |
| 74 | |
| 75 | All code must meet the `Style Guide |
| 76 | <http://codeigniter.com/user_guide/general/styleguide.html>`_, which is |
| 77 | essentially the `Allman indent style |
| 78 | <http://en.wikipedia.org/wiki/Indent_style#Allman_style>`_, underscores and |
| 79 | readable operators. This makes certain that all code is the same format as the |
| 80 | existing code and means it will be as readable as possible. |
| 81 | |
| 82 | Documentation |
| 83 | ============= |
| 84 | |
| 85 | If you change anything that requires a change to documentation then you will |
| 86 | need to add it. New classes, methods, parameters, changing default values, etc |
| 87 | are all things that will require a change to documentation. The change-log |
| 88 | must also be updated for every change. Also PHPDoc blocks must be maintained. |
| 89 | |
| 90 | Compatibility |
| 91 | ============= |
| 92 | |
| 93 | CodeIgniter is compatible with PHP 5.1.6 so all code supplied must stick to |
| 94 | this requirement. If PHP 5.2 or 5.3 functions or features are used then there |
| 95 | must be a fallback for PHP 5.1.6. |
| 96 | |
| 97 | Branching |
| 98 | ========= |
| 99 | |
| 100 | CodeIgniter uses the `Git-Flow |
| 101 | <http://nvie.com/posts/a-successful-git-branching-model/>`_ branching model |
| 102 | which requires all pull requests to be sent to the "develop" branch. This is |
| 103 | where the next planned version will be developed. The "master" branch will |
| 104 | always contain the latest stable version and is kept clean so a "hotfix" (e.g: |
| 105 | an emergency security patch) can be applied to master to create a new version, |
| 106 | without worrying about other features holding it up. For this reason all |
| 107 | commits need to be made to "develop" and any sent to "master" will be closed |
| 108 | automatically. If you have multiple changes to submit, please place all |
| 109 | changes into their own branch on your fork. |
| 110 | |
| 111 | One thing at a time: A pull request should only contain one change. That does |
| 112 | not mean only one commit, but one change - however many commits it took. The |
| 113 | reason for this is that if you change X and Y but send a pull request for both |
| 114 | at the same time, we might really want X but disagree with Y, meaning we |
| 115 | cannot merge the request. Using the Git-Flow branching model you can create |
| 116 | new branches for both of these features and send two requests. |
| 117 | |
| 118 | ************ |
| 119 | How-to Guide |
| 120 | ************ |
| 121 | |
| 122 | There are two ways to make changes, the easy way and the hard way. Either way |
| 123 | you will need to `create a GitHub account <https://github.com/signup/free>`_. |
| 124 | |
| 125 | Easy way GitHub allows in-line editing of files for making simple typo changes |
| 126 | and quick-fixes. This is not the best way as you are unable to test the code |
| 127 | works. If you do this you could be introducing syntax errors, etc, but for a |
| 128 | Git-phobic user this is good for a quick-fix. |
| 129 | |
| 130 | Hard way The best way to contribute is to "clone" your fork of CodeIgniter to |
| 131 | your development area. That sounds like some jargon, but "forking" on GitHub |
| 132 | means "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 | |
| 147 | The Reactor Engineers will now be alerted about the change and at least one of |
| 148 | the team will respond. If your change fails to meet the guidelines it will be |
| 149 | bounced, or feedback will be provided to help you improve it. |
| 150 | |
| 151 | Once the Reactor Engineer handling your pull request is happy with it they |
| 152 | will post it to the internal EllisLab discussion area to be double checked by |
| 153 | the other Engineers and EllisLab developers. If nobody has a problem with the |
| 154 | change then it will be merged into develop and will be part of the next |
| 155 | release. Keeping your fork up-to-date |
| 156 | |
| 157 | Unlike systems like Subversion, Git can have multiple remotes. A remote is the |
| 158 | name for a URL of a Git repository. By default your fork will have a remote |
| 159 | named "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 |
| 161 | is a read-only remote but you can pull from this develop branch to update your |
| 162 | own. |
| 163 | |
| 164 | If 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 | |
| 170 | Now your fork is up to date. This should be done regularly, or before you send |
| 171 | a pull request at least. |
| 172 | |
| 173 | ******* |
| 174 | License |
| 175 | ******* |
| 176 | |
| 177 | Please see the `license |
| 178 | agreement <http://codeigniter.com/user_guide/license.html>`_ |
| 179 | |
| 180 | ********* |
| 181 | Resources |
| 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 | *************** |
| 192 | Acknowledgement |
| 193 | *************** |
| 194 | |
| 195 | The EllisLab team and The Reactor Engineers would like to thank all the |
| 196 | contributors to the CodeIgniter project and you, the CodeIgniter user. |