CI with PHP and TravisCI
Code is hosted on GitHub and tests are run on TravisCI on every push to master
branch.
The code coverage reports are uploaded to codecov.io.
This is base set of tools that help writing PHP code.
They are not obligatory but they are great help!
Install:
composer global require infection/infection
or
brew install infection
Run:
infection
They will help you to write code with consistent style (quotation, indentation, unused variable, ...).
- phpcs
- phpcbf
- phpcpd
The PHP Static Analysis tool.
$ vendor/bin/phpstan analyse src tests
Added strict rules with:
composer require --dev vimeo/psalm
./vendor/bin/psalm --init
./vendor/bin/psalm
composer require --dev php-coveralls/php-coveralls
pecl install xdebug
./vendor/bin/phpunit
Install plugins to Sublime Text 3:
- SublimeLinter
- SublimeLinter-phpcs
- SublimeLinter-phpcs-formatter
Optional:
- DocBlockr
- FileManager
- GitGutter
- Pretty JSON
- SublimeLinter-annotations
git clone https://github.com/vukanac/ci-base-php.git phpstarter
cd phpstarter
composer install
composer test
or
composer ci
Watching for changes: ./vendor/bin/phpunit-watcher --watch
composer test
./vendor/bin/phpunit
MIT
Vladimir Vukanac