Skip to content

Commit

Permalink
feat: update php-cs-fixer & docker php version
Browse files Browse the repository at this point in the history
  • Loading branch information
divine committed Feb 9, 2022
1 parent 9c2b001 commit 42c1ff2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
php-cs-fixer:
runs-on: ubuntu-latest
env:
PHP_CS_FIXER_VERSION: v2.18.7
PHP_CS_FIXER_VERSION: v3.6.0
strategy:
matrix:
php:
- '7.4'
- '8.0'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
.DS_Store
.idea/
.phpunit.result.cache
/.php_cs
/.php_cs.cache
/.php-cs-fixer.php
/.php-cs-fixer.cache
/vendor
composer.lock
composer.phar
Expand Down
35 changes: 24 additions & 11 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
],
'cast_spaces' => true,
'class_definition' => true,
'class_definition' => false,
'clean_namespace' => true,
'compact_nullable_typehint' => true,
'concat_space' => [
Expand All @@ -46,16 +46,22 @@
'heredoc_to_nowdoc' => true,
'include' => true,
'indentation_type' => true,
'integer_literal_case' => true,
'braces' => false,
'lowercase_cast' => true,
'lowercase_constants' => true,
'constant_case' => [
'case' => 'lower',
],
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'magic_method_casing' => true,
'method_argument_space' => true,
'method_argument_space' => [
'on_multiline' => 'ignore',
],
'class_attributes_separation' => [
'elements' => [
'method',
'method' => 'one',
],
],
'visibility_required' => [
Expand All @@ -74,7 +80,6 @@
'tokens' => [
'throw',
'use',
'use_trait',
'extra',
],
],
Expand All @@ -87,6 +92,7 @@
'multiline_whitespace_before_semicolons' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_space_around_double_colon' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => [
'positions' => [
Expand Down Expand Up @@ -120,7 +126,9 @@
'phpdoc_summary' => true,
'phpdoc_trim' => true,
'phpdoc_no_alias_tag' => [
'type' => 'var',
'replacements' => [
'type' => 'var',
],
],
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
Expand All @@ -130,7 +138,6 @@
'no_mixed_echo_print' => [
'use' => 'echo',
],
'braces' => true,
'return_type_declaration' => [
'space_before' => 'none',
],
Expand All @@ -153,22 +160,28 @@
'switch_case_space' => true,
'switch_continue_to_break' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => [
'elements' => [
'arrays',
],
],
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'types_spaces' => [
'space' => 'none',
],
'line_ending' => true,
'whitespace_after_comma_in_array' => true,
'no_alias_functions' => true,
'no_unreachable_default_argument_value' => true,
'psr4' => true,
'psr_autoloading' => true,
'self_accessor' => true,
];

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

$config = new PhpCsFixer\Config();
return $config
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules($rules)
->setFinder($finder);
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased]

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

## [3.8.4] - 2021-05-27

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=7.4
ARG PHP_VERSION=8.0
ARG COMPOSER_VERSION=2.0

FROM composer:${COMPOSER_VERSION}
Expand Down

0 comments on commit 42c1ff2

Please sign in to comment.