So, you've been using C5, and you've found a bug. Unfortunately, it happens. To any and all developers using C5: if you find bugs or strange behavior, we'd love to have your contributions and fixes. All we ask is that you contribute these changes to us using the guidelines below.

First, check out the bug tracker

You may want to check out the bug tracker. It's possible we know about the issue and are fixing it, or have already fixed it. We don't want to waste anyone's time so it might be best to check there first.

If, however, you don't see the issue, you can either start working on it right away, or you can file a bug report in our bug tracker. It may be in your best interest to first file a bug report, since we may be addressing the issue already. However, if you do so, and you're interested in helping, please make a note in the bug report. It is likely that if you do have the interest in fixing the problem, we will ask that you submit a patch to us, if we need it fixed, since we're appreciative of the help.

For those issues that require fixes

So, at this point, an issue has been isolated, and you want to fix it. There are a couple of ways to do this:

Preferred Method: Work with concrete5 on github.com

concrete5's now hosted on github.com, which makes it very easy for people to clone our repository, make changes, and submit them back to us as what github calls a "Pull Request." Learn more about pull requests.. First, become a user on github.com. It's free.

concrete5 Github Repository URL

http://github.com/concrete5/concrete5/

Just fork the repository, check it out, make your changes and send them to us.

git clone git://github.com/concrete5/concrete5.git ./concrete5

Not a github.com user? Send us a patch file

First, duplicate your existing code, before you start working on it. You'll want to do this so that you have something to compare your work with, when you're done.

Let's say I have concrete5 installed at /concrete5.1.0/ in my web directory, and I want to start working from there. I would duplicate that directory.

cp -R concrete5.1.0 concrete5.1.0.pre_patch

Then, I'd start working on the code in concrete5.1.0.

When you've got the issue fixed in concrete5.1.0, you're ready to submit those changes back to us. In what format? A .patch file.

For those unfamiliar with .patch files, these are simple files created by the "diff" command, by comparing files together and saving how they differ. You can compare two or more files for differences, save those differences in a .patch file, and the upload the .patch file to this site.

To create a patch file, you'll want to run the following command on the directories you created earlier.

diff -Naur concrete5.1.0.pre_patch/concrete/ 
concrete5.1.0/concrete/ > 
descriptive_name_of_my_patch.patch

At this point you should have a file that contains all the changes you've made to your code base.

Where to submit your patch

So, you've followed the instructions about and are going to submit a patch. We ask that you submit it directly to the issue in the bug tracker section of the site. There will probably be a bug already listed for the issue. If there isn't and you're the first two find it, please attach your patch to the issue as you submit it. If you are patching an existing bug, just make a reply to that bug and attach your patch. If you include the word "PATCH" in your subject we'll probably be able to review it faster. We will review it ASAP, and if it fits the bill, we will move it over to the patches section of the site, and include it in the core code base, with attribution to you, of course.

Note about .patch files

At this point, we're far more likely to quickly merge changes that come to us via github.com than via patch files. Github makes it easy to compare the contents of changes. We'd encourage you to check it out.

Code Licensing and Guidelines

Please be advised that all code we'll include has to be licensed under the MIT License. We are more likely to include code changes if you properly document your code using phpdocumentor standards, and adhere to our coding style guidelines.

These guidelines are subject to change but for the meantime they should help us out a lot. We really want to take submissions from people, and while we won't take all of them, this should hopefully ensure that everyone is on the same page, and understands how best to get code to us.

Thanks, concrete5 community!

Andrew