Skip to content

Latest commit

 

History

History
76 lines (44 loc) · 2.65 KB

CONTRIBUTING.md

File metadata and controls

76 lines (44 loc) · 2.65 KB

Contribution Guidelines

Languages

When needing to add labels, placeholders or general text, you must not write directly into the source file, please make use of the ./resources/lang/ directory.

Always provide the English translation - making sure that the indentation and alignment of the arrays are updated.

Coding Standards

The code is written to follow PSR-2 standards, this can be tested using PHP_CodeSniffer

$ ./vendor/bin/phpcs --standard=phpcs.xml

Style problems can be fixed with

$ ./vendor/bin/php-cs-fixer fix

Mess can be checked with

$ ./vendor/bin/phpmd app text phpmd.xml

Duplication can be checked with

$ ./vendor/bin/phpcpd app

PHPDoc blocks can be checked with

$ ./vendor/bin/phpdoccheck --directory=app

Automated testing

Coding standards are checked using StyleCI; mess, duplication, PHPDoc blocks and PHP syntax are checked using PHPCI

.editorconfig

You should make use of the .editorconfig file found within the root of the repository. It'll make sure that your editor is setup with the same file settings. See http://editorconfig.org for more details.

Requirements

Along with the standard requirements, development also requires the following

Development environment

The project includes a Vagrantfile for running deployer, it uses laravel/homestead. The VM uses the domain deploy.app and the IP address 192.168.10.10 so you will need to add the following line your /etc/hosts file

192.168.10.1 deploy.app

You will need to install the required box and start vagrant

$ vagrant box add laravel/homestead
$ vagrant up

Once you have started the VM you will need to run the following commands

$ vagrant ssh
$ cd /var/www/deployer
$ composer install
$ editor .env                       # Change APP_ENV to local and APP_DEBUG to true
$ php artisan app:install           # Use the values from .env if you want to use MySQL
$ npm install
$ bower install
$ gulp
$ sudo service supervisor restart

You can reset your database by running

$ php artisan app:reset

The VM will set up the cronjob needed for heartbeats and it will setup supervisor to ensure the queue listener is always running

Please note, this VM will copy ~/.ssh/id_rsa and ~/.gitconfig from your host on first boot.