Skip to content

Commit

Permalink
Composer libraries requirements update for PHP >=8.0 support. resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
xklid101 authored Mar 8, 2022
1 parent b610482 commit 3beafd2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 10
matrix:
php: [ '7.2', '7.3', '7.4' ]
php: [ '8.0', '8.1' ]

steps:
- name: Set up PHP
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v2

- name: PHPStan
uses: docker://oskarstark/phpstan-ga:0.12.85
uses: docker://oskarstark/phpstan-ga:1.4.6
env:
REQUIRE_DEV: true
with:
Expand All @@ -27,6 +27,6 @@ jobs:
uses: actions/checkout@v2

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
uses: docker://oskarstark/php-cs-fixer-ga:3.4.0
with:
args: --dry-run --diff-format udiff
args: --dry-run --diff
34 changes: 20 additions & 14 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<?php

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/test')
->exclude('support/_generated')
->name('*.php');

$config = new PhpCsFixer\Config();
return $config->setRules(
[
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
Expand All @@ -16,13 +21,17 @@
'allow_single_line_closure' => true,
],
'class_attributes_separation' => [
'elements' => ['const', 'property', 'method'],
'elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none'],
],
'declare_strict_types' => true,
'no_alternative_syntax' => true,
'no_leading_import_slash' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_short_echo_tag' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line'
],
'echo_tag_syntax' => [
'format' => 'long'
],
'no_spaces_inside_parenthesis' => true,
'no_useless_else' => true,
'not_operator_with_space' => false,
Expand All @@ -48,20 +57,17 @@
],
'single_quote' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => [
'elements' => ['arrays']
],
'trim_array_spaces' => true,
'single_line_after_imports' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'yoda_style' => false,
]
)
->setRiskyAllowed(true)
->setIndent(' ')
->setUsingCache(false)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/test')
->exclude('support/_generated')
->name('*.php')
);
->setFinder($finder);
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.2",
"php": "^8.0",
"codeception/codeception": "^4.0",
"codeception/lib-innerbrowser": "^1.0",
"slim/psr7": "^1.1",
"slim/slim": "^4.2"
"codeception/lib-innerbrowser": "^2.0",
"slim/psr7": "^1.3",
"slim/slim": "^4.7"
},
"require-dev": {
"ext-json": "*",
"codeception/module-asserts": "^1.2",
"codeception/module-rest": "^1.2"
"codeception/module-asserts": "^2.0",
"codeception/module-rest": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 3beafd2

Please sign in to comment.