Skip to content
Snippets Groups Projects
Commit 20abee6f authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Port to cs-fixer 3.0

parent 12182ca1
No related branches found
No related tags found
No related merge requests found
Pipeline #105674 passed
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;
$config = new PhpCsFixer\Config();
$config->setRules([
'@Symfony' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@DoctrineAnnotation' => true,
'doctrine_annotation_array_assignment' => ['operator' => '='],
'yoda_style' => false,
'strict_comparison' => true,
'strict_param' => true,
'declare_strict_types' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
])
->setRiskyAllowed(true)
->setFinder($finder);
return $config;
\ No newline at end of file
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@DoctrineAnnotation' => true,
'doctrine_annotation_array_assignment' => ['operator' => '='],
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
'strict_comparison' => true,
'strict_param' => true,
'declare_strict_types' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"ext-json": "*" "ext-json": "*"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.16", "friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^0.12.33", "phpstan/phpstan": "^0.12.33",
"phpstan/phpstan-phpunit": "^0.12.13", "phpstan/phpstan-phpunit": "^0.12.13",
"symfony/browser-kit": "^5.2", "symfony/browser-kit": "^5.2",
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
"@php vendor/bin/php-cs-fixer --ansi fix" "@php vendor/bin/php-cs-fixer --ansi fix"
], ],
"cs": [ "cs": [
"@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff --diff-format=udiff" "@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff"
], ],
"coverage": [ "coverage": [
"@php vendor/bin/simple-phpunit --coverage-html _coverage" "@php vendor/bin/simple-phpunit --coverage-html _coverage"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "57b40959ca3453b1974746244c909952", "content-hash": "29b59805b8252014983032895931c80b",
"packages": [ "packages": [
{ {
"name": "api-platform/core", "name": "api-platform/core",
...@@ -6191,16 +6191,16 @@ ...@@ -6191,16 +6191,16 @@
}, },
{ {
"name": "composer/xdebug-handler", "name": "composer/xdebug-handler",
"version": "2.0.0", "version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/xdebug-handler.git", "url": "https://github.com/composer/xdebug-handler.git",
"reference": "31d57697eb1971712a08031cfaff5a846d10bdf5" "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5", "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
"reference": "31d57697eb1971712a08031cfaff5a846d10bdf5", "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -6235,7 +6235,7 @@ ...@@ -6235,7 +6235,7 @@
"support": { "support": {
"irc": "irc://irc.freenode.org/composer", "irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues", "issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/2.0.0" "source": "https://github.com/composer/xdebug-handler/tree/2.0.1"
}, },
"funding": [ "funding": [
{ {
...@@ -6251,7 +6251,7 @@ ...@@ -6251,7 +6251,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-04-09T19:40:06+00:00" "time": "2021-05-05T19:37:51+00:00"
}, },
{ {
"name": "dnoegel/php-xdg-base-dir", "name": "dnoegel/php-xdg-base-dir",
...@@ -6393,85 +6393,64 @@ ...@@ -6393,85 +6393,64 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v2.19.0", "version": "v3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b" "reference": "c15377bdfa8d1ecf186f1deadec39c89984e1167"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d5b8a9d852b292c2f8a035200fa6844b1f82300b", "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c15377bdfa8d1ecf186f1deadec39c89984e1167",
"reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b", "reference": "c15377bdfa8d1ecf186f1deadec39c89984e1167",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer/semver": "^1.4 || ^2.0 || ^3.0", "composer/semver": "^3.2",
"composer/xdebug-handler": "^1.2 || ^2.0", "composer/xdebug-handler": "^2.0",
"doctrine/annotations": "^1.2", "doctrine/annotations": "^1.12",
"ext-json": "*", "ext-json": "*",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": "^5.6 || ^7.0 || ^8.0", "php": "^7.1.3 || ^8.0",
"php-cs-fixer/diff": "^1.3", "php-cs-fixer/diff": "^2.0",
"symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", "symfony/console": "^4.4.20 || ^5.1.3",
"symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", "symfony/event-dispatcher": "^4.4.20 || ^5.0",
"symfony/filesystem": "^3.0 || ^4.0 || ^5.0", "symfony/filesystem": "^4.4.20 || ^5.0",
"symfony/finder": "^3.0 || ^4.0 || ^5.0", "symfony/finder": "^4.4.20 || ^5.0",
"symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", "symfony/options-resolver": "^4.4.20 || ^5.0",
"symfony/polyfill-php70": "^1.0", "symfony/polyfill-php72": "^1.22",
"symfony/polyfill-php72": "^1.4", "symfony/process": "^4.4.20 || ^5.0",
"symfony/process": "^3.0 || ^4.0 || ^5.0", "symfony/stopwatch": "^4.4.20 || ^5.0"
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
}, },
"require-dev": { "require-dev": {
"justinrainbow/json-schema": "^5.0", "justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^1.4", "keradus/cli-executor": "^1.4",
"mikey179/vfsstream": "^1.6", "mikey179/vfsstream": "^1.6.8",
"php-coveralls/php-coveralls": "^2.4.2", "php-coveralls/php-coveralls": "^2.4.3",
"php-cs-fixer/accessible-object": "^1.0", "php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpspec/prophecy": "^1.10.3",
"phpspec/prophecy-phpunit": "^1.1 || ^2.0", "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5",
"phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1", "phpunitgoodpractices/traits": "^1.9.1",
"sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", "symfony/phpunit-bridge": "^5.2.4",
"symfony/phpunit-bridge": "^5.2.1", "symfony/yaml": "^4.4.20 || ^5.0"
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
}, },
"suggest": { "suggest": {
"ext-dom": "For handling output formats in XML", "ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters.", "ext-mbstring": "For handling non-UTF8 characters.",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
}, },
"bin": [ "bin": [
"php-cs-fixer" "php-cs-fixer"
], ],
"type": "application", "type": "application",
"extra": {
"branch-alias": {
"dev-master": "2.19-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"PhpCsFixer\\": "src/" "PhpCsFixer\\": "src/"
}, }
"classmap": [
"tests/Test/AbstractFixerTestCase.php",
"tests/Test/AbstractIntegrationCaseFactory.php",
"tests/Test/AbstractIntegrationTestCase.php",
"tests/Test/Assert/AssertTokensTrait.php",
"tests/Test/IntegrationCase.php",
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
"tests/Test/InternalIntegrationCaseFactory.php",
"tests/Test/IsIdenticalConstraint.php",
"tests/Test/TokensWithObservedTransformers.php",
"tests/TestCase.php"
]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
...@@ -6490,7 +6469,7 @@ ...@@ -6490,7 +6469,7 @@
"description": "A tool to automatically fix PHP code style", "description": "A tool to automatically fix PHP code style",
"support": { "support": {
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.0" "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.0.0"
}, },
"funding": [ "funding": [
{ {
...@@ -6498,7 +6477,7 @@ ...@@ -6498,7 +6477,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-05-03T21:43:24+00:00" "time": "2021-05-03T21:51:58+00:00"
}, },
{ {
"name": "netresearch/jsonmapper", "name": "netresearch/jsonmapper",
...@@ -6662,16 +6641,16 @@ ...@@ -6662,16 +6641,16 @@
}, },
{ {
"name": "php-cs-fixer/diff", "name": "php-cs-fixer/diff",
"version": "v1.3.1", "version": "v2.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/diff.git", "url": "https://github.com/PHP-CS-Fixer/diff.git",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -6699,21 +6678,18 @@ ...@@ -6699,21 +6678,18 @@
{ {
"name": "Kore Nordmann", "name": "Kore Nordmann",
"email": "mail@kore-nordmann.de" "email": "mail@kore-nordmann.de"
},
{
"name": "SpacePossum"
} }
], ],
"description": "sebastian/diff v2 backport support for PHP5.6", "description": "sebastian/diff v3 backport support for PHP 5.6+",
"homepage": "https://github.com/PHP-CS-Fixer", "homepage": "https://github.com/PHP-CS-Fixer",
"keywords": [ "keywords": [
"diff" "diff"
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/diff/issues", "issues": "https://github.com/PHP-CS-Fixer/diff/issues",
"source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2"
}, },
"time": "2020-10-14T08:39:05+00:00" "time": "2020-10-14T08:32:19+00:00"
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
...@@ -7376,74 +7352,6 @@ ...@@ -7376,74 +7352,6 @@
], ],
"time": "2021-04-11T22:55:21+00:00" "time": "2021-04-11T22:55:21+00:00"
}, },
{
"name": "symfony/polyfill-php70",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "5f03a781d984aae42cebd18e7912fa80f02ee644"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644",
"reference": "5f03a781d984aae42cebd18e7912fa80f02ee644",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "metapackage",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
},
{ {
"name": "symfony/polyfill-php72", "name": "symfony/polyfill-php72",
"version": "v1.22.1", "version": "v1.22.1",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment