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 @@
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^0.12.33",
"phpstan/phpstan-phpunit": "^0.12.13",
"symfony/browser-kit": "^5.2",
......@@ -61,7 +61,7 @@
"@php vendor/bin/php-cs-fixer --ansi fix"
],
"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": [
"@php vendor/bin/simple-phpunit --coverage-html _coverage"
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "57b40959ca3453b1974746244c909952",
"content-hash": "29b59805b8252014983032895931c80b",
"packages": [
{
"name": "api-platform/core",
......@@ -6191,16 +6191,16 @@
},
{
"name": "composer/xdebug-handler",
"version": "2.0.0",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "31d57697eb1971712a08031cfaff5a846d10bdf5"
"reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5",
"reference": "31d57697eb1971712a08031cfaff5a846d10bdf5",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
"reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
"shasum": ""
},
"require": {
......@@ -6235,7 +6235,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"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": [
{
......@@ -6251,7 +6251,7 @@
"type": "tidelift"
}
],
"time": "2021-04-09T19:40:06+00:00"
"time": "2021-05-05T19:37:51+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
......@@ -6393,85 +6393,64 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.19.0",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b"
"reference": "c15377bdfa8d1ecf186f1deadec39c89984e1167"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d5b8a9d852b292c2f8a035200fa6844b1f82300b",
"reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c15377bdfa8d1ecf186f1deadec39c89984e1167",
"reference": "c15377bdfa8d1ecf186f1deadec39c89984e1167",
"shasum": ""
},
"require": {
"composer/semver": "^1.4 || ^2.0 || ^3.0",
"composer/xdebug-handler": "^1.2 || ^2.0",
"doctrine/annotations": "^1.2",
"composer/semver": "^3.2",
"composer/xdebug-handler": "^2.0",
"doctrine/annotations": "^1.12",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^5.6 || ^7.0 || ^8.0",
"php-cs-fixer/diff": "^1.3",
"symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
"symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
"symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
"symfony/finder": "^3.0 || ^4.0 || ^5.0",
"symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
"symfony/polyfill-php70": "^1.0",
"symfony/polyfill-php72": "^1.4",
"symfony/process": "^3.0 || ^4.0 || ^5.0",
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
"php": "^7.1.3 || ^8.0",
"php-cs-fixer/diff": "^2.0",
"symfony/console": "^4.4.20 || ^5.1.3",
"symfony/event-dispatcher": "^4.4.20 || ^5.0",
"symfony/filesystem": "^4.4.20 || ^5.0",
"symfony/finder": "^4.4.20 || ^5.0",
"symfony/options-resolver": "^4.4.20 || ^5.0",
"symfony/polyfill-php72": "^1.22",
"symfony/process": "^4.4.20 || ^5.0",
"symfony/stopwatch": "^4.4.20 || ^5.0"
},
"require-dev": {
"justinrainbow/json-schema": "^5.0",
"justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^1.4",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.4.2",
"php-cs-fixer/accessible-object": "^1.0",
"mikey179/vfsstream": "^1.6.8",
"php-coveralls/php-coveralls": "^2.4.3",
"php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpspec/prophecy": "^1.10.3",
"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/traits": "^1.9.1",
"sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
"symfony/phpunit-bridge": "^5.2.1",
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
"symfony/phpunit-bridge": "^5.2.4",
"symfony/yaml": "^4.4.20 || ^5.0"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"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."
},
"bin": [
"php-cs-fixer"
],
"type": "application",
"extra": {
"branch-alias": {
"dev-master": "2.19-dev"
}
},
"autoload": {
"psr-4": {
"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/",
"license": [
......@@ -6490,7 +6469,7 @@
"description": "A tool to automatically fix PHP code style",
"support": {
"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": [
{
......@@ -6498,7 +6477,7 @@
"type": "github"
}
],
"time": "2021-05-03T21:43:24+00:00"
"time": "2021-05-03T21:51:58+00:00"
},
{
"name": "netresearch/jsonmapper",
......@@ -6662,16 +6641,16 @@
},
{
"name": "php-cs-fixer/diff",
"version": "v1.3.1",
"version": "v2.0.2",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/diff.git",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759"
"reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759",
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3",
"reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3",
"shasum": ""
},
"require": {
......@@ -6699,21 +6678,18 @@
{
"name": "Kore Nordmann",
"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",
"keywords": [
"diff"
],
"support": {
"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",
......@@ -7376,74 +7352,6 @@
],
"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",
"version": "v1.22.1",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment