Enhance GitHub Actions with Composer cache optimization #91
infection.yml
on: push
5️⃣ Mutation Testing
5m 5s
Annotations
11 warnings
5️⃣ Mutation Testing
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
5️⃣ Mutation Testing:
src/stimulus/src/WebauthnStimulusBundle.php#L16
Escaped Mutant for Mutator "LogicalNot":
@@ @@
{
public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void
{
- if (!$this->isAssetMapperAvailable($builder)) {
+ if ($this->isAssetMapperAvailable($builder)) {
return;
}
$builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => [__DIR__ . '/../assets/dist' => '@web-auth/webauthn-stimulus']]]);
|
5️⃣ Mutation Testing:
src/stimulus/src/WebauthnStimulusBundle.php#L20
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
if (!$this->isAssetMapperAvailable($builder)) {
return;
}
- $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => [__DIR__ . '/../assets/dist' => '@web-auth/webauthn-stimulus']]]);
+ $builder->prependExtensionConfig('framework', []);
}
private function isAssetMapperAvailable(ContainerBuilder $container): bool
{
|
5️⃣ Mutation Testing:
src/stimulus/src/WebauthnStimulusBundle.php#L20
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
if (!$this->isAssetMapperAvailable($builder)) {
return;
}
- $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => [__DIR__ . '/../assets/dist' => '@web-auth/webauthn-stimulus']]]);
+
}
private function isAssetMapperAvailable(ContainerBuilder $container): bool
{
|
5️⃣ Mutation Testing:
src/stimulus/src/WebauthnStimulusBundle.php#L21
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
if (!$this->isAssetMapperAvailable($builder)) {
return;
}
- $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => [__DIR__ . '/../assets/dist' => '@web-auth/webauthn-stimulus']]]);
+ $builder->prependExtensionConfig('framework', ['asset_mapper' => []]);
}
private function isAssetMapperAvailable(ContainerBuilder $container): bool
{
|
5️⃣ Mutation Testing:
src/stimulus/src/WebauthnStimulusBundle.php#L22
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
if (!$this->isAssetMapperAvailable($builder)) {
return;
}
- $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => [__DIR__ . '/../assets/dist' => '@web-auth/webauthn-stimulus']]]);
+ $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => []]]);
}
private function isAssetMapperAvailable(ContainerBuilder $container): bool
{
|
5️⃣ Mutation Testing:
src/stimulus/src/WebauthnStimulusBundle.php#L23
Escaped Mutant for Mutator "Concat":
@@ @@
if (!$this->isAssetMapperAvailable($builder)) {
return;
}
- $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => [__DIR__ . '/../assets/dist' => '@web-auth/webauthn-stimulus']]]);
+ $builder->prependExtensionConfig('framework', ['asset_mapper' => ['paths' => ['/../assets/dist' . __DIR__ => '@web-auth/webauthn-stimulus']]]);
}
private function isAssetMapperAvailable(ContainerBuilder $container): bool
{
|
5️⃣ Mutation Testing:
src/symfony/src/DependencyInjection/Configuration.php#L38
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$treeBuilder = new TreeBuilder($this->alias);
/** @var ArrayNodeDefinition $rootNode */
$rootNode = $treeBuilder->getRootNode();
- $rootNode->addDefaultsIfNotSet()->beforeNormalization()->ifArray()->then(static function ($v): array {
- if (!isset($v['creation_profiles'])) {
- $v['creation_profiles'] = null;
- }
- if (!isset($v['request_profiles'])) {
- $v['request_profiles'] = null;
- }
- return $v;
- })->end()->end();
+
$rootNode->children()->scalarNode('fake_credential_generator')->defaultValue(SimpleFakeCredentialGenerator::class)->cannotBeEmpty()->info('A service that implements the FakeCredentialGenerator to generate fake credentials for preventing username enumeration.')->end()->scalarNode('clock')->defaultValue('webauthn.clock.default')->info('PSR-20 Clock service.')->end()->scalarNode('event_dispatcher')->defaultValue(EventDispatcherInterface::class)->info('PSR-14 Event Dispatcher service.')->end()->scalarNode('http_client')->cannotBeEmpty()->defaultValue('webauthn.http_client.default')->info('A Symfony HTTP client.')->end()->scalarNode('logger')->defaultValue('webauthn.logger.default')->info('A PSR-3 logger to receive logs during the processes')->end()->scalarNode('credential_repository')->cannotBeEmpty()->defaultValue(DummyPublicKeyCredentialSourceRepository::class)->info('This repository is responsible of the credential storage')->end()->scalarNode('user_repository')->cannotBeEmpty()->defaultValue(DummyPublicKeyCredentialUserEntityRepository::class)->info('This repository is responsible of the user storage')->end()->arrayNode('secured_rp_ids')->treatFalseLike(null)->treatTrueLike(null)->treatNullLike(null)->useAttributeAsKey('name')->scalarPrototype()->end()->end()->scalarNode('counter_checker')->defaultValue(ThrowExceptionIfInvalid::class)->cannotBeEmpty()->info('This service will check if the counter is valid. By default it throws an exception (recommended).')->end()->scalarNode('top_origin_validator')->defaultNull()->info('For cross origin (e.g. iframe), this service will be in charge of verifying the top origin.')->end()->end();
$this->addCreationProfilesConfig($rootNode);
$this->addRequestProfilesConfig($rootNode);
|
5️⃣ Mutation Testing:
src/symfony/src/DependencyInjection/Configuration.php#L43
Escaped Mutant for Mutator "LogicalNot":
@@ @@
/** @var ArrayNodeDefinition $rootNode */
$rootNode = $treeBuilder->getRootNode();
$rootNode->addDefaultsIfNotSet()->beforeNormalization()->ifArray()->then(static function ($v): array {
- if (!isset($v['creation_profiles'])) {
+ if (isset($v['creation_profiles'])) {
$v['creation_profiles'] = null;
}
if (!isset($v['request_profiles'])) {
|
5️⃣ Mutation Testing:
src/symfony/src/DependencyInjection/Configuration.php#L46
Escaped Mutant for Mutator "LogicalNot":
@@ @@
if (!isset($v['creation_profiles'])) {
$v['creation_profiles'] = null;
}
- if (!isset($v['request_profiles'])) {
+ if (isset($v['request_profiles'])) {
$v['request_profiles'] = null;
}
return $v;
|
5️⃣ Mutation Testing:
src/symfony/src/DependencyInjection/Configuration.php#L123
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
{
$errorTemplate = 'Invalid value "%s"';
/** @noRector Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector */
- $defaultCreationProfiles = ['default' => ['rp' => ['name' => 'Secured Application']]];
+ $defaultCreationProfiles = [];
$rootNode->children()->arrayNode('creation_profiles')->treatFalseLike($defaultCreationProfiles)->treatNullLike($defaultCreationProfiles)->treatTrueLike($defaultCreationProfiles)->useAttributeAsKey('name')->arrayPrototype()->addDefaultsIfNotSet()->children()->arrayNode('rp')->isRequired()->children()->scalarNode('id')->defaultNull()->end()->scalarNode('name')->isRequired()->end()->scalarNode('icon')->setDeprecated('web-auth/webauthn-symfony-bundle', '5.1.0', 'The child node "%node%" at path "%path%" is deprecated and has no effect.')->defaultNull()->end()->end()->end()->integerNode('challenge_length')->min(16)->defaultValue(32)->end()->integerNode('timeout')->min(0)->defaultNull()->end()->arrayNode('authenticator_selection_criteria')->addDefaultsIfNotSet()->beforeNormalization()->ifArray()->then(function (array $v): array {
if (isset($v['attachment_mode'])) {
$v['authenticator_attachment'] = $v['attachment_mode'];
|