Skip to content

Commit e8ca20f

Browse files
authoredOct 3, 2021
Upgraded friendsofphp/php-cs-fixer to ^3.0 (#2)
1 parent e96f01d commit e8ca20f

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed
 
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Coding Style Checks
2+
3+
on: [ push, pull_request, workflow_dispatch ]
4+
5+
jobs:
6+
ci:
7+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.os }}
8+
runs-on: "${{ matrix.os }}"
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
php-versions: ['7.2', '7.3', '7.4', '8.0']
13+
max-parallel: 4
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
tools: phpize
23+
coverage: none
24+
25+
- name: Setup Deps
26+
run:
27+
composer install -o
28+
29+
- name: Coding Style Checks
30+
run:
31+
composer cs-check

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/vendor/
22
composer.lock
33
.idea
4+
config.php
5+
properties.php

‎.php_cs.dist ‎.php-cs-fixer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
please view the LICENSE file that was distributed with this source code
2222
TEXT;
2323

24-
return PhpCsFixer\Config::create()
24+
return (new PhpCsFixer\Config())
2525
->setRiskyAllowed(true)
2626
->setRules([
2727
'@PSR2' => true,
2828
'@Symfony' => true,
2929
'@DoctrineAnnotation' => true,
3030
'@PhpCsFixer' => true,
3131
'header_comment' => [
32-
'commentType' => 'PHPDoc',
32+
'comment_type' => 'PHPDoc',
3333
'header' => $header,
3434
'separate' => 'bottom',
3535
'location' => 'after_open',
@@ -85,7 +85,7 @@
8585
'combine_consecutive_unsets' => true,
8686
'declare_strict_types' => true,
8787
'linebreak_after_opening_tag' => true,
88-
'lowercase_constants' => true,
88+
'constant_case' => true,
8989
'lowercase_static_reference' => true,
9090
'no_useless_else' => true,
9191
'no_unused_imports' => true,

‎composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"require": {
2525
"symfony/console": "^5.2",
2626
"simps/mqtt": "^1.3",
27-
"friendsofphp/php-cs-fixer": "^2.18",
27+
"friendsofphp/php-cs-fixer": "^3.0",
2828
"ext-json": "*"
2929
},
3030
"autoload": {

0 commit comments

Comments
 (0)
Please sign in to comment.