Skip to content

Commit 0f81ed3

Browse files
committed
chore: bump min version to php81
Signed-off-by: Jack Cherng <[email protected]>
1 parent 2944181 commit 0f81ed3

File tree

4 files changed

+1370
-885
lines changed

4 files changed

+1370
-885
lines changed

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

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
<?php
22

33
$config = (new PhpCsFixer\Config())
4-
->setIndent(" ")
4+
->setIndent(' ')
55
->setLineEnding("\n")
6-
->setCacheFile(__DIR__ . '/.php_cs.cache')
6+
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache')
77
->setRiskyAllowed(true)
88
->setRules([
99
'@PHP71Migration' => true,
10-
'@PHP73Migration' => false,
10+
'@PHP71Migration:risky' => true,
11+
'@PHP73Migration' => true,
12+
'@PHP74Migration' => true,
13+
'@PHP74Migration:risky' => true,
14+
'@PHP80Migration' => false,
15+
'@PHP80Migration:risky' => true,
16+
'@PHP81Migration' => false,
1117
'@PhpCsFixer' => true,
1218
'@PhpCsFixer:risky' => true,
13-
'@PSR2' => true,
19+
'@PSR12' => true,
1420
'@Symfony' => true,
1521
'@Symfony:risky' => true,
1622
'align_multiline_comment' => true,
@@ -22,33 +28,34 @@
2228
'comment_to_phpdoc' => true,
2329
'compact_nullable_typehint' => true,
2430
'concat_space' => ['spacing' => 'one'],
31+
'echo_tag_syntax' => ['format' => 'short'],
2532
'escape_implicit_backslashes' => false,
2633
'fully_qualified_strict_types' => true,
2734
'linebreak_after_opening_tag' => true,
2835
'list_syntax' => ['syntax' => 'short'],
29-
'method_argument_space' => ['ensure_fully_multiline' => true],
30-
'native_constant_invocation' => true,
31-
'native_function_invocation' => true,
36+
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
37+
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
38+
'native_constant_invocation' => ['scope' => 'all'],
39+
'native_function_invocation' => ['scope' => 'all', 'include' => ['@compiler_optimized']],
3240
'native_function_type_declaration_casing' => true,
3341
'no_alternative_syntax' => true,
34-
'no_multiline_whitespace_before_semicolons' => true,
3542
'no_null_property_initialization' => true,
36-
'no_short_echo_tag' => true,
3743
'no_superfluous_elseif' => true,
3844
'no_unneeded_control_parentheses' => true,
45+
'no_useless_concat_operator' => false,
3946
'no_useless_else' => true,
4047
'no_useless_return' => true,
4148
'not_operator_with_space' => false,
4249
'not_operator_with_successor_space' => false,
4350
'ordered_class_elements' => true,
4451
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'const', 'function']],
4552
'ordered_interfaces' => true,
46-
'php_unit_ordered_covers' => true,
4753
'php_unit_set_up_tear_down_visibility' => true,
4854
'php_unit_strict' => true,
4955
'php_unit_test_class_requires_covers' => true,
5056
'phpdoc_add_missing_param_annotation' => true,
5157
'phpdoc_order' => true,
58+
'phpdoc_order_by_value' => ['annotations' => ['covers']],
5259
'phpdoc_to_comment' => false,
5360
'phpdoc_types_order' => true,
5461
'pow_to_exponentiation' => true,
@@ -57,9 +64,12 @@
5764
'simple_to_complex_string_variable' => true,
5865
'single_line_comment_style' => true,
5966
'single_trait_insert_per_statement' => true,
67+
'static_lambda' => false,
6068
'strict_comparison' => false,
6169
'strict_param' => false,
6270
'string_line_ending' => true,
71+
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arrays', 'arguments']],
72+
'types_spaces' => ['space_multiple_catch' => 'single'],
6373
'yoda_style' => false,
6474
])
6575
->setFinder(

composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
},
2424
"config": {
2525
"platform": {
26-
"php": "7.1.3"
26+
"php": "8.1.99"
2727
},
2828
"sort-packages": true
2929
},
3030
"require": {
31-
"php": ">=7.1.3",
31+
"php": ">=8.1",
3232
"ext-iconv": "*"
3333
},
3434
"require-dev": {
35-
"friendsofphp/php-cs-fixer": "^2.18",
36-
"phan/phan": "^2 || ^3 || ^4",
37-
"phpunit/phpunit": "^7.2 || ^8 || ^9"
35+
"friendsofphp/php-cs-fixer": "^3",
36+
"phan/phan": "^5",
37+
"phpunit/phpunit": "^9 || ^10"
3838
},
3939
"scripts": {
4040
"analyze": [
@@ -44,7 +44,7 @@
4444
"php-cs-fixer fix --verbose"
4545
],
4646
"test": [
47-
"phpunit --verbose"
47+
"phpunit"
4848
]
4949
}
5050
}

0 commit comments

Comments
 (0)