Contributing
Getting Set Up
The easiest way to contribute to Phergie is through the GitHub interface. Simply fork the main repository, commit changes to your fork, and then submit a pull request to have them pulled into the main Phergie repository. GitHub Help has instructions on how to do this. If you have any questions or need assistance with this process, feel free to contact us.
Where to Start
You may already have an idea for a plugin you’d like to write. Awesome! We welcome fresh ideas for new plugins. If you want to contribute and aren’t sure how you can help. we have an issues list on GitHub that includes plenty of things you can work on.
- Reported bugs
- Plugins from the 1.x branch that need to be ported over to 2.x
- Plugins that need to be modified to integrate with other plugins
- New plugins that need to be written from the ground up
Pick any that interest you. If you run into any bugs that aren’t reported, feel free to create new issue reports for them. Also, as you learn more about Phergie, let us know how we can improve the user and developer documentation if you come across something that isn’t included or isn’t expressed clearly. We’re always looking to make it easier to run and develop plugins for Phergie.
Contributing a Plugin
If you plan to contribute your plugin to the Phergie project, there are a few things that we request you do prior to submitting a pull request. While not meeting these requests won’t necessarily prevent your plugin being accepted, they do help to expedite the process.
- Phergie code uses the PEAR coding standard. To test your code to ensure that it conforms to this standard, install the PHP_CodeSniffer PEAR package and issue the command
phpcs --standard=PEAR Phergie/Plugin/YourPlugin.phpwhereYourPlugin.phpis the name of your plugin class file. File and class docblocks can be taken from a core plugin file and updated so that @package and @link docblock tags use appropriate values. - If your plugin has any extension or plugin dependencies (which you should declare in its
onLoad()event handler), these need to be included in the class docblock. This is so the automated PEAR package build process can detect and include them as dependencies for the package. To do this, we use a custom formatted @uses docblock tag as shown in the examples below.
@uses Phergie_Plugin_RequiredPlugin pear.phergie.org
@uses extension NameOfRequiredExtension
@uses Phergie_Plugin_OptionalPlugin pear.phergie.org optional
@uses extension NameOfOptionalExtension optional
