Skip to content

Commit

Permalink
refactor(deps): migrate to php-cs-fixer v3.0 (#103)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: not compatible with php-cs-fixer 2.x anymore.
  • Loading branch information
PedroTroller committed May 10, 2021
1 parent fc4d3ea commit 3e2b986
Show file tree
Hide file tree
Showing 68 changed files with 3,510 additions and 5,855 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ workflows:
- documentation:
matrix:
parameters:
php-version: ["7.4"]
php-version: ["8.0"]
- tests:
matrix:
parameters:
php-version: ["7.2", "7.3", "7.4"]
php-version: ["7.3", "7.4", "8.0"]
- tests-with-future-mode:
matrix:
parameters:
php-version: ["7.2", "7.3", "7.4"]
php-version: ["7.3", "7.4", "8.0"]
- tests-with-lowest-dependencies:
matrix:
parameters:
php-version: ["7.2", "7.3", "7.4"]
php-version: ["7.3", "7.4", "8.0"]
- release-test
- release:
requires:
Expand Down
1 change: 0 additions & 1 deletion .github/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
titleAndCommits: true

types:
- "BREAKING CHANGE"
- feat
- fix
- docs
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.php_cs.cache
composer.lock
node_modules
vendor
/.php-cs-fixer.cache
/.php-cs-fixer.php
/composer.lock
/node_modules/
/vendor/
8 changes: 5 additions & 3 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,33 @@
use PedroTroller\CS\Fixer\Fixers;
use PedroTroller\CS\Fixer\RuleSetFactory;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules(
RuleSetFactory::create()
->phpCsFixer(true)
->php(7.2, true)
->php(7.3, true)
->pedrotroller(true)
->enable('ordered_imports')
->enable('ordered_interfaces')
->enable('align_multiline_comment')
->enable('array_indentation')
->enable('no_superfluous_phpdoc_tags')
->enable('simplified_null_return')
->enable('binary_operator_spaces', [
'operators' => [
'=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
],
])
->disable('simplified_null_return')
->getRules()
)
->setUsingCache(false)
->registerCustomFixers(new Fixers())
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->append([__FILE__])
->append([__FILE__, __DIR__.'/bin/doc'])
)
;
18 changes: 8 additions & 10 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ plugins:
-
- '@semantic-release/commit-analyzer'
- releaseRules:
- type: BREAKING CHANGE
release: major
- type: feat
release: minor
- type: fix
release: patch
- scope: deps
release: minor
- scope: deps-dev
release: false
- type: feat
release: minor
- type: fix
release: patch
- scope: deps
release: minor
- scope: deps-dev
release: false
- '@semantic-release/release-notes-generator'
- '@semantic-release/github'

0 comments on commit 3e2b986

Please sign in to comment.