Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pwa Bundle Laravel Package

spomky-labs/pwa-bundle

spomky-labs/pwa-bundle is a Symfony bundle that adds Progressive Web App capabilities to PHP applications, helping generate manifests, service workers, icons, and offline support with minimal configuration.

View on GitHub
Deep Wiki
Context7

Progressive web apps for Symfony: manifest, service worker and offline support.

Frequently asked questions about Pwa Bundle
Can I use spomky-labs/pwa-bundle in a Laravel application?
Technically yes, but it is a Symfony bundle, not a Laravel package, so there is no native service provider or config/packages YAML convention to hook into. You would have to install Symfony components like http-kernel, dependency-injection and config, then write a custom Laravel service provider to boot the bundle and expose its routes. For most Laravel projects the effort outweighs the benefit, and a Laravel-native PWA package or a small hand-rolled manifest plus service worker route is a better fit.
How do I install and configure spomky-labs/pwa-bundle?
Installation is via Composer, then you register the bundle in the Symfony kernel's bundles.php and configure it through config/packages/pwa.yaml. The bundle relies on Symfony's dependency injection container, event dispatchers and Twig extension points to generate the manifest, service worker and icons. In Laravel none of those conventions exist, so you would need to translate the YAML configuration into a Laravel config file and rebuild the registration step manually.
Which PHP and Symfony versions does pwa-bundle require, and does it support my Laravel version?
The package declares no Laravel support at all; its constraints target PHP and specific Symfony component versions listed in its composer.json. You must check those constraints against your application's PHP version and existing vendor tree before attempting an install. Because the bundle pulls Symfony components into the dependency graph, version conflicts with packages already in a Laravel app are a realistic risk and should be verified with a Composer dry run first.
What PWA features does spomky-labs/pwa-bundle provide out of the box?
The bundle handles web app manifest generation, service worker generation, icon sets, offline support, caching strategies and push notifications, all driven by configuration. It also provides Symfony/Twig integration so templates can reference manifest and icon paths. These features are framework-agnostic in concept, but the delivery mechanism (routes, DI configuration, Twig helpers) is Symfony-specific and must be reimplemented for Laravel.
How much glue code is needed to bridge a Symfony bundle into Laravel?
Expect a substantial custom integration: a Laravel service provider that registers and boots the bundle, Symfony component dependencies pinned in composer.json, a translation layer from the bundle's YAML config to Laravel config, and custom route registration for the manifest and service-worker endpoints. You also need to map the bundle's expected asset and icon layout onto Laravel's public directory and asset pipeline. This is greenfield integration work, not a drop-in swap from an existing Laravel PWA package, and someone must own that glue code long term.
Does pwa-bundle work if symfony/translation is not installed?
Yes. Release 1.5.14 fixed a graceful-degradation issue (PR #471) so the bundle provides raw text when symfony/translation is absent. This matters for Laravel integrations, because a Laravel bridge is unlikely to pull in the Symfony translation component and would previously have hit runtime errors in that partial-install scenario. It is a bugfix-only release with no breaking changes, deprecations or new features.
How do I serve the manifest and service worker routes from a Laravel app?
The bundle normally registers its own Symfony routes for the manifest and service worker, so in Laravel you must expose equivalent endpoints through Laravel's router instead. A common approach is a controller that returns the generated manifest JSON with the correct content type, and a route serving the service worker JavaScript from the public directory with the right scope. Make sure the service worker is served from the site root scope and with no aggressive caching headers, or browsers will keep stale copies.
How do I test PWA manifest, service worker and offline behaviour?
Verify that the manifest endpoint returns valid JSON with name, start_url, icons and display set correctly, and that the service worker response has a JavaScript content type and root scope. Use Chrome DevTools Application panel and Lighthouse audits to confirm installability, cache strategies and offline fallback behaviour. Service workers only register over HTTPS or on localhost, so test both a local environment and a staging deployment behind TLS. In a Laravel bridge, add feature tests that hit the manifest and service worker routes to catch regressions.
What are the alternatives to spomky-labs/pwa-bundle for Laravel?
Laravel-native PWA packages exist that publish a manifest and service worker through Artisan commands and Blade directives, which avoids the Symfony dependency tree entirely. For simpler requirements, a small custom implementation (a manifest route, a static service worker file and a handful of icons) is often enough and stays fully under your control. If push notifications are required, Laravel's notification and broadcasting ecosystem usually covers the server side better than a Symfony bundle would. Treat adopting this bundle as an evaluate-and-reject decision unless your runtime already includes Symfony components.
Is spomky-labs/pwa-bundle actively maintained and is upgrading it risky?
The 1.5.x line is an active patch stream, and 1.5.14 is a bugfix-only release with no breaking changes, so individual upgrades are low risk. The ongoing cost is tracking those releases, since maintainers target Symfony and Laravel-specific issues will not be fixed upstream. In a mixed or legacy stack where Symfony components already exist the bundle is reasonable, but in a pure Laravel application the framework impedance mismatch and support boundary are the main concerns.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo