XDEBUG EXTENSION FOR PHP | CONTRIBUTING

If you like Xdebug, please consider giving a
"donation".

Or Flattr this website:

Contributing

Xdebug is hosted in GIT. The source code can be browsed through github and can be checked out with:

git clone git://github.com/xdebug/xdebug.git

If you think you want to fix a bug or work on a new feature, then you need to follow the instructions below.

Initial Set-up

  1. Fork Xdebug on github.
  2. Clone the repository:
    git clone git@github.com:{your username}/xdebug.git
    for example:
    git clone git@github.com:jamesbond/xdebug.git
  3. Change into the xdebug repository:
    cd xdebug.
  4. Make sure to set your git name and email:
    git config --get user.name && git config --get user.email
    If they are not correct, set them to the correct value:
    git config user.name {your name} && git config user.email {your email}
    for example:
    git config user.name "Derick Rethans" && git config user.email "derick@xdebug.org"
  5. Add the original repository as remote (after removing the old one):
    git remote add upstream git://github.com/xdebug/xdebug.git && git fetch upstream
  6. Add a tracking branch for xdebug 2.2:
    git checkout --track origin/xdebug_2_2

Keeping up-to-date

  1. Change into the xdebug repository (if you haven't done yet):
    cd xdebug
  2. Run:
    git checkout master && git fetch upstream && git rebase upstream/master
  3. Run:
    git checkout xdebug_2_2 && git fetch upstream && git rebase upstream/xdebug_2_2

Working on a bug fix

The steps for this are the same as for working on new features except that you make a branch of xdebug_2_2 instead of master.

  1. First of all, make sure you're up-to-date.
  2. Checkout the xdebug_2_2 branch:
    git checkout xdebug_2_2.
  3. Create a feature branch:
    git checkout -b issue{issue number}
    for example:
    git checkout -b issue681
    If there is no bug report yet, then you need to create one. If you want, you can add a description of the feature after the issue681 part, for example: issue623-debug-static-properties.
  4. Work on the code, and add one or more tests in the tests directory, with as name tests/bug00{issue number}.phpt, for example: tests/bug00623.phpt.
  5. Commit it to your local repository: git commit ...
  6. Repeat the previous two steps as long as you want.
  7. Bring things up-to-date with the original repository, especially important if it took some time since you branched:
    git fetch upstream && git rebase upstream/xdebug_2_2
  8. Push your changes to your remote repository:
    git push origin {issue number}:{issue number}
    for example:
    git push origin issue681:issue681
  9. Once you're satisfied, generate a pull request, by navigating to your repository (https://github.com/{username}/xdebug), select the branch you just created (issue681), and then select the "Pull Request" button in the upper right. Select the user xdebug as the recipient.

    Alternatively you can nagivate to https://github.com/{username}/xdebug/pull/new/issue{issue number}.

Working on a new feature

The steps for this are the same as for fixing bugs except that you make a branch of master instead of xdebug_2_2.

  1. First of all, make sure you're up-to-date.
  2. Checkout the master branch:
    git checkout master.
  3. Create a feature branch:
    git checkout -b issue{issue number}
    for example:
    git checkout -b issue681
    If there is no bug report yet, then you need to create one. If you want, you can add a description of the feature after the issue681 part, for example: issue623-debug-static-properties.
  4. Work on the code, and add one or more tests in the tests directory, with as name tests/bug00{issue number}.phpt, for example: tests/bug00623.phpt.
  5. Commit it to your local repository: git commit ...
  6. Repeat the previous two steps as long as you want.
  7. Bring things up-to-date with the original repository, especially important if it took some time since you branched:
    git fetch xdebug && git rebase xdebug/master
  8. Push your changes to your remote repository:
    git push origin {issue number}:{issue number}
    for example:
    git push origin issue681:issue681
  9. Once you're satisfied, generate a pull request, by navigating to your repository (https://github.com/{username}/xdebug), select the branch you just created (issue681), and then select the "Pull Request" button in the upper right. Select the user xdebug as the recipient.

    Alternatively you can nagivate to https://github.com/{username}/xdebug/pull/new/issue{issue number}.

 
 
This site and all of its contents are Copyright © 2002-2014 by Derick Rethans.
All rights reserved.