PHPackages                             laulamanapps/wallet-symfony - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. laulamanapps/wallet-symfony

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

laulamanapps/wallet-symfony
===========================

Platform-agnostic wallet pass generation for your Symfony application

v1.0.0(1mo ago)0194MITPHPPHP ^8.1CI passing

Since Jul 8Pushed 1mo agoCompare

[ Source](https://github.com/LauLamanApps/wallet-symfony)[ Packagist](https://packagist.org/packages/laulamanapps/wallet-symfony)[ RSS](/packages/laulamanapps-wallet-symfony/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Wallet Symfony Bundle
=====================

[](#wallet-symfony-bundle)

Platform-agnostic wallet pass generation for your Symfony application.

This bundle integrates [`laulamanapps/wallet`](https://github.com/LauLaman/wallet) into Symfony. It wires the `LauLamanApps\Wallet\Wallet` service, collects every `PassGenerator` in your container, and can optionally enable the built-in Apple and Google bridges.

Installation
------------

[](#installation)

```
composer require laulamanapps/wallet-symfony
```

Register the bundle (skip when using Symfony Flex):

```
// config/bundles.php
return [
    // ...
    LauLamanApps\WalletBundle\WalletBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

```
# config/packages/laulamanapps_wallet.yaml
laulamanapps_wallet:
    apple:
        enabled: true
    google:
        enabled: true
        issuer_id: '%env(GOOGLE_WALLET_ISSUER_ID)%'
        class_suffix: ~ # optional, defaults to the pass type
```

Both bridges are disabled by default. When `google.enabled` is `true`, `issuer_id` is required.

How the bridges resolve their engine services
---------------------------------------------

[](#how-the-bridges-resolve-their-engine-services)

The bridges are thin adapters around the platform SDKs and expect their engine services to be present in the container:

- **Apple** — `laulamanapps_wallet.bridge.apple` receives the `LauLamanApps\ApplePassbook\Build\Compiler` service. Install [`laulamanapps/apple-passbook-bundle`](https://github.com/LauLaman/apple-passbook-bundle), which registers that service (including certificate/signing configuration), or define a `Compiler` service yourself.
- **Google** — `laulamanapps_wallet.bridge.google` receives the `LauLamanApps\GoogleWallet\SaveUrlFactory` service. Install `laulamanapps/google-wallet-symfony`, which registers that service from your service account credentials, or define a `SaveUrlFactory` service yourself:

```
# config/services.yaml
services:
    LauLamanApps\GoogleWallet\ServiceAccount:
        factory: ['LauLamanApps\GoogleWallet\ServiceAccount', 'fromJsonFile']
        arguments: ['%env(GOOGLE_WALLET_SERVICE_ACCOUNT)%']

    LauLamanApps\GoogleWallet\SaveUrlFactory:
        arguments: ['@LauLamanApps\GoogleWallet\ServiceAccount']
```

Adding a custom PassGenerator
-----------------------------

[](#adding-a-custom-passgenerator)

Any service implementing `LauLamanApps\Wallet\PassGenerator` is picked up automatically through autoconfiguration — it is tagged `laulamanapps_wallet.pass_generator` and registered on the `Wallet`:

```
use LauLamanApps\Wallet\GeneratedPass;
use LauLamanApps\Wallet\Pass;
use LauLamanApps\Wallet\PassGenerator;

final class MyPassGenerator implements PassGenerator
{
    public function getPlatform(): string
    {
        return 'my-platform';
    }

    public function generate(Pass $pass): GeneratedPass
    {
        return GeneratedPass::url('my-platform', 'https://example.com/pass/' . $pass->getId());
    }
}
```

No tagging or configuration needed as long as `autoconfigure: true` is on (the Symfony default).

Lifecycle events
----------------

[](#lifecycle-events)

When the platform integrations are installed, the bundle automatically maps their platform-specific events to the agnostic wallet lifecycle events — listen once, cover every platform:

- With **laulamanapps/apple-passbook-bundle**: a successful PassKit device (un)registration is re-dispatched as `LauLamanApps\Wallet\Event\PassInstalledEvent` / `PassUninstalledEvent` (platform `apple`, pass id = serial number). The mapping runs at a very low listener priority, after your own listeners decided the outcome.
- With **laulamanapps/google-wallet-symfony**: a signature-verified save/delete callback is re-dispatched as the same events (platform `google`, pass id = object id).

```
use LauLamanApps\Wallet\Event\PassInstalledEvent;

final class PassAnalyticsListener
{
    public function __invoke(PassInstalledEvent $event): void
    {
        // $event->getPlatform(), $event->getPassId(), $event->getNativeEvent()
    }
}
```

Generating a pass
-----------------

[](#generating-a-pass)

Inject the `Wallet` and generate for the platform you need:

```
use LauLamanApps\Wallet\Pass;
use LauLamanApps\Wallet\PassType;
use LauLamanApps\Wallet\Wallet;

final class TicketController
{
    public function __construct(private readonly Wallet $wallet)
    {
    }

    public function __invoke(): Response
    {
        $pass = new Pass('ticket-4664', PassType::EventTicket, 'LauLaman Apps', 'Awesome Conference');

        $generated = $this->wallet->generate('google', $pass); // or 'apple', 'my-platform', ...

        return new RedirectResponse($generated->getUrl());
    }
}
```

Use `$wallet->generateForAllPlatforms($pass)` to build the pass for every registered platform at once.

Credits
-------

[](#credits)

- [Laurens Laman](https://github.com/LauLaman)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/930ca3b1756d00a63c8ff3363e81f16f961cf3ef79ff0c9d362670c36d97e456?d=identicon)[LauLaman](/maintainers/LauLaman)

---

Top Contributors

[![LauLaman](https://avatars.githubusercontent.com/u/8283992?v=4)](https://github.com/LauLaman "LauLaman (4 commits)")

---

Tags

phpsymfonygoogleapplewalletpasscouponevent ticketboarding passpkpassloyalty

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/laulamanapps-wallet-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/laulamanapps-wallet-symfony/health.svg)](https://phpackages.com/packages/laulamanapps-wallet-symfony)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[ecotone/symfony-bundle

Ecotone for Symfony — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Symfony Messenger, via PHP attributes.

11258.2k1](/packages/ecotone-symfony-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
