blob: a3ecb39f5a94522c2ddfaed8c06436990fb44e24 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at Feb 18, 2012 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Contributing Patches - Apache log4php</title>
<link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="./css/site.css" type="text/css" />
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/prettify.min.js"></script>
<script type="text/javascript" src="./js/site.js"></script>
<meta name="Date-Revision-yyyymmdd" content="20120218" />
<meta http-equiv="Content-Language" content="en" />
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26177991-1']);
_gaq.push (['_gat._anonymizeIp']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="composite">
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="#">Apache log4php &trade;</a>
<ul class="nav">
<li>
<a href="index.html" title="About">About</a>
</li>
<li>
<a href="download.html" title="Download">Download</a>
</li>
<li>
<a href="install.html" title="Install">Install</a>
</li>
<li>
<a href="quickstart.html" title="Quick start">Quick start</a>
</li>
</ul>
<!-- Twitter link -->
<ul class="nav pull-right">
<li><a href="http://twitter.com/log4php/" class="externalLink">Follow <strong>@log4php</strong></a></li>
</ul>
<!-- Google CSE Search Box -->
<form class="navbar-search pull-right" id="cref" action="http://www.google.com/cse">
<input type="hidden" name="cref" value="http://logging.apache.org/log4php/cse.xml" />
<input class="search-query pull-left" type="text" name="q" size="40" placeholder="Search" />
</form>
</div>
</div>
</div>
<div class="container-fluid">
<table class="layout-table">
<tr>
<td class="sidebar">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header"><i class="icon-home"></i>Apache log4php™</li>
<li class="none">
<a href="index.html" title="About">About</a>
</li>
<li class="none">
<a href="download.html" title="Download">Download</a>
</li>
<li class="none">
<a href="install.html" title="Install">Install</a>
</li>
<li class="none">
<a href="changelog.html" title="Changelog">Changelog</a>
</li>
</ul>
<ul class="nav nav-list">
<li class="nav-header"><i class="icon-book"></i>Documentation</li>
<li class="none">
<a href="quickstart.html" title="Quick start">Quick start</a>
</li>
<li class="none">
<a href="docs/introduction.html" title="Introduction">Introduction</a>
</li>
<li class="none">
<a href="docs/configuration.html" title="Configuration">Configuration</a>
</li>
<li class="none">
<a href="docs/loggers.html" title="Loggers">Loggers</a>
</li>
<li class="collapsed">
<a href="docs/appenders.html" title="Appenders">Appenders</a>
</li>
<li class="collapsed">
<a href="docs/layouts.html" title="Layouts">Layouts</a>
</li>
<li class="none">
<a href="docs/filters.html" title="Filters">Filters</a>
</li>
<li class="none">
<a href="docs/renderers.html" title="Renderers">Renderers</a>
</li>
<li class="none">
<a href="apidocs/index.html" title="API documentation">API documentation</a>
</li>
</ul>
<ul class="nav nav-list">
<li class="nav-header"><i class="icon-user"></i>Community</li>
<li class="none">
<a href="volunteering.html" title="Volunteering">Volunteering</a>
</li>
<li class="none active">
<a href="contributingpatches.html" title="Contributing Patches">Contributing Patches</a>
</li>
<li class="none">
<a href="http://wiki.apache.org/logging-log4php" class="externalLink" target="_blank" title="Wiki">Wiki</a>
</li>
<li class="none">
<a href="http://blogs.apache.org/logging/" class="externalLink" target="_blank" title="Blog">Blog</a>
</li>
</ul>
<ul class="nav nav-list">
<li class="nav-header"><i class="icon-info-sign"></i>Project Information</li>
<li class="none">
<a href="integration.html" title="Continuous Integration">Continuous Integration</a>
</li>
<li class="none">
<a href="source-repository.html" title="Source Repository">Source Repository</a>
</li>
<li class="none">
<a href="dependencies.html" title="Dependencies">Dependencies</a>
</li>
<li class="none">
<a href="license.html" title="Project License">Project License</a>
</li>
<li class="none">
<a href="team-list.html" title="Project Team">Project Team</a>
</li>
<li class="none">
<a href="issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
</li>
<li class="none">
<a href="mail-lists.html" title="Mailing Lists">Mailing Lists</a>
</li>
</ul>
<ul class="nav nav-list">
<li class="nav-header"><i class="icon-cog"></i>Project Reports</li>
<li class="none">
<a href="changes-report.html" title="Changes Report">Changes Report</a>
</li>
<li class="none">
<a href="surefire-report.html" title="Surefire Report">Surefire Report</a>
</li>
<li class="none">
<a href="rat-report.html" title="RAT Report">RAT Report</a>
</li>
<li class="none">
<a href="coverage-report/index.html" title="Code Coverage">Code Coverage</a>
</li>
</ul>
<ul class="nav nav-list">
<li class="nav-header"><i class="icon-heart"></i>Apache</li>
<li class="none">
<a href="http://www.apache.org" class="externalLink" target="_blank" title="Home">Home</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" target="_blank" title="Sponsorship">Sponsorship</a>
</li>
<li class="none">
<a href="http://www.apache.org/licenses/" class="externalLink" target="_blank" title="License">License</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" target="_blank" title="Thanks">Thanks</a>
</li>
<li class="none">
<a href="http://www.apachecon.com" class="externalLink" target="_blank" title="Conferences">Conferences</a>
</li>
<li class="none">
<a href="http://www.apache.org/security/" class="externalLink" target="_blank" title="Security">Security</a>
</li>
</ul>
</div>
<div id="poweredBy">
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</div>
</td>
<td class="content">
<!-- Licensed to the Apache Software Foundation (ASF) under one or more --><!-- contributor license agreements. See the NOTICE file distributed with --><!-- this work for additional information regarding copyright ownership. --><!-- The ASF licenses this file to You under the Apache License, Version 2.0 --><!-- (the "License"); you may not use this file except in compliance with --><!-- the License. You may obtain a copy of the License at --><!-- --><!-- http://www.apache.org/licenses/LICENSE-2.0 --><!-- --><!-- Unless required by applicable law or agreed to in writing, software --><!-- distributed under the License is distributed on an "AS IS" BASIS, --><!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --><!-- See the License for the specific language governing permissions and --><!-- limitations under the License. --><div class="section"><h2>Contributing patches<a name="Contributing_patches"></a></h2><p>Before you read this document, make sure you have read the general information on the <a href="./volunteering.html">Volunteering</a> page. Credits to the Apache Commons project on which documents this one is based on.</p><p>For guidelines on how to set up a development environment for Apache log4php, there is a <a class="externalLink" href="http://wiki.apache.org/logging-log4php/SettingUpALinuxEnvironment"> detailed guide</a> on the wiki pages.</p><div class="section"><h3>Respect the original style<a name="Respect_the_original_style"></a></h3><p>Please respect the style of the orginal file. Make sure that your additions fit in with that style. The framework has coding conventions and every contribution is supposed to adhere to them. You might find it a little difficult to discover the conventions used by a particular class but if you stick to the style of the original then that'll be fine. If in doubt, ask on the developers mailinglist.</p><p>If a patch is submitted which doesn't satisfy the component's coding conventions, then either a committer will need to rewrite the submission or it will be rejected. Getting it right in this first place will save you having to rewrite it.</p><p>Most important codestyles:</p><ul><li>don't use vertical alignement</li><li>keep brackets on the same line as the method signature</li><li>keep brackets on the same line as control statements</li><li>always use brackets for control statements</li><li>use lowerCamelCase for naming methods and variables</li><li>don't use underscores (_)</li></ul></div><div class="section"><h3>Tabs not spaces<a name="Tabs_not_spaces"></a></h3><p>PLEASE NO SPACES!</p><p>Some IDEs include automatic source (re)formatting. If you use an IDE, please check that this feature is either disabled or set to use tabs.</p><p>If a patch is submitted which uses tabs rather than spaces, then either a committer will have to reformat it before it's applied or the patch will be rejected. Again, it's easier to get it right in the first place rather than have to reformat and resubmit your patch.</p></div><div class="section"><h3>Test cases<a name="Test_cases"></a></h3><p>Classes needs to be tested with <a class="externalLink" href="https://github.com/sebastianbergmann/phpunit/">PHPUnit</a>. If you are not familiar with the principles of regression testing, then the <a class="externalLink" href="http://www.phpunit.de/manual/3.6/en/">PHPUnit manual</a> is a good place to start.</p><p>Before you submit your patch, please do a clean build of the full distribution and run the unit tests (this can be done with <tt>maven test</tt>. This ensures that your patch doesn't break any existing functionality.</p><p>We strongly recommend that you create and submit test cases together with the rest of your contribution. Test cases ensure that bugs stay fixed and features don't get broken. Test cases will probably be needed anyway so submitting them saves time.</p></div><div class="section"><h3>Creating a patch<a name="Creating_a_patch"></a></h3><p>The Apache log4php <a href="./source-repository.html">source code repository</a> holds the current source.</p><p>Please create your patch against the latest revision of the files in the source code repository since this makes the job of applying the patch much easier. If you don't have a version checked out, then check one out. If you have, then please do a fresh update before you make your changes.</p><p>The patch should be in unified format. You can create a patch in this format by using:</p><div class="source"><pre> svn diff File &gt;&gt; patchfile</pre></div><p>Eclipse has some diff features too. Please make sure you have your project as a patch root. Try to give your patch files meaningful names. This makes it easier for developers who need to apply a number of different patches.</p></div><div class="section"><h3>Submitting a patch<a name="Submitting_a_patch"></a></h3><p>The preffered way of submitting a patch is by attaching it to a bug report in the project's <a class="externalLink" href="http://logging.apache.org/log4php/issue-tracking.html"> issue tracker</a>. Create a new bug report if necessary.</p><p>Please make sure to mark &quot;Grant license to ASF for inclusion in ASF works&quot; when attaching the patch. This means you agree with providing us with the code contained in the patch under the <a class="externalLink" href="http://www.apache.org/licenses/LICENSE-2.0">Apache licence</a>. </p></div></div>
</td>
</tr>
</table>
</div>
<div class="footer">
<p>Copyright &#169; 2012
<a href="http://www.apache.org">Apache Software Foundation</a>.
All Rights Reserved.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.
Please read the <a href="./privacy.html">Privacy policy</a></p>
<p>Apache log4php, Apache, log4php, the Apache feather logo, the Apache Logging Services project logo and the Built by
Maven logo are trademarks of The Apache Software Foundation.</p>
</div>
</body>
</html>