Skip to content

Update struggle-for-php/sfp-phpstan-psr-log requirement from ^0.20.0 … #33

Update struggle-for-php/sfp-phpstan-psr-log requirement from ^0.20.0 …

Update struggle-for-php/sfp-phpstan-psr-log requirement from ^0.20.0 … #33

Triggered via push October 5, 2024 13:00
Status Success
Total duration 1m 58s
Artifacts

infection.yml

on: push
0️⃣ Mutation Testing
1m 49s
0️⃣ Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L101
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ $assets[] = $asset->publicPath; } } - $this->logger->debug('Preloading assets', ['assets' => $assets]); + return $assets; } }
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L47
Escaped Mutant for Mutator "TrueValue": @@ @@ $this->workbox = $serviceWorker->workbox; $this->assetPublicPrefix = rtrim($publicAssetsPathResolver->resolvePublicPath(''), '/'); $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; - if ($debug === true) { + if ($debug === false) { $options |= JSON_PRETTY_PRINT; } $this->jsonOptions = $options;
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L47
Escaped Mutant for Mutator "Identical": @@ @@ $this->workbox = $serviceWorker->workbox; $this->assetPublicPrefix = rtrim($publicAssetsPathResolver->resolvePublicPath(''), '/'); $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; - if ($debug === true) { + if ($debug !== true) { $options |= JSON_PRETTY_PRINT; } $this->jsonOptions = $options;
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L57
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ public function getCacheStrategies(): array { $this->logger->debug('Getting cache strategies for assets'); - $urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); + $urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', []), true); $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->assetCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, sprintf("({url}) => url.pathname.startsWith('%s')", $this->assetPublicPrefix))->withName($this->workbox->assetCache->cacheName)->withPlugin(ExpirationPlugin::create(count($this->getAssets()) * 2, $this->workbox->assetCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls);
0️⃣ Mutation Testing: src/CachingStrategy/BackgroundSync.php#L41
Escaped Mutant for Mutator "Foreach_": @@ @@ { $this->logger->debug('Getting cache strategies for background sync'); $strategies = []; - foreach ($this->workbox->backgroundSync as $sync) { + foreach ([] as $sync) { $strategies[] = WorkboxCacheStrategy::create($this->workbox->enabled, true, CacheStrategyInterface::STRATEGY_NETWORK_ONLY, $this->prepareMatchCallback($sync->matchCallback))->withName('Background Sync')->withPlugin(BackgroundSyncPlugin::create($sync->queueName, $sync->maxRetentionTime, $sync->forceSyncFallback, $sync->broadcastChannel, $sync->errorOn4xx, $sync->errorOn5xx, $sync->expectRedirect, $sync->expectedStatusCodes))->withMethod($sync->method); } $this->logger->debug('Background sync strategies', ['strategies' => $strategies]);
0️⃣ Mutation Testing: src/CachingStrategy/BackgroundSync.php#L63
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ foreach ($this->workbox->backgroundSync as $sync) { $strategies[] = WorkboxCacheStrategy::create($this->workbox->enabled, true, CacheStrategyInterface::STRATEGY_NETWORK_ONLY, $this->prepareMatchCallback($sync->matchCallback))->withName('Background Sync')->withPlugin(BackgroundSyncPlugin::create($sync->queueName, $sync->maxRetentionTime, $sync->forceSyncFallback, $sync->broadcastChannel, $sync->errorOn4xx, $sync->errorOn5xx, $sync->expectRedirect, $sync->expectedStatusCodes))->withMethod($sync->method); } - $this->logger->debug('Background sync strategies', ['strategies' => $strategies]); + $this->logger->debug('Background sync strategies', []); return $strategies; } public function setLogger(LoggerInterface $logger): void
0️⃣ Mutation Testing: src/CachingStrategy/BackgroundSync.php#L67
Escaped Mutant for Mutator "ArrayOneItem": @@ @@ $strategies[] = WorkboxCacheStrategy::create($this->workbox->enabled, true, CacheStrategyInterface::STRATEGY_NETWORK_ONLY, $this->prepareMatchCallback($sync->matchCallback))->withName('Background Sync')->withPlugin(BackgroundSyncPlugin::create($sync->queueName, $sync->maxRetentionTime, $sync->forceSyncFallback, $sync->broadcastChannel, $sync->errorOn4xx, $sync->errorOn5xx, $sync->expectRedirect, $sync->expectedStatusCodes))->withMethod($sync->method); } $this->logger->debug('Background sync strategies', ['strategies' => $strategies]); - return $strategies; + return count($strategies) > 1 ? array_slice($strategies, 0, 1, true) : $strategies; } public function setLogger(LoggerInterface $logger): void {
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L40
Escaped Mutant for Mutator "BitwiseOr": @@ @@ public function __construct(ServiceWorker $serviceWorker, private readonly AssetMapperInterface $assetMapper, private readonly SerializerInterface $serializer, #[Autowire(param: 'kernel.debug')] bool $debug) { $this->workbox = $serviceWorker->workbox; - $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; + $options = JSON_UNESCAPED_SLASHES & JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; if ($debug === true) { $options |= JSON_PRETTY_PRINT; }
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L40
Escaped Mutant for Mutator "BitwiseOr": @@ @@ public function __construct(ServiceWorker $serviceWorker, private readonly AssetMapperInterface $assetMapper, private readonly SerializerInterface $serializer, #[Autowire(param: 'kernel.debug')] bool $debug) { $this->workbox = $serviceWorker->workbox; - $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; + $options = (JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) & JSON_THROW_ON_ERROR; if ($debug === true) { $options |= JSON_PRETTY_PRINT; }
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L41
Escaped Mutant for Mutator "Identical": @@ @@ { $this->workbox = $serviceWorker->workbox; $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; - if ($debug === true) { + if ($debug !== true) { $options |= JSON_PRETTY_PRINT; } $this->jsonOptions = $options;