Skip to content

Commit 4737415

Browse files
committed
Merge branch '4.1.x' into temp-ef4654
# Conflicts: # phpstan-baseline.neon
2 parents 2362f23 + 954f80f commit 4737415

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+11610
-6513
lines changed

deptrac.yaml renamed to .ci-tools/deptrac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
paths:
3-
- './src'
3+
- './../src'
44
layers:
55
- name: 'Library'
66
collectors:

ecs.php renamed to .ci-tools/ecs.php

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@
2525
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer;
2626
use PhpCsFixer\Fixer\Strict\StrictParamFixer;
2727
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer;
28-
use PhpCsFixer\Fixer\Whitespace\CompactNullableTypehintFixer;
28+
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
29+
use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer;
2930
use Symplify\EasyCodingStandard\Config\ECSConfig;
3031
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
3132

32-
//use PhpCsFixer\Fixer\Alias\MbStrFunctionsFixer;
33-
3433
return static function (ECSConfig $config): void {
3534
$header = '';
3635
$config->import(SetList::PSR_12);
@@ -54,11 +53,9 @@
5453
$config->rule(ProtectedToPrivateFixer::class);
5554
$config->rule(DeclareStrictTypesFixer::class);
5655
$config->rule(NativeConstantInvocationFixer::class);
57-
//$config->rule(MbStrFunctionsFixer::class);
5856
$config->rule(LinebreakAfterOpeningTagFixer::class);
5957
$config->rule(CombineConsecutiveIssetsFixer::class);
6058
$config->rule(CombineConsecutiveUnsetsFixer::class);
61-
$config->rule(CompactNullableTypehintFixer::class);
6259
$config->rule(NoSuperfluousElseifFixer::class);
6360
$config->rule(NoSuperfluousPhpdocTagsFixer::class);
6461
$config->rule(PhpdocTrimConsecutiveBlankLineSeparationFixer::class);
@@ -88,8 +85,18 @@
8885
'import_functions' => true,
8986
]);
9087

91-
$config->skip([PhpUnitTestClassRequiresCoversFixer::class]);
88+
$config->skip([
89+
PhpUnitTestClassRequiresCoversFixer::class,
90+
MethodChainingIndentationFixer::class => [__DIR__ . '/src/Resources/config'],
91+
MethodChainingNewlineFixer::class => [__DIR__ . '/src/Resources/config'],
92+
]);
93+
9294
$config->parallel();
93-
$config->paths([__DIR__]);
94-
$config->skip([__DIR__ . '/.github', __DIR__ . '/.castor.stub.php', __DIR__ . '/var', __DIR__ . '/vendor']);
95+
$config->paths([
96+
__DIR__ . '/../src',
97+
__DIR__ . '/../tests',
98+
__DIR__ . '/../castor.php',
99+
__DIR__ . '/ecs.php',
100+
__DIR__ . '/rector.php',
101+
]);
95102
};
File renamed without changes.

phpbench.json renamed to .ci-tools/phpbench.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"runner.bootstrap": "vendor/autoload.php",
3-
"runner.path": "performance",
2+
"runner.bootstrap": "../vendor/bootstrap.php",
3+
"runner.path": "../performance",
44
"runner.progress": "dots",
55
"runner.time_unit": "microseconds",
66
"runner.retry_threshold": 10,

.ci-tools/phpstan-baseline.neon

Lines changed: 10435 additions & 0 deletions
Large diffs are not rendered by default.

.ci-tools/phpstan.neon

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
parameters:
2+
level: max
3+
scanDirectories:
4+
- %rootDir%/../../../../phpunit/vendor
5+
- %currentWorkingDirectory%/vendor
6+
paths:
7+
- %currentWorkingDirectory%/src
8+
banned_code:
9+
non_ignorable: false
10+
checkUninitializedProperties: true
11+
treatPhpDocTypesAsCertain: false
12+
13+
includes:
14+
- %currentWorkingDirectory%/.ci-tools/phpstan-baseline.neon
15+
- %rootDir%/conf/bleedingEdge.neon
16+
- %rootDir%/../../ekino/phpstan-banned-code/extension.neon
17+
- %rootDir%/../phpstan-beberlei-assert/extension.neon
18+
- %rootDir%/../phpstan-deprecation-rules/rules.neon
19+
- %rootDir%/../phpstan-doctrine/extension.neon
20+
- %rootDir%/../../ergebnis/phpstan-rules/rules.neon
21+
- %rootDir%/../phpstan-phpunit/extension.neon
22+
- %rootDir%/../phpstan-strict-rules/rules.neon
23+
- %rootDir%/../phpstan-symfony/extension.neon

