Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove contao/code-quality again #27

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ jobs:
run: composer install --no-interaction --no-progress

- name: Run Rector
run: vendor/bin/rector --dry-run --no-progress-bar --ansi
run: vendor/bin/rector --dry-run --no-progress-bar

- name: Run ECS
run: vendor/bin/ecs check --no-progress-bar --ansi
run: vendor/bin/ecs check --no-progress-bar

- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"require-dev": {
"ausi/remote-git": "^0.2.5",
"contao/code-quality": "^1.0",
"contao/easy-coding-standard": "^6.12",
"contao/rector": "^1.2",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.5"
Expand Down Expand Up @@ -56,9 +57,9 @@
"@unit-tests",
"@phpstan"
],
"ecs": "@php vendor/bin/ecs check --fix --ansi",
"phpstan": "@php vendor/bin/phpstan analyze --ansi",
"rector": "@php vendor/bin/rector --ansi",
"unit-tests": "@php vendor/bin/phpunit --colors=always"
"ecs": "@php vendor/bin/ecs check --fix",
"phpstan": "@php vendor/bin/phpstan analyze",
"rector": "@php vendor/bin/rector",
"unit-tests": "@php vendor/bin/phpunit"
}
}
7 changes: 5 additions & 2 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
* @license LGPL-3.0-or-later
*/

use Contao\EasyCodingStandard\Set\SetList;
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\Operator\NoUselessConcatOperatorFixer;
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;

return ECSConfig::configure()
->withSets([__DIR__.'/vendor/contao/code-quality/config/ecs.php'])
->withSets([SetList::CONTAO])
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/ecs.php',
__DIR__.'/rector.php',
])
->withSkip([
MethodChainingIndentationFixer::class => [
Expand All @@ -33,5 +36,5 @@
->withParallel()
->withSpacing(Option::INDENTATION_SPACES, "\n")
->withConfiguredRule(HeaderCommentFixer::class, ['header' => "This file is part of Contao.\n\n(c) Leo Feyer\n\n@license LGPL-3.0-or-later"])
->withCache(sys_get_temp_dir().'/ecs_monorepo_cache')
->withCache(sys_get_temp_dir().'/monorepo_ecs_cache')
;
15 changes: 13 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,31 @@

declare(strict_types=1);

/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/

use Contao\Rector\Set\SetList;
use Rector\Config\RectorConfig;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;

return RectorConfig::configure()
->withSets([__DIR__.'/vendor/contao/code-quality/config/rector.php'])
->withSets([SetList::CONTAO])
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/ecs.php',
__DIR__.'/rector.php',
])
->withSkip([
JsonThrowOnErrorRector::class,
NullToStrictStringFuncCallArgRector::class,
])
->withParallel()
->withCache(sys_get_temp_dir().'/rector_monorepo_cache')
->withCache(sys_get_temp_dir().'/monorepo_rector_cache')
;
Loading