Skip to content

Commit

Permalink
Merge pull request #162 from mitelg/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies; Fix code style
  • Loading branch information
mitelg committed Feb 7, 2020
2 parents dd103bc + daaaf2c commit b147486
Show file tree
Hide file tree
Showing 129 changed files with 1,978 additions and 2,683 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
config.cfg
*config.yaml
!tests/**/config.yaml
.phpunit.result.cache
vendor/
composer.phar
php_errors.log
Expand Down
27 changes: 26 additions & 1 deletion .php_cs.dist
@@ -1,5 +1,14 @@
<?php

use PhpCsFixer\Config;
use PhpCsFixerCustomFixers\Fixer\NoUnneededConcatenationFixer;
use PhpCsFixerCustomFixers\Fixer\NoUselessCommentFixer;
use PhpCsFixerCustomFixers\Fixer\OperatorLinebreakFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocParamTypeFixer;
use PhpCsFixerCustomFixers\Fixer\SingleSpaceAfterStatementFixer;
use PhpCsFixerCustomFixers\Fixer\SingleSpaceBeforeStatementFixer;
use PhpCsFixerCustomFixers\Fixers;

$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
Expand All @@ -11,24 +20,40 @@ For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;

return PhpCsFixer\Config::create()
return Config::create()
->registerCustomFixers(new Fixers())
->setRiskyAllowed(true)
->setUsingCache(false)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'class_attributes_separation' => ['elements' => ['method', 'property']],
'doctrine_annotation_indentation' => true,
'doctrine_annotation_spaces' => true,
'header_comment' => ['header' => $header, 'separate' => 'bottom', 'commentType' => 'PHPDoc'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'no_useless_else' => true,
'no_useless_return' => true,
'no_superfluous_phpdoc_tags' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'phpdoc_summary' => false,
'phpdoc_var_annotation_correct_order' => true,
'blank_line_after_opening_tag' => false,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'general_phpdoc_annotation_remove' => [
'annotations' => ['copyright', 'category'],
],
'php_unit_test_case_static_method_calls' => true,
'single_line_throw' => false,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
NoUselessCommentFixer::name() => true,
NoUnneededConcatenationFixer::name() => true,
SingleSpaceAfterStatementFixer::name() => true,
SingleSpaceBeforeStatementFixer::name() => true,
PhpdocParamTypeFixer::name() => true,
OperatorLinebreakFixer::name() => ['only_booleans' => true],
])
->setFinder($finder);
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -37,7 +37,7 @@ On your system at least the following packages needs to be available.
* ant
* git
* curl
* php5-curl
* php7-curl
* If you want to use coloring you should enable php.posix in your php.ini

## Available commands
Expand Down
18 changes: 8 additions & 10 deletions composer.json
Expand Up @@ -6,24 +6,22 @@
"require": {
"php": ">=7.2.0",
"ext-curl": "*",
"symfony/console": "~2.8",
"symfony/config": "~2.8",
"symfony/yaml": "~2.8",
"symfony/process": "~2.8",
"symfony/dependency-injection": "~2.8",
"symfony/console": "~3.4",
"symfony/config": "~3.4",
"symfony/yaml": "~3.4",
"symfony/process": "~3.4",
"symfony/dependency-injection": "~3.4",
"dnoegel/php-xdg-base-dir": "~0.1",
"shopwarelabs/plugin-info": "dev-master",
"ramsey/array_column": "~1.1",
"fzaninotto/faker": "^1.9.1",
"guzzlehttp/guzzle": "^6.5.2",
"php-http/guzzle6-adapter": "^1.0",
"piwik/ini": "^1.0",
"padraic/phar-updater": "^1.0.6"
},
"require-dev": {
"ext-phar": "*",
"phpunit/phpunit": "^4.8.36",
"friendsofphp/php-cs-fixer": "^2.2.20"
"phpunit/phpunit": "^8.5.2",
"friendsofphp/php-cs-fixer": "^2.16.1",
"kubawerlos/php-cs-fixer-custom-fixers": "^1.17"
},
"scripts": {
"post-install-cmd": "ln -sf ../../hooks/pre-commit .git/hooks/pre-commit",
Expand Down

0 comments on commit b147486

Please sign in to comment.