.ci-tools/phpunit.xml.dist

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
bootstrap="../tests/bootstrap.php"
5+
colors="true"
6+
xsi:noNamespaceSchemaLocation="phpunit.xsd"
7+
cacheDirectory=".phpunit.cache"
8+
>
9+
<coverage/>
10+
<testsuites>
11+
<testsuite name="Test Suite">
12+
<directory>./../tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
<php>
16+
<ini name="display_errors" value="1" />
17+
<ini name="error_reporting" value="-1" />
18+
<server name="APP_ENV" value="test" force="true" />
19+
<server name="SHELL_VERBOSITY" value="-1" />
20+
</php>
21+
<source>
22+
<include>
23+
<directory>./../src</directory>
24+
</include>
25+
<exclude>
26+
<directory>./../vendor</directory>
27+
<directory>./../tests</directory>
28+
</exclude>
29+
</source>
30+
<extensions>
31+
<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>
32+
</extensions>
33+
</phpunit>

.ci-tools/phpunit.xsd

Lines changed: 348 additions & 0 deletions
Large diffs are not rendered by default.

.ci-tools/rector.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
use Rector\Doctrine\Set\DoctrineSetList;
7+
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
8+
use Rector\PHPUnit\Set\PHPUnitSetList;
9+
use Rector\Set\ValueObject\LevelSetList;
10+
use Rector\Set\ValueObject\SetList;
11+
use Rector\Symfony\Symfony73\Rector\Class_\InvokableCommandInputAttributeRector;
12+
use Rector\ValueObject\PhpVersion;
13+
14+
$builder = RectorConfig::configure();
15+
if (file_exists('/tools/.composer/vendor-bin/phpunit/vendor/autoload.php')) {
16+
$builder->withAutoloadPaths(['/tools/.composer/vendor-bin/phpunit/vendor/autoload.php']);
17+
}
18+
$builder->withSets([
19+
SetList::DEAD_CODE,
20+
LevelSetList::UP_TO_PHP_82,
21+
DoctrineSetList::DOCTRINE_CODE_QUALITY,
22+
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
23+
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
24+
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
25+
PHPUnitSetList::PHPUNIT_120,
26+
]);
27+
$builder->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true);
28+
$builder->withPhpVersion(PhpVersion::PHP_82);
29+
$builder->withPaths(
30+
[
31+
__DIR__ . '/../src',
32+
__DIR__ . '/../tests',
33+
__DIR__ . '/../castor.php',
34+
__DIR__ . '/../performance',
35+
__DIR__ . '/ecs.php',
36+
__DIR__ . '/rector.php',
37+
]
38+
);
39+
$builder->withSkip([
40+
InvokableCommandInputAttributeRector::class,
41+
PreferPHPUnitThisCallRector::class,
42+
__DIR__ . '/../src/Library/Core/JWKSet.php',
43+
__DIR__ . '/../src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php',
44+
__DIR__ . '/../src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php',
45+
]);
46+
$builder->withParallel();
47+
$builder->withImportNames();
48+
49+
return $builder;

.editorconfig

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,56 @@
1-
# https://EditorConfig.org
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
24

35
root = true
46

57
[*]
6-
indent_style = space
7-
# Reduce tab size on GitHub
8-
indent_size = 4
9-
end_of_line = lf
8+
# Change these settings to your own preference
109
charset = utf-8
11-
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
indent_size = 4
12+
indent_style = space
1213
insert_final_newline = true
13-
block_comment_start = /*
14-
block_comment = *
15-
block_comment_end = */
14+
trim_trailing_whitespace = true
1615

17-
[{*.yml,*.yaml}]
16+
[*.{js,html,ts,tsx}]
1817
indent_size = 2
1918

20-
[*.neon]
21-
indent_style = tab
19+
[*.json]
20+
indent_size = 2
2221

2322
[*.md]
2423
trim_trailing_whitespace = false
2524

26-
[Makefile]
25+
[*.sh]
2726
indent_style = tab
2827

29-
# Generated file
30-
[*.txt]
31-
indent_size = unset
32-
trim_trailing_whitespace = unset
33-
insert_final_newline = unset
28+
[*.xml{,.dist}]
29+
indent_style = space
30+
indent_size = 4
3431

35-
[{*.p12, *.der}]
36-
indent_size = unset
37-
trim_trailing_whitespace = unset
38-
insert_final_newline = unset
32+
[*.{yaml,yml}]
33+
trim_trailing_whitespace = false
34+
35+
[.github/workflows/*.yml]
36+
indent_size = 2
37+
38+
[.gitmodules]
39+
indent_style = tab
40+
41+
[.php_cs{,.dist}]
42+
indent_style = space
43+
indent_size = 4
44+
45+
[composer.json]
46+
indent_size = 4
47+
48+
[{,docker-}compose{,.*}.{yaml,yml}]
49+
indent_style = space
50+
indent_size = 2
51+
52+
[{,*.*}Dockerfile]
53+
indent_style = tab
54+
55+
[{,*.*}Caddyfile]
56+
indent_style = tab

0 commit comments

Comments
 (0)