nowo-tech / wallet-qr-bundle
Symfony bundle to generate Google Wallet and Apple Wallet save links with QR codes for Android and iOS.
Package info
github.com/nowo-tech/WalletQRBundle
Language:Shell
Type:symfony-bundle
pkg:composer/nowo-tech/wallet-qr-bundle
Fund package maintenance!
Requires
- php: >=8.2 <8.6
- firebase/php-jwt: ^7.0
- nowo-tech/qr-code-bundle: ^1.4.9
- symfony/config: ^7.0 || ^8.0
- symfony/dependency-injection: ^7.0 || ^8.0
- symfony/framework-bundle: ^7.0 || ^8.0
- symfony/http-kernel: ^7.0 || ^8.0
- symfony/twig-bundle: ^7.0 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- igor-php/igor-php: ^0.9.7
- nowo-tech/phpstan-frankenphp: ^1.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0
- rector/rector: ^2.0
- symfony/yaml: ^7.0 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project. 📋 Requires PHP 8.2+ and Symfony 7.x or 8.x (CI matrix includes Symfony 7.4, 8.0, 8.1)
FrankenPHP demos: runtime is selected with FRANKENPHP_MODE (worker default, or classic for per-request PHP / hot-reload). See docs/DEMO-FRANKENPHP.md.
Symfony bundle to generate Google Wallet (Android) and Apple Wallet (iOS) save links with QR codes.
QR rendering requires the mandatory dependency QrCodeBundle (nowo-tech/qr-code-bundle), which Composer installs automatically. You can also use it standalone for QR codes outside wallet flows.
This bundle is FrankenPHP worker mode friendly (including when the kernel is not reset between requests). See docs/FRANKENPHP-WORKER-AUDIT.md.
Features
- ✅ Google Wallet Add to Google Wallet save links (signed JWT)
- ✅ Apple Wallet
.pkpassdownload URL builder for iOS QR codes - ✅ PNG QR codes as data URIs via required QrCodeBundle (Twig helpers included)
- ✅ Pair generation for Android + iOS in one call
- ✅ Symfony configuration under
nowo_wallet_qr - ✅ URL validation for custom QR links (
QrUrlPolicy; optional host allowlist) - ✅ Demo apps for Symfony 7 and 8 (FrankenPHP)
Quick start
composer require nowo-tech/wallet-qr-bundle
nowo-tech/qr-code-bundle is pulled in as a required dependency. Register both bundles (Flex does this via the recipe):
Nowo\QrCodeBundle\NowoQrCodeBundle::class => ['all' => true], Nowo\WalletQrBundle\NowoWalletQrBundle::class => ['all' => true],
# config/packages/nowo_wallet_qr.yaml nowo_wallet_qr: google_wallet: enabled: true issuer_id: '%env(GOOGLE_WALLET_ISSUER_ID)%' service_account_json: '%kernel.project_dir%/config/google-wallet-service-account.json' origins: ['www.example.com'] apple_wallet: enabled: true pass_download_url_pattern: 'https://www.example.com/wallet/{pass_id}.pkpass' # Prefer configuring QR options on QrCodeBundle (legacy nowo_wallet_qr.qr_code still works): # config/packages/nowo_qr_code.yaml nowo_qr_code: default_profile: default profiles: default: size: 300
use Nowo\WalletQrBundle\Model\GoogleWalletPassReference; use Nowo\WalletQrBundle\Service\WalletQrService; $reference = GoogleWalletPassReference::withIssuer( $issuerId, objectSuffix: 'MEMBER_001', classSuffix: 'MEMBER_CLASS', ); $pair = $walletQrService->createWalletQrPair($reference, applePassId: 'MEMBER_001'); // $pair['android']->qrCodeDataUri, $pair['ios']->qrCodeDataUri
Development
make up
make test
make test-coverage
make demo-smoke
make release-check
Demos: make -C demo/symfony8 up
Documentation
- Installation
- Configuration
- PSR evaluation (REQ-CS-007)
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
Tests and coverage
| Language | Coverage |
|---|---|
| PHP | ~100% lines |
Run make test-coverage for the detailed report.
License
MIT — see LICENSE.
