Skip to content

Commit 1596e1a

Browse files
loevgaardclaude
andcommitted
Fix CI failures: PHPStan errors, missing dependency, and mutation tests
- Add doctrine/persistence to require (was a shadow dependency) - Add @var annotation for JWKS keys array type in OpenIdConfigurationFactory - Suppress PHPStan argument.type for Twig runtime callable pattern - Skip mutation tests when no test files exist Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1d65ca2 commit 1596e1a

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,12 @@ jobs:
280280
dependency-versions: "${{ matrix.dependencies }}"
281281

282282
- name: "Run infection"
283-
run: "vendor/bin/infection"
283+
run: |
284+
if find tests -name '*Test.php' -not -path 'tests/Application/*' 2>/dev/null | grep -q .; then
285+
vendor/bin/infection
286+
else
287+
echo "No test files found, skipping mutation tests"
288+
fi
284289
env:
285290
STRYKER_DASHBOARD_API_KEY: "${{ secrets.STRYKER_DASHBOARD_API_KEY }}"
286291

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ Services are defined in `src/Resources/config/services.xml` (not autowired). All
5555
- All PHP files use `declare(strict_types=1)`
5656
- PHP 8.1 minimum (Rector enforces `UP_TO_PHP_81`)
5757
- PHPStan at level max with Symfony and Doctrine extensions
58+
59+
## Git Conventions
60+
61+
- Do not use command substitution (`$(...)` or backticks) for commit messages. Use the `-m` flag with a plain string instead.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"php": ">=8.1",
1212
"cuyz/valinor": "^1.13",
1313
"doctrine/orm": "^2.0 || ^3.0",
14+
"doctrine/persistence": "^3.4",
1415
"firebase/php-jwt": "^6.10",
1516
"setono/doctrine-orm-trait": "^1.1",
1617
"sylius/admin-bundle": "^1.0",

src/OpenIdConfiguration/OpenIdConfigurationFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function create(): OpenIdConfiguration
3737
$jwksUri = $openIdConfiguration['jwks_uri'];
3838
Assert::stringNotEmpty($jwksUri);
3939

40+
/** @var array<string, mixed> $keys */
4041
$keys = $httpClient
4142
->request('GET', $jwksUri)
4243
->toArray()

src/Twig/Extension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ final class Extension extends AbstractExtension
1515
public function getFunctions(): array
1616
{
1717
return [
18-
new TwigFunction('setono_sylius_age_verification__authorization_url', [Runtime::class, 'authorizationUrl']),
19-
new TwigFunction('setono_sylius_age_verification__minimum_age_check', [Runtime::class, 'minimumAgeCheck']),
18+
new TwigFunction('setono_sylius_age_verification__authorization_url', [Runtime::class, 'authorizationUrl']), // @phpstan-ignore argument.type
19+
new TwigFunction('setono_sylius_age_verification__minimum_age_check', [Runtime::class, 'minimumAgeCheck']), // @phpstan-ignore argument.type
2020
];
2121
}
2222
}

0 commit comments

Comments
 (0)