Skip to content

Commit

Permalink
Merge pull request #139 from Sybio/upgrade-phpstan
Browse files Browse the repository at this point in the history
Upgrade PHPStan to 1.x branch
  • Loading branch information
jdecool authored Jan 1, 2022
2 parents 355ed14 + 4a1ff99 commit b0d4b73
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
php-version: ['7.2', '7.3', '7.4', '8.0']
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1']
name: 'PHPUnit - PHP/${{ matrix.php-version }} - OS/${{ matrix.os }}'
steps:
- name: Checkout
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
php-version: [ '7.4' ]
php-version: [ '8.1' ]
name: 'Coding style'
steps:
- name: Checkout
Expand All @@ -61,14 +61,14 @@ jobs:
- name: Install Dependencies
run: composer install --no-progress
- name: PHPUnit
run: vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run .
run: vendor/bin/php-cs-fixer fix -v --dry-run .

phpstan:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
php-version: [ '7.4', '8.0' ]
php-version: [ '8.0', '8.1' ]
name: 'PHPStan - PHP/${{ matrix.php-version }} - OS/${{ matrix.os }}'
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
composer.lock
vendor/
13 changes: 7 additions & 6 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
file that was distributed with this source code.
EOF;

return PhpCsFixer\Config::create()
$finder = PhpCsFixer\Finder::create()
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->in(__DIR__)
;

return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'function_declaration' => ['closure_function_spacing' => 'none'],
'no_whitespace_in_blank_line' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
)
;
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"ext-gd": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v2.17.1",
"friendsofphp/php-cs-fixer": "^3.4",
"phpunit/phpunit": "^8.5.13",
"phpstan/phpstan": "^0.12.59"
"phpstan/phpstan": "^1.3"
},
"suggest": {
"ext-exif": "Allows to read and keep images EXIF data"
Expand Down

0 comments on commit b0d4b73

Please sign in to comment.