Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga:2.18.6
uses: docker://oskarstark/php-cs-fixer-ga:3.26.0
with:
args: --config=.php_cs.dist --allow-risky=yes
args: --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
coverage: ${{ matrix.php == '8.3' && 'xdebug' || 'none' }}

- name: Get composer cache directory
id: composer-cache
Expand All @@ -46,11 +46,12 @@ jobs:

- name: Run Unit tests
run: |
vendor/bin/phpunit --coverage-clover=tests/logs/clover.xml
vendor/bin/phpunit ${{ matrix.php == '8.3' && '--coverage-clover=tests/logs/clover.xml' || '' }}

- name: Upload coverage results to Coveralls
if: matrix.php == '8.3'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls "^1.0"
coveralls --coverage_clover=tests/logs/clover.xml -v
composer global require php-coveralls/php-coveralls "^2.7"
php-coveralls --coverage_clover=tests/logs/clover.xml -v
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ composer.phar
composer.lock
.DS_Store
.phpunit.result.cache
.php_cs.cache
.php-cs-fixer.cache
.coveralls.yml export-ignore
.php_cs.dist export-ignore
phpunit.xml export-ignore
10 changes: 5 additions & 5 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests',
Expand All @@ -9,13 +9,13 @@
->ignoreDotFiles(true)
->ignoreVCS(true);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
Expand All @@ -29,4 +29,4 @@
'keep_multiple_spaces_after_comma' => true,
],
])
->setFinder($finder);
->setFinder($finder);
Loading