Replace TaggedIterator with AutowireIterator across multiple files (#… #23
Annotations
10 warnings
src/CachingStrategy/AssetCache.php#L44
Escaped Mutant for Mutator "UnwrapRtrim":
--- Original
+++ New
@@ @@
public function __construct(ServiceWorker $serviceWorker, #[Autowire(service: 'asset_mapper.public_assets_path_resolver')] PublicAssetsPathResolverInterface $publicAssetsPathResolver, private readonly AssetMapperInterface $assetMapper, private readonly SerializerInterface $serializer, #[Autowire('%kernel.debug%')] bool $debug)
{
$this->workbox = $serviceWorker->workbox;
- $this->assetPublicPrefix = rtrim($publicAssetsPathResolver->resolvePublicPath(''), '/');
+ $this->assetPublicPrefix = $publicAssetsPathResolver->resolvePublicPath('');
$options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR;
if ($debug === true) {
$options |= JSON_PRETTY_PRINT;
|
src/CachingStrategy/AssetCache.php#L55
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
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);
$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) {
|
src/CachingStrategy/AssetCache.php#L57
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
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', [JsonEncode::OPTIONS > $this->jsonOptions]), 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);
|
src/CachingStrategy/AssetCache.php#L61
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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);
}
|
src/CachingStrategy/AssetCache.php#L69
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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()) * 1, $this->workbox->assetCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365));
if (count($urls) > 0) {
$strategy = $strategy->withPreloadUrl(...$urls);
}
|
src/CachingStrategy/AssetCache.php#L69
Escaped Mutant for Mutator "Multiplication":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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);
}
|
src/CachingStrategy/AssetCache.php#L70
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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 * 59 * 24 * 365));
if (count($urls) > 0) {
$strategy = $strategy->withPreloadUrl(...$urls);
}
|
src/CachingStrategy/AssetCache.php#L70
Escaped Mutant for Mutator "Multiplication":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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);
}
|
src/CachingStrategy/AssetCache.php#L70
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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 * 23 * 365));
if (count($urls) > 0) {
$strategy = $strategy->withPreloadUrl(...$urls);
}
|
src/CachingStrategy/AssetCache.php#L70
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
{
$this->logger->debug('Getting cache strategies for assets');
$urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), 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));
+ $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 * 25 * 365));
if (count($urls) > 0) {
$strategy = $strategy->withPreloadUrl(...$urls);
}
|
This job succeeded
Loading