Skip to content
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

Add display of preloaded URLs in ServiceWorker tab #212

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 46 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ parameters:
count: 1
path: src/CachingStrategy/AssetCache.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/CachingStrategy/BackgroundSync.php

-
message: "#^Only iterables can be unpacked, mixed given in argument \\#1\\.$#"
count: 1
Expand All @@ -35,6 +40,16 @@ parameters:
count: 2
path: src/CachingStrategy/FontCache.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/CachingStrategy/PreloadUrlsGeneratorManager.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/CachingStrategy/ResourceCaches.php

-
message: "#^Only iterables can be unpacked, mixed given in argument \\#1\\.$#"
count: 1
Expand Down Expand Up @@ -120,6 +135,16 @@ parameters:
count: 1
path: src/Command/CreateScreenshotCommand.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/Command/ListCacheStrategiesCommand.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/DataCollector/PwaCollector.php

-
message: "#^Class SpomkyLabs\\\\PwaBundle\\\\Dto\\\\BackgroundSync has an uninitialized property \\$forceSyncFallback\\. Give it default value or assign it in the constructor\\.$#"
count: 1
Expand Down Expand Up @@ -580,6 +605,16 @@ parameters:
count: 1
path: src/Service/FaviconsCompiler.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/Service/ServiceWorkerCompiler.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/ServiceWorkerRule/AppendCacheStrategies.php

-
message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
Expand All @@ -593,4 +628,14 @@ parameters:
-
message: "#^Method SpomkyLabs\\\\PwaBundle\\\\SpomkyLabsPwaBundle\\:\\:loadExtension\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#"
count: 1
path: src/SpomkyLabsPwaBundle.php
path: src/SpomkyLabsPwaBundle.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/Subscriber/FileCompileEventListener.php

-
message: "#^Attribute class Symfony\\\\Component\\\\DependencyInjection\\\\Attribute\\\\TaggedIterator is deprecated\\: since Symfony 7\\.1, use \\{@see AutowireIterator\\} instead\\.$#"
count: 1
path: src/Subscriber/PwaDevServerSubscriber.php
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ini name="intl.error_level" value="0"/>
<ini name="memory_limit" value="-1"/>
<server name="KERNEL_CLASS" value="SpomkyLabs\PwaBundle\Tests\AppKernel"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/>
</php>
<source>
<include>
Expand Down
16 changes: 15 additions & 1 deletion templates/Collector/serviceworker-tab.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
</tr>
</thead>
<tbody>
{% for cachingStrategy in collector.cachingStrategies %}
{% for id, cachingStrategy in collector.cachingStrategies %}
<tr>
<td>{{ cachingStrategy.getName() }}</td>
<td class="break-long-words font-normal">
Expand Down Expand Up @@ -163,6 +163,20 @@
{% endif %}
</td>
</tr>
{% if preloadedUrls > 0 %}
<tr>
<td colspan="5">
<div>
<a class="btn btn-link text-small sf-toggle sf-toggle-off" data-toggle-selector="#data-serialize-{{ id }}" data-toggle-alt-content="Hide preloaded URLs" data-toggle-original-content="Show preloaded URLs">
Show preloaded URLs
</a>
<div id="data-serialize-{{ id }}" class="context sf-toggle-content sf-toggle-hidden">
{{ dump(cachingStrategy.preloadUrls) }}
</div>
</div>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
Expand Down