Skip to content

Commit 3beafd2

Browse files
authored
Composer libraries requirements update for PHP >=8.0 support. resolves #18 (#19)
1 parent b610482 commit 3beafd2

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 10
1111
matrix:
12-
php: [ '7.2', '7.3', '7.4' ]
12+
php: [ '8.0', '8.1' ]
1313

1414
steps:
1515
- name: Set up PHP

.github/workflows/static-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/checkout@v2
1313

1414
- name: PHPStan
15-
uses: docker://oskarstark/phpstan-ga:0.12.85
15+
uses: docker://oskarstark/phpstan-ga:1.4.6
1616
env:
1717
REQUIRE_DEV: true
1818
with:
@@ -27,6 +27,6 @@ jobs:
2727
uses: actions/checkout@v2
2828

2929
- name: PHP-CS-Fixer
30-
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
30+
uses: docker://oskarstark/php-cs-fixer-ga:3.4.0
3131
with:
32-
args: --dry-run --diff-format udiff
32+
args: --dry-run --diff

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<?php
22

3-
return PhpCsFixer\Config::create()
4-
->setRiskyAllowed(true)
5-
->setRules(
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__.'/src')
5+
->in(__DIR__.'/test')
6+
->exclude('support/_generated')
7+
->name('*.php');
8+
9+
$config = new PhpCsFixer\Config();
10+
return $config->setRules(
611
[
712
'@PSR2' => true,
813
'array_syntax' => ['syntax' => 'short'],
@@ -16,13 +21,17 @@
1621
'allow_single_line_closure' => true,
1722
],
1823
'class_attributes_separation' => [
19-
'elements' => ['const', 'property', 'method'],
24+
'elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none'],
2025
],
2126
'declare_strict_types' => true,
2227
'no_alternative_syntax' => true,
2328
'no_leading_import_slash' => true,
24-
'no_multiline_whitespace_before_semicolons' => true,
25-
'no_short_echo_tag' => true,
29+
'multiline_whitespace_before_semicolons' => [
30+
'strategy' => 'no_multi_line'
31+
],
32+
'echo_tag_syntax' => [
33+
'format' => 'long'
34+
],
2635
'no_spaces_inside_parenthesis' => true,
2736
'no_useless_else' => true,
2837
'not_operator_with_space' => false,
@@ -48,20 +57,17 @@
4857
],
4958
'single_quote' => true,
5059
'ternary_operator_spaces' => true,
51-
'trailing_comma_in_multiline_array' => true,
60+
'trailing_comma_in_multiline' => [
61+
'elements' => ['arrays']
62+
],
5263
'trim_array_spaces' => true,
5364
'single_line_after_imports' => true,
5465
'unary_operator_spaces' => true,
5566
'visibility_required' => true,
5667
'yoda_style' => false,
5768
]
5869
)
70+
->setRiskyAllowed(true)
5971
->setIndent(' ')
6072
->setUsingCache(false)
61-
->setFinder(
62-
PhpCsFixer\Finder::create()
63-
->in(__DIR__.'/src')
64-
->in(__DIR__.'/test')
65-
->exclude('support/_generated')
66-
->name('*.php')
67-
);
73+
->setFinder($finder);

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
"type": "library",
1010
"license": "MIT",
1111
"require": {
12-
"php": "^7.2",
12+
"php": "^8.0",
1313
"codeception/codeception": "^4.0",
14-
"codeception/lib-innerbrowser": "^1.0",
15-
"slim/psr7": "^1.1",
16-
"slim/slim": "^4.2"
14+
"codeception/lib-innerbrowser": "^2.0",
15+
"slim/psr7": "^1.3",
16+
"slim/slim": "^4.7"
1717
},
1818
"require-dev": {
1919
"ext-json": "*",
20-
"codeception/module-asserts": "^1.2",
21-
"codeception/module-rest": "^1.2"
20+
"codeception/module-asserts": "^2.0",
21+
"codeception/module-rest": "^2.0"
2222
},
2323
"autoload": {
2424
"psr-4": {

0 commit comments

Comments
 (0)