This starter kit is here to easily start a repository.
It's symfony website-skeleton project with some additional tools to validate code standards.
-
GrumPHP, as pre-commit hook, will run 2 tools when
git commit
is run :- PHP_CodeSniffer to check PSR2
- PHPStan will check PHP recommendation
If tests fail, the commit is canceled and a warning message is displayed to developper.
-
Travis CI, as Continuous Integration will be run when a branch with active pull request is updated on github. It will run :
- Tasks to check if vendor, .idea, env.local are not versionned,
- PHP_CodeSniffer to check PSR2,
- PHPStan will check PHP recommendation.
- Check composer is installed
- Check yarn & node are installed
- Clone this project
- Run
composer install
- Run
yarn install
- Run
php bin/console server:run
to launch your local php web server - Run
yarn run dev --watch
to launch your local server for assets
- Run
./bin/phpcs
to launch PHP code sniffer - Run
./bin/phpstan analyse src --level max
to launch PHPStan - Run
./bin/phpmd src text phpmd.xml
to launch PHP Mess Detector - Run
./bin/eslint assets/js
to launch ESLint JS linter - Run
./bin/sass-lint -c sass-linter.yml
to launch Sass-lint SASS/CSS linter
If you develop on Windows, you should edit you git configuration to change your end of line rules with this command :
git config --global core.autocrlf true
Add additional notes about how to deploy this on a live system