Skip to content

Commit 42c1ff2

Browse files
committed
feat: update php-cs-fixer & docker php version
1 parent 9c2b001 commit 42c1ff2

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

Diff for: .github/workflows/build-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
php-cs-fixer:
1111
runs-on: ubuntu-latest
1212
env:
13-
PHP_CS_FIXER_VERSION: v2.18.7
13+
PHP_CS_FIXER_VERSION: v3.6.0
1414
strategy:
1515
matrix:
1616
php:
17-
- '7.4'
17+
- '8.0'
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v2

Diff for: .gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
.DS_Store
55
.idea/
66
.phpunit.result.cache
7-
/.php_cs
8-
/.php_cs.cache
7+
/.php-cs-fixer.php
8+
/.php-cs-fixer.cache
99
/vendor
1010
composer.lock
1111
composer.phar

Diff for: .php_cs.dist renamed to .php-cs-fixer.dist.php

+24-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
],
2727
'cast_spaces' => true,
28-
'class_definition' => true,
28+
'class_definition' => false,
2929
'clean_namespace' => true,
3030
'compact_nullable_typehint' => true,
3131
'concat_space' => [
@@ -46,16 +46,22 @@
4646
'heredoc_to_nowdoc' => true,
4747
'include' => true,
4848
'indentation_type' => true,
49+
'integer_literal_case' => true,
50+
'braces' => false,
4951
'lowercase_cast' => true,
50-
'lowercase_constants' => true,
52+
'constant_case' => [
53+
'case' => 'lower',
54+
],
5155
'lowercase_keywords' => true,
5256
'lowercase_static_reference' => true,
5357
'magic_constant_casing' => true,
5458
'magic_method_casing' => true,
55-
'method_argument_space' => true,
59+
'method_argument_space' => [
60+
'on_multiline' => 'ignore',
61+
],
5662
'class_attributes_separation' => [
5763
'elements' => [
58-
'method',
64+
'method' => 'one',
5965
],
6066
],
6167
'visibility_required' => [
@@ -74,7 +80,6 @@
7480
'tokens' => [
7581
'throw',
7682
'use',
77-
'use_trait',
7883
'extra',
7984
],
8085
],
@@ -87,6 +92,7 @@
8792
'multiline_whitespace_before_semicolons' => true,
8893
'no_short_bool_cast' => true,
8994
'no_singleline_whitespace_before_semicolons' => true,
95+
'no_space_around_double_colon' => true,
9096
'no_spaces_after_function_name' => true,
9197
'no_spaces_around_offset' => [
9298
'positions' => [
@@ -120,7 +126,9 @@
120126
'phpdoc_summary' => true,
121127
'phpdoc_trim' => true,
122128
'phpdoc_no_alias_tag' => [
123-
'type' => 'var',
129+
'replacements' => [
130+
'type' => 'var',
131+
],
124132
],
125133
'phpdoc_types' => true,
126134
'phpdoc_var_without_name' => true,
@@ -130,7 +138,6 @@
130138
'no_mixed_echo_print' => [
131139
'use' => 'echo',
132140
],
133-
'braces' => true,
134141
'return_type_declaration' => [
135142
'space_before' => 'none',
136143
],
@@ -153,22 +160,28 @@
153160
'switch_case_space' => true,
154161
'switch_continue_to_break' => true,
155162
'ternary_operator_spaces' => true,
156-
'trailing_comma_in_multiline_array' => true,
163+
'trailing_comma_in_multiline' => [
164+
'elements' => [
165+
'arrays',
166+
],
167+
],
157168
'trim_array_spaces' => true,
158169
'unary_operator_spaces' => true,
170+
'types_spaces' => [
171+
'space' => 'none',
172+
],
159173
'line_ending' => true,
160174
'whitespace_after_comma_in_array' => true,
161175
'no_alias_functions' => true,
162176
'no_unreachable_default_argument_value' => true,
163-
'psr4' => true,
177+
'psr_autoloading' => true,
164178
'self_accessor' => true,
165179
];
166180

167181
$finder = PhpCsFixer\Finder::create()
168182
->in(__DIR__);
169183

170-
$config = new PhpCsFixer\Config();
171-
return $config
184+
return (new PhpCsFixer\Config())
172185
->setRiskyAllowed(true)
173186
->setRules($rules)
174187
->setFinder($finder);

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44
## [Unreleased]
55

66
### Added
7-
- Compatibility with Laravel 9.x [#](https://github.com/jenssegers/laravel-mongodb/pull/) by [@divine](https://github.com/divine).
7+
- Compatibility with Laravel 9.x [#2344](https://github.com/jenssegers/laravel-mongodb/pull/2344) by [@divine](https://github.com/divine).
88

99
## [3.8.4] - 2021-05-27
1010

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=7.4
1+
ARG PHP_VERSION=8.0
22
ARG COMPOSER_VERSION=2.0
33

44
FROM composer:${COMPOSER_VERSION}

0 commit comments

Comments
 (0)