https://plugins.jetbrains.com/plugin/9525--env-files-support
https://plugins.jetbrains.com/plugin/4230-bashsupport
https://plugins.jetbrains.com/plugin/7532
composer require --dev squizlabs/php_codesniffer
composer require --dev barryvdh/laravel-ide-helper
- Choose File / Settings from the menu
- Go to the Editor / Code Style / PHP page
- In the "Scheme" dropdown choose Project
- Locate the link "Set from" in the top right corner and click on it
- Choose "Predefined Style / PSR1/PSR2"
- Save
With this setting whenever you choose Code / Reformat code it will set it up according to the Laravel coding guidelines.
- Choose File / Settings from the menu
- Go to the Editor / Code Style / JSON page
- In the "Scheme" dropdown choose Project
- On "Tabs and Indents" tab locate the option "Indent:"
- Set it to 4
- Save
sudo: true
language: php
php:
- 7.1.11
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
addons:
apt:
packages:
- nasm
before_install:
- nvm install v8.9
- nvm use v8.9
- curl -sS -o security-checker.phar https://get.sensiolabs.org/security-checker.phar
- composer -n --no-progress install
- npm install
- cp -uv .env.example .env
- php artisan key:generate
script:
- php security-checker.phar security:check composer.lock
- npm run dev
- vendor/bin/phpcs --extensions='php' --ignore='*.blade.php,bootstrap,vendor,node_modules,storage,public,database,_ide_helper.php' --standard='PSR2' .
- vendor/bin/phpunit --colors
Explanation:
- We install NodeJS 8.9
- We download Symphony composer security checker
- We install all PHP and NodeJS dependencies
- We prepare project for the use
- We execute composer security check
- We execute full Js build that helps detecting any potential errors
- We check for PHP code quality using Code Sniffer
- We execute unit tests