Developer Workflow
This section is a work in progress. Some sections may be incomplete or missing. Feedback is appreciated.
This guide will walk you through setting up your development environment and submitting your first pull request.
Prepare Code
- Create your own fork (opens in a new tab) from FOSSBilling (opens in a new tab).
- Clone your own fork instead of the FOSSBilling repo.
- Setup your upstream (opens in a new tab) to help keep your fork in sync. Alternatively, use the web UI.
Environments
There are multiple ways to set up your environment. Choose the one that works best for you.
Proceed to the next section once your environment is configured.
Modifying Code
- Create a new branch under your fork. Name it something brief and relevant to what you are working on.
- Commit your changes into the new branch.
- If your commit is related to an existing issue, tag the issue ID in your commit message. For example:
#1234 add verify checkbox
. This will make your commit show within the issue history. - Keep each set of changes isolated into their own branches. Avoid creating branches that have mixed changes across various modules. Each branch should solve a specific problem or task.
- Run PHPUnit tests to validate existing logic, and create new tests for any new logic.
- When your changes are finished, you are ready to submit a pull request.
Submitting a Pull Request
- Submit a pull request (opens in a new tab) from your forked branch targeting
main
on the FOSSBilling repo. - Clearly document what your pull request is for and any new features it introduces or changes. Tag any open issues the pull request relates to. For example:
Closes #1234
. - Submit your request.
- Verify that the automated tests complete successfully. The status will be shown in the pull request. The tests will take a moment to execute and finish.
- Monitor for and respond to any feedback on your request.
- If all tests pass and at least one maintainer leaves approval, your pull request will be accepted and your update will be merged into the main FOSSBilling branch.
- Sync your fork with the FOSSBilling upstream to now find your new code in your fork's
main
branch.