Skip to end of metadata
Go to start of metadata

<h1>Submitting a Bug Fix</h1>

<p>First, ensure you have the latest development version of the framework by <ac:link><ri:page ri:content-title="Subversion Standards" /><ac:link-body>checking out a copy from Subversion</ac:link-body></ac:link>.</p>

<p>The easiest way to create a patch containing changes to multiple files, including new ones, is to add new files to your working copy. Then create the patch file using Subversion.</p>

<ac:macro ac:name="warning"><ac:rich-text-body><p>If you have commit permissions, be sure not to commit your fix back to the Subversion repository inadvertently. Only the component lead should commit changes to his or her component.</p></ac:rich-text-body></ac:macro>

<p>From the "trunk/" directory run the following command:</p>

<ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[svn diff <dirname> | tail -n +3 > <dirname>.diff]]></ac:plain-text-body></ac:macro>

<p>Then remove the changes:</p>

<ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[svn revert -R <dirname>]]></ac:plain-text-body></ac:macro>

<p>And patch from "trunk/":</p>

<ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[patch -p0 < <dirname>.diff]]></ac:plain-text-body></ac:macro>

<p>Finally, submit your patch (this means: attach the file containing your patch to the issue in the issuetracker). Thanks for helping us improve Zend Framework!</p>

<h2>Patching a Release Version</h2>

<p>Bug fix patches that will be submitted for community review should be made using the latest development version of the framework. However, some individual situations might require patches for a release version, such as when your customers are using an application you've developed based on Zend Framework.</p>

<p>To create a patch, first change your current directory to one directory above the library directory.</p>

<ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[cd /path/to/Zend_Framework/library/..]]></ac:plain-text-body></ac:macro>

<p>Now make a new copy of the original release version into the directory "library.original", and execute the following command:</p>

<ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[diff --exclude='*.original' --exclude='*~' --exclude='*.rej' --ignore-space-change -ruN library.original/ library/ > ZF-ver-x.x-my-changes.patch]]></ac:plain-text-body></ac:macro>

Labels:
patch patch Delete
svn svn Delete
bug bug Delete
fix fix Delete
subversion subversion Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 17, 2008

    <p>Can you please add to this what to do AFTER you have your patchfile? </p>

    <p>It says "Finally, submit your patch", but where? How? </p>

    <p>Thanks!</p>

  2. Sep 29, 2008

    <p>Could you also put a short description here how to do this with Zend Studion for Eclipse?<br />
    Thanks!</p>

  3. Nov 07, 2008

    <p>"Finally, submit your patch":</p>
    <ul class="alternate">
    <li>Login to the issue tracker</li>
    <li>Find the issue the patch is for</li>
    <li>Attach the patch (= upload the file containing the patch)</li>
    </ul>

  4. Oct 24, 2009

    <p>Can you please add commands or programs I can use on windows for submitting a bug?</p>

    1. Jul 14, 2011

      <p>Maybe cygwin can help you if you're a command-line guy or Tortoise SVN has options to create patches with a few clicks.</p>