Skip to content

Commit 66131f1

Browse files
authored
Merge pull request #43 from answear/support-symfony6
Support Symfony6
2 parents b5dd517 + e446817 commit 66131f1

File tree

6 files changed

+41
-19
lines changed

6 files changed

+41
-19
lines changed

.github/workflows/phpunit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
strategy:
1212
matrix:
1313
php-version:
14-
- "7.3"
1514
- "7.4"
15+
- "8.0"
16+
- "8.1"
1617
deps:
1718
- "normal"
1819
include:
1920
- deps: "low"
20-
php-version: "7.3"
21+
php-version: "7.4"
2122

2223
steps:
2324
- name: "Checkout"

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
matrix:
1313
php-version:
1414
- "7.4"
15+
- "8.0"
16+
- "8.1"
1517

1618
steps:
1719
- name: "Checkout"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/vendor/
2-
\.php_cs\.cache
2+
*.cache
33
.phpunit.result.cache
44
composer.lock
55
/composer.phar

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
<?php
22

3-
$finder = PhpCsFixer\Finder::create()
3+
declare(strict_types=1);
4+
5+
$config = new PhpCsFixer\Config();
6+
7+
$finder = $config->getFinder()
48
->exclude(
59
[
610
'vendor',
711
]
812
)
913
->in(__DIR__);
1014

11-
return PhpCsFixer\Config::create()
15+
return $config
16+
->registerCustomFixers([])
1217
->setRules(
1318
[
1419
'@Symfony' => true,
@@ -21,6 +26,15 @@
2126
'phpdoc_var_without_name' => false,
2227
'phpdoc_to_comment' => false,
2328
'single_line_throw' => false,
29+
'modernize_types_casting' => true,
30+
'function_declaration' => false,
31+
'ordered_imports' => [
32+
'imports_order' => [
33+
'class',
34+
'function',
35+
'const',
36+
],
37+
'sort_algorithm' => 'alpha',
38+
],
2439
]
25-
)
26-
->setFinder($finder);
40+
);

composer.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
"type": "symfony-bundle",
55
"license": "MIT",
66
"require": {
7-
"php": ">=7.3",
7+
"php": ">=7.4|^8.0",
88
"ext-json": "*",
99
"marc-mabe/php-enum": "^3.0|^4.3",
1010
"webmozart/assert": "^1.3",
11-
"symfony/validator": "^4.1 || ^5.0",
12-
"symfony/http-kernel": "^4.1 || ^5.0",
11+
"symfony/validator": "^5.4|^6.0",
12+
"symfony/http-kernel": "^5.4|^6.0",
1313
"guzzlehttp/guzzle": "^6.0 || ^7.0",
14-
"symfony/serializer": "^4.4 || ^5.0",
15-
"symfony/property-access": "^4.1 || ^5.0"
14+
"symfony/serializer": "^5.4|^6.0",
15+
"symfony/property-access": "^5.4|^6.0"
1616
},
1717
"require-dev": {
1818
"roave/security-advisories": "dev-master",
19-
"phpunit/phpunit": "^8.0",
20-
"symfony/phpunit-bridge": "^5.0",
21-
"phpro/grumphp": "^1.3.0",
22-
"friendsofphp/php-cs-fixer": "^2.16",
23-
"phpstan/phpstan": "^0.12.32",
24-
"phpstan/phpstan-webmozart-assert": "^0.12.2",
19+
"phpunit/phpunit": "^9.5",
20+
"symfony/phpunit-bridge": "6.1.*",
21+
"phpro/grumphp": "^1.5.0",
22+
"friendsofphp/php-cs-fixer": "^3.4",
23+
"phpstan/phpstan": "^1.4",
24+
"phpstan/phpstan-webmozart-assert": "^1.0",
2525
"matthiasnoback/symfony-config-test": "^4.2"
2626
},
2727
"autoload": {
@@ -46,5 +46,10 @@
4646
"grumphp": {
4747
"config-default-path": "grumphp.yaml"
4848
}
49+
},
50+
"config": {
51+
"allow-plugins": {
52+
"phpro/grumphp": true
53+
}
4954
}
5055
}

grumphp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ grumphp:
1919
phpcsfixer2:
2020
allow_risky: true
2121
cache_file: ~
22-
config: './.php_cs'
22+
config: './.php-cs-fixer.php'
2323
using_cache: true
2424
verbose: true
2525
phpstan:

0 commit comments

Comments
 (0)