Skip to content

Commit 4d85156

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

File tree

4 files changed

+1494
-932
lines changed

4 files changed

+1494
-932
lines changed

.php-cs-fixer.dist.php

+17-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
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,
1319
'@PSR12' => true,
@@ -22,18 +28,19 @@
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,
34+
'heredoc_indentation' => false, // disabling this makes test cases more readable
2735
'linebreak_after_opening_tag' => true,
2836
'list_syntax' => ['syntax' => 'short'],
29-
'method_argument_space' => ['ensure_fully_multiline' => true],
30-
'native_constant_invocation' => true,
31-
'native_function_invocation' => true,
37+
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
38+
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
39+
'native_constant_invocation' => ['scope' => 'all'],
40+
'native_function_invocation' => ['scope' => 'all', 'include' => ['@compiler_optimized']],
3241
'native_function_type_declaration_casing' => true,
3342
'no_alternative_syntax' => true,
34-
'no_multiline_whitespace_before_semicolons' => true,
3543
'no_null_property_initialization' => true,
36-
'no_short_echo_tag' => true,
3744
'no_superfluous_elseif' => true,
3845
'no_trailing_whitespace_in_string' => false, // test cases have trailing spaces
3946
'no_unneeded_control_parentheses' => true,
@@ -44,12 +51,12 @@
4451
'ordered_class_elements' => true,
4552
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'const', 'function']],
4653
'ordered_interfaces' => true,
47-
'php_unit_ordered_covers' => true,
4854
'php_unit_set_up_tear_down_visibility' => true,
4955
'php_unit_strict' => true,
5056
'php_unit_test_class_requires_covers' => true,
5157
'phpdoc_add_missing_param_annotation' => true,
5258
'phpdoc_order' => true,
59+
'phpdoc_order_by_value' => ['annotations' => ['covers']],
5360
'phpdoc_to_comment' => false,
5461
'phpdoc_types_order' => true,
5562
'pow_to_exponentiation' => true,
@@ -58,9 +65,12 @@
5865
'simple_to_complex_string_variable' => true,
5966
'single_line_comment_style' => true,
6067
'single_trait_insert_per_statement' => true,
68+
'static_lambda' => false,
6169
'strict_comparison' => false,
6270
'strict_param' => false,
6371
'string_line_ending' => true,
72+
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arrays', 'arguments']],
73+
'types_spaces' => ['space_multiple_catch' => 'single'],
6474
'yoda_style' => false,
6575
])
6676
->setFinder(

composer.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
}
2727
},
2828
"require": {
29-
"php": ">=7.1.3"
29+
"php": ">=8.1"
3030
},
3131
"require-dev": {
32-
"friendsofphp/php-cs-fixer": "^2.19",
33-
"liip/rmt": "^1.6",
34-
"phan/phan": "^2.5 || ^3 || ^4 || ^5",
35-
"phpunit/phpunit": ">=7 <10",
36-
"squizlabs/php_codesniffer": "^3.5"
32+
"friendsofphp/php-cs-fixer": "^3",
33+
"liip/rmt": "^1.7",
34+
"phan/phan": "^5",
35+
"phpunit/phpunit": "^9 || ^10",
36+
"squizlabs/php_codesniffer": "^3.7"
3737
},
3838
"config": {
3939
"platform": {
40-
"php": "7.1.3"
40+
"php": "8.1.99"
4141
},
4242
"sort-packages": true
4343
},
@@ -50,7 +50,7 @@
5050
"php-cs-fixer fix --verbose"
5151
],
5252
"test": [
53-
"phpunit --verbose"
53+
"phpunit --display-deprecations"
5454
]
5555
}
5656
}

0 commit comments

Comments
 (0)