Contributing to AsgardCMS is fairly straitforward. The easiest way is listed below.
Please note AsgardCMS follows PSR-1 and PSR-2. Please make sure your code follows those standards.
You can use a great tool : PHP-CS-Fixer to make sure everything is following the correct coding style.
Every module has a .php_cs config file to run php-cs-fixer with:
$ cd Modules/{ModuleName}
$ php-cs-fixer fix . --config-file=".php_cs" --verbose
Please run php-cs-fixer before sending a pull request
- Have an installation of AsgardCMS/Platform
- Remove
.git/directory - Remove all modules from
composer.jsonfile cdinto theModules/folder and clone each Module individually- Install AsgardCMS as usual
php artisan asgard:install
This is the same as modules except cd-ing into the Themes/ folder and cloning desired themes in there.
Once you have your copy of AsgardCMS installed and configured for contributing purposes, you're ready to make changes.
AsgardCMS follows a workflow similar to Git Flow branching model.
This means:
- For a new feature:
- Create a branch
feature/your-new-feature-name - Add you changes
- Make sure the test suite for the module still passes
- Squash commits if necessary to create a nice history
- Send a pull request to the
developbranch of the module/theme your modifying
- Create a branch
- For a hotfix:
- Create a branch
hotfix/your-hotfix-name - Add a failing test that reproduces the found bug
- Add you changes by making the test pass
- Squash commits if necessary to create a nice history
- Send a pull request to the
developbranch of the module/theme your modifying
- Create a branch
- General GitHub documentation
- GitHub pull request documentation
#asgardcmsIRC channel on freenode.org