Skip to content

Commit

Permalink
Cleanup/Optimize some qa-related settings (#3821)
Browse files Browse the repository at this point in the history
This will speed up local qa and may also speed up CI-qa runs.

- Activate all available caches
- Point all caches to build/ directory
- Don't use verbose for php-cs-fixer as its output (especially when using caching) is too big
- Removed ununsed phpunit.xml.dist
- Add phpstorm-meta file for providing type overrides
  • Loading branch information
usox committed Feb 14, 2024
1 parent d4d6d59 commit c58a4bb
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
.buildpath
.env
.pc
.php_cs.cache
.phpunit.result.cache
.project
bootstrap/
build/
Expand Down Expand Up @@ -53,3 +51,4 @@ web.config
*.swp
*.v11.suo
*~
.php-cs-fixer.cache
6 changes: 3 additions & 3 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
->in('tests/')
;

$config = new PhpCsFixer\Config();
return $config->setRules([
return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'binary_operator_spaces' => [
'operators' => ['=' => 'align']
Expand Down Expand Up @@ -50,8 +50,8 @@
'no_unused_imports' => true,
])
->setIndent(" ")
->setUsingCache(false)
->setFinder($finder)
->setLineEnding("\n")
->setUsingCache(true)
;

10 changes: 10 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
namespace PHPSTORM_META
{
override(\Psr\Container\ContainerInterface::get(0), map([
'' => '@',
]));
override(\DI\Container::get(0), map([
'' => '@',
]));
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@
"stan-baseline": "vendor/bin/phpstan --generate-baseline",
"tests": "vendor/bin/phpunit tests",
"syntax": "resources/scripts/tests/syntax.sh",
"cs:fix": "vendor/bin/php-cs-fixer fix -v",
"cs:check": "vendor/bin/php-cs-fixer fix --dry-run -v",
"cs:fix": "vendor/bin/php-cs-fixer fix",
"cs:check": "vendor/bin/php-cs-fixer fix --dry-run",
"post-autoload-dump": [
"@php resources/scripts/composer/check_tag_tools.php"
],
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
backupGlobals="true"
bootstrap="tests/bootstrap.php"
colors="true"
cacheResultFile="build/.phpunit.result.cache"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
Expand Down
26 changes: 0 additions & 26 deletions phpunit.xml.dist

This file was deleted.

2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

declare(strict_types=1);

use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
Expand All @@ -12,6 +13,7 @@
->withPaths([
__DIR__ . '/tests',
])
->withCache(__DIR__ . '/build/rector', FileCacheStorage::class)
->withImportNames()
->withRules([
InlineConstructorDefaultToPropertyRector::class
Expand Down

0 comments on commit c58a4bb

Please sign in to comment.