Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to PHP 7.2
- Loading branch information
Showing
18 changed files
with
131 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*.{css,html,js,json,latte,neon,php,twig,xml,yaml,yml}] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,73 @@ | ||
os: linux | ||
language: php | ||
|
||
sudo: false | ||
|
||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
- '7.2' | ||
- '7.3' | ||
- '7.4snapshot' | ||
|
||
before_install: | ||
# turn off XDebug | ||
- phpenv config-rm xdebug.ini || return 0 | ||
|
||
install: | ||
# install composer dependencies | ||
- composer install | ||
|
||
script: | ||
# run tests | ||
- vendor/bin/phpunit --coverage-clover coverage.xml | ||
# turn off XDebug | ||
- phpenv config-rm xdebug.ini || return 0 | ||
# check coding standard (defined in composer.json "scripts" section) | ||
- composer check-cs | ||
# check with phpstan (defined in composer.json "scripts" section) | ||
- composer phpstan | ||
# run PHP_CodeSniffer with ruleset | ||
- vendor/bin/phpcs src tests -sp --standard=src/ObjectCalisthenics/ruleset.xml --extensions=php | ||
|
||
after_script: | ||
# upload coverage.xml file to Coveralls to analyze it | ||
- | | ||
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar | ||
php php-coveralls.phar --verbose | ||
- composer install --no-progress | ||
|
||
jobs: | ||
include: | ||
- | ||
stage: test | ||
name: ECS | ||
php: 7.3 | ||
script: | ||
- composer check-cs | ||
|
||
- | ||
name: PHPStan | ||
php: 7.3 | ||
script: | ||
- composer phpstan | ||
|
||
- | ||
name: Rector | ||
php: 7.3 | ||
script: | ||
- vendor/bin/rector process src tests --dry-run --config rector-ci.yaml | ||
|
||
- | ||
name: 'Unit Tests' | ||
script: | ||
- vendor/bin/phpunit | ||
|
||
- | ||
name: 'Run PHP_CodeSniffer' | ||
php: 7.3 | ||
script: | ||
- vendor/bin/phpcs src tests -sp --standard=src/ObjectCalisthenics/ruleset.xml --extensions=php | ||
|
||
- | ||
stage: coverage | ||
name: 'Test Coverage' | ||
if: branch = master AND type = push | ||
before_install: | ||
- echo "keep xdebug" | ||
script: | ||
- vendor/bin/phpunit --coverage-clover coverage.xml | ||
# upload coverage.xml file to Coveralls to analyze it | ||
- wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar | ||
- php php-coveralls.phar --verbose | ||
|
||
allow_failures: | ||
- php: '7.4snapshot' | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
# do not send success notifications, they have no value | ||
notifications: | ||
email: | ||
on_success: never | ||
email: | ||
on_success: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
includes: | ||
- 'vendor/symplify/phpstan-extensions/config/config.neon' | ||
|
||
parameters: | ||
# to allow installing with various phsptan versions without reporting old errors here | ||
reportUnmatchedIgnoredErrors: false | ||
level: max | ||
|
||
autoload_files: | ||
- %currentWorkingDirectory%/tests/bootstrap.php | ||
- %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/autoload.php | ||
excludes_analyse: | ||
- **/ObjectCalisthenics/Helper/Slevomat/** | ||
- 'tests/bootstrap.php' | ||
|
||
ignoreErrors: | ||
# false float positive | ||
- '#Parameter \#1 \$start of method ObjectCalisthenics\\Sniffs\\CodeAnalysis\\OneObjectOperatorPerLineSniff::ignoreWhitespace\(\) expects int, float\|int given#' | ||
- '#Method ObjectCalisthenics\\Sniffs\\Metrics\\MaxNestingLevelSniff::subtractFunctionNestingLevel\(\) should return int but returns float\|int#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
sets: | ||
- 'dead-code' | ||
- 'code-quality' | ||
- 'coding-style' | ||
|
||
autoload_paths: | ||
- 'tests/bootstrap.php' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.