Adding a new feature

New features

Adding a new feature to GreenLight is always welcome when the feature itself is considered to be useful for other projects as well. While developing something new, it is recommended to keep the following in mind:

  • GreenLight is maintained using semver, make sure you add features based on the principles it introduces
  • Follow the Git workflow applied by Greenroom while working on the Devkit
  • New features should be approved and released by a GreenLight author to make sure we have a consistent release plan and codebase

Development setup

Since DevKit is a wrapper Laravel instance to make sure you can test functionality, most of your code changes are going to be applied to the GreenLight repository and not the DevKit one. It is highly recommended to use an IDE that can handle opening subprojects in the same view, like PHPStorm and its "Attach Project" method. This way it is easy to maintain two Git repositories at the same time while still having the advantages of auto-complete and other various helper functions that you would need while developing.

Workflow

Adding new functionality to GreenLight should be similar to this:

  1. Code a new feature in GreenLight (feature branch)
  2. Make sure it is tested and works properly in the Devkit environment
  3. Commit and push to GreenLight (feature branch)
  4. Get approved by a GreenLight author (could include a code review if necessary)
  5. Merge the PR to master in the GreenLight repository (could be done by a code reviewer)
  6. Create a release in GreenLight (including docs)
  7. Remove the feature branch in GreenLight