Skip to content

New GH Workflow #629

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

Merged
merged 19 commits into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0aeff74
Remove legacy configuration and redundant files.
Spomky Aug 5, 2025
7ffdd53
Enhance Symfony Console commands with `help` attribute
Spomky Aug 5, 2025
506d5e4
Update CI workflow: refine mutation testing conditions
Spomky Aug 5, 2025
858ba24
Refactor tests and commands: standardize formatting and clean imports
Spomky Aug 5, 2025
6bd5143
Update phpstan-baseline: adjust error messages for constructors and i…
Spomky Aug 5, 2025
0cda33d
Update CI workflow: replace deprecated `=~` operator with `matches` f…
Spomky Aug 5, 2025
5942869
Update CI workflow: simplify branch condition for mutation testing
Spomky Aug 5, 2025
e30211b
Update CI workflow: remove Dockerfile linting step
Spomky Aug 5, 2025
a1ba270
Update .editorconfig and clean up exports in .gitattributes
Spomky Aug 5, 2025
c949b4f
Update CI workflow and remove redundant comment in CallableChecker
Spomky Aug 5, 2025
ed66723
Update CI workflow: add PHP version matrix and dynamic image handling
Spomky Aug 5, 2025
1dfc8bb
Update CI workflow: remove PHP 8.5 and simplify PHPUnit steps
Spomky Aug 5, 2025
240977d
Update CI workflow: add lowest-deps testing and refine cache keys
Spomky Aug 5, 2025
25757c8
Update CI workflow: pass PHP version as environment variable and use …
Spomky Aug 5, 2025
b6eb267
Simplify PHP version fallback logic in `castor.php`
Spomky Aug 5, 2025
6180edb
Refactor `castor.php` tasks to use `composer exec` for consistent com…
Spomky Aug 5, 2025
49c69ac
Fix indentation in `phpstan` task array
Spomky Aug 5, 2025
c3e74e3
Update CI workflow: remove caching for dependencies and PHPUnit results
Spomky Aug 5, 2025
b378410
Update CI workflow and `install` task for dependency installation
Spomky Aug 5, 2025
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
2 changes: 1 addition & 1 deletion deptrac.yaml → .ci-tools/deptrac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
paths:
- './src'
- './../src'
layers:
- name: 'Library'
collectors:
Expand Down
23 changes: 15 additions & 8 deletions ecs.php → .ci-tools/ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer;
use PhpCsFixer\Fixer\Strict\StrictParamFixer;
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer;
use PhpCsFixer\Fixer\Whitespace\CompactNullableTypehintFixer;
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

//use PhpCsFixer\Fixer\Alias\MbStrFunctionsFixer;

return static function (ECSConfig $config): void {
$header = '';
$config->import(SetList::PSR_12);
Expand All @@ -54,11 +53,9 @@
$config->rule(ProtectedToPrivateFixer::class);
$config->rule(DeclareStrictTypesFixer::class);
$config->rule(NativeConstantInvocationFixer::class);
//$config->rule(MbStrFunctionsFixer::class);
$config->rule(LinebreakAfterOpeningTagFixer::class);
$config->rule(CombineConsecutiveIssetsFixer::class);
$config->rule(CombineConsecutiveUnsetsFixer::class);
$config->rule(CompactNullableTypehintFixer::class);
$config->rule(NoSuperfluousElseifFixer::class);
$config->rule(NoSuperfluousPhpdocTagsFixer::class);
$config->rule(PhpdocTrimConsecutiveBlankLineSeparationFixer::class);
Expand Down Expand Up @@ -88,8 +85,18 @@
'import_functions' => true,
]);

$config->skip([PhpUnitTestClassRequiresCoversFixer::class]);
$config->skip([
PhpUnitTestClassRequiresCoversFixer::class,
MethodChainingIndentationFixer::class => [__DIR__ . '/src/Resources/config'],
MethodChainingNewlineFixer::class => [__DIR__ . '/src/Resources/config'],
]);

$config->parallel();
$config->paths([__DIR__]);
$config->skip([__DIR__ . '/.github', __DIR__ . '/.castor.stub.php', __DIR__ . '/var', __DIR__ . '/vendor']);
$config->paths([
__DIR__ . '/../src',
__DIR__ . '/../tests',
__DIR__ . '/../castor.php',
__DIR__ . '/ecs.php',
__DIR__ . '/rector.php',
]);
};
File renamed without changes.
4 changes: 2 additions & 2 deletions phpbench.json → .ci-tools/phpbench.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"runner.bootstrap": "vendor/autoload.php",
"runner.path": "performance",
"runner.bootstrap": "../vendor/bootstrap.php",
"runner.path": "../performance",
"runner.progress": "dots",
"runner.time_unit": "microseconds",
"runner.retry_threshold": 10,
Expand Down
10,441 changes: 10,441 additions & 0 deletions .ci-tools/phpstan-baseline.neon

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions .ci-tools/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
parameters:
level: max
scanDirectories:
- %rootDir%/../../../../phpunit/vendor
- %currentWorkingDirectory%/vendor
paths:
- %currentWorkingDirectory%/src
banned_code:
non_ignorable: false
checkUninitializedProperties: true
treatPhpDocTypesAsCertain: false

includes:
- %currentWorkingDirectory%/.ci-tools/phpstan-baseline.neon
- %rootDir%/conf/bleedingEdge.neon
- %rootDir%/../../ekino/phpstan-banned-code/extension.neon
- %rootDir%/../phpstan-beberlei-assert/extension.neon
- %rootDir%/../phpstan-deprecation-rules/rules.neon
- %rootDir%/../phpstan-doctrine/extension.neon
- %rootDir%/../../ergebnis/phpstan-rules/rules.neon
- %rootDir%/../phpstan-phpunit/extension.neon
- %rootDir%/../phpstan-strict-rules/rules.neon
- %rootDir%/../phpstan-symfony/extension.neon
33 changes: 33 additions & 0 deletions .ci-tools/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="../tests/bootstrap.php"
colors="true"
xsi:noNamespaceSchemaLocation="phpunit.xsd"
cacheDirectory=".phpunit.cache"
>
<coverage/>
<testsuites>
<testsuite name="Test Suite">
<directory>./../tests</directory>
</testsuite>
</testsuites>
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>
<source>
<include>
<directory>./../src</directory>
</include>
<exclude>
<directory>./../vendor</directory>
<directory>./../tests</directory>
</exclude>
</source>
<extensions>
<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>
</extensions>
</phpunit>
348 changes: 348 additions & 0 deletions .ci-tools/phpunit.xsd

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions .ci-tools/rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Symfony73\Rector\Class_\InvokableCommandInputAttributeRector;
use Rector\ValueObject\PhpVersion;

$builder = RectorConfig::configure();
if (file_exists('/tools/.composer/vendor-bin/phpunit/vendor/autoload.php')) {
$builder->withAutoloadPaths(['/tools/.composer/vendor-bin/phpunit/vendor/autoload.php']);
}
$builder->withSets([
SetList::DEAD_CODE,
LevelSetList::UP_TO_PHP_82,
DoctrineSetList::DOCTRINE_CODE_QUALITY,
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
PHPUnitSetList::PHPUNIT_120,
]);
$builder->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true);
$builder->withPhpVersion(PhpVersion::PHP_82);
$builder->withPaths(
[
__DIR__ . '/../src',
__DIR__ . '/../tests',
__DIR__ . '/../castor.php',
__DIR__ . '/../performance',
__DIR__ . '/ecs.php',
__DIR__ . '/rector.php',
]
);
$builder->withSkip([
InvokableCommandInputAttributeRector::class,
PreferPHPUnitThisCallRector::class,
__DIR__ . '/../src/Library/Core/JWKSet.php',
__DIR__ . '/../src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php',
__DIR__ . '/../src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php',
]);
$builder->withParallel();
$builder->withImportNames();

return $builder;
62 changes: 40 additions & 22 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,38 +1,56 @@
# https://EditorConfig.org
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
indent_style = space
# Reduce tab size on GitHub
indent_size = 4
end_of_line = lf
# Change these settings to your own preference
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
block_comment_start = /*
block_comment = *
block_comment_end = */
trim_trailing_whitespace = true

[{*.yml,*.yaml}]
[*.{js,html,ts,tsx}]
indent_size = 2

[*.neon]
indent_style = tab
[*.json]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Makefile]
[*.sh]
indent_style = tab

# Generated file
[*.txt]
indent_size = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[*.xml{,.dist}]
indent_style = space
indent_size = 4

[{*.p12, *.der}]
indent_size = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
[*.{yaml,yml}]
trim_trailing_whitespace = false

[.github/workflows/*.yml]
indent_size = 2

[.gitmodules]
indent_style = tab

[.php_cs{,.dist}]
indent_style = space
indent_size = 4

[composer.json]
indent_size = 4

[{,docker-}compose{,.*}.{yaml,yml}]
indent_style = space
indent_size = 2

[{,*.*}Dockerfile]
indent_style = tab

[{,*.*}Caddyfile]
indent_style = tab
15 changes: 1 addition & 14 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
* text=auto

/.ci-tools export-ignore
/.github export-ignore
/packs export-ignore
/performance export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.gitsplit.yml export-ignore
/.mergify.yml export-ignore
/monorepo-builder.php export-ignore
/CODE_OF_CONDUCT.md export-ignore
/castor.php export-ignore
/deptrac.yaml export-ignore
/ecs.php export-ignore
/infection.json export-ignore
/phpbench.json export-ignore
/phpstan.neon export-ignore
/phpstan-baseline.neon export-ignore
/phpunit.xml.dist export-ignore
/rector.php export-ignore
19 changes: 0 additions & 19 deletions .github/dependabot.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/renovate-global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"branchPrefix": "github-renovate/",
"dependencyDashboardTitle": "Dependency Dashboard self-hosted",
"gitAuthor": "Renovate Bot <[email protected]>",
"onboarding": true,
"onboardingBranch": "github-renovate/configure",
"platform": "github",
"repositories": ['Spomky-Labs/phpwa-demo']
}
Loading
Loading