Skip to content

Commit

Permalink
PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
renekorss committed Oct 6, 2023
1 parent 8661d8f commit a3df737
Show file tree
Hide file tree
Showing 27 changed files with 2,081 additions and 2,168 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4']
php-versions: ['8.1']

name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
Expand All @@ -24,19 +24,19 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress --no-suggest --ignore-platform-reqs
- name: PHP Code Sniffer
if: matrix.php-versions == '7.4'
if: matrix.php-versions == '8.1'
run: composer phpcs
- name: PHP Mess Detector
if: matrix.php-versions == '7.4'
if: matrix.php-versions == '8.1'
run: composer phpmd
- name: PHP Unit Tests with coverage
if: matrix.php-versions == '7.4'
if: matrix.php-versions == '8.1'
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: PHP Unit Tests
if: matrix.php-versions != '7.4'
if: matrix.php-versions != '8.1'
run: composer test
- name: Send to coveralls
if: matrix.php-versions == '7.4'
run: vendor/bin/coveralls build/logs/clover.xml
if: matrix.php-versions == '8.1'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
8 changes: 4 additions & 4 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php
$finder = Symfony\Component\Finder\Finder::create()
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->notPath('vendor')
->notPath('docs')
->in(__DIR__)
->name('*.php');

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
])
->setUsingCache(false)
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"minimum-stability": "stable",
"require": {
"php": "^7.3",
"php": "^7.4|^8.1",
"php-http/guzzle6-adapter": "^2.0"
},
"autoload": {
Expand All @@ -25,11 +25,11 @@
}
},
"require-dev": {
"phpunit/phpunit": "^9.2",
"phpunit/phpunit": "^10.4",
"squizlabs/php_codesniffer": "^3.5",
"phpmd/phpmd": "^2.8",
"friendsofphp/php-cs-fixer": "^2.16",
"cedx/coveralls": "^13.2"
"friendsofphp/php-cs-fixer": "^3.34",
"php-coveralls/php-coveralls": "^2.6"
},
"scripts": {
"build": [
Expand Down

0 comments on commit a3df737

Please sign in to comment.