common-gateway/referentielijsten-bundle
symfony/http-foundation, symfony/routing) allows partial integration via Composer dependencies. The core functionality (ZGW Referentielijsten API interaction) is API-centric, making it feasible to adapt for Laravel if the bundle’s logic is decoupled from Symfony-specific components.HttpClient, Serializer, DependencyInjection) may require:
GuzzleHttp + JMS/Serializer or Symfony/Contracts via Composer.passport or spatie/laravel-oauth could replace Symfony’s Security component.symfony/event-dispatcher (via Composer) would be needed.config/packages format differs from Laravel’s config/referentielijsten.php. A custom config publisher or environment-based overrides may be required.| Risk Area | Severity | Mitigation |
|---|---|---|
| Symfony Lock-in | High | Abstract core logic (API calls) into Laravel services; avoid DI container coupling. |
| Undocumented Assumptions | Medium | Review VNG-referentielijsten OpenAPI spec and test edge cases (e.g., pagination, error formats). |
| Maintenance Burden | High | Bundle has no dependents and low activity; fork or wrap tightly to isolate changes. |
| API Versioning | Medium | Monitor VNG-referentielijsten for breaking changes; implement a versioned client layer. |
| Localization/Validation | Low | Dutch-specific data may need translation layers for broader use. |
Symfony\Component\Routing? If so, how is routing handled in Laravel?file, redis) integrate?Laravel Compatibility Matrix:
| Bundle Feature | Laravel Equivalent | Integration Notes |
|---|---|---|
| HTTP Client | GuzzleHttp, Symfony HttpClient (via Composer) | Prefer Guzzle for native Laravel support. |
| Serialization | JMS/Serializer, Symfony Serializer | Use spatie/laravel-array-to-xml if XML responses are needed. |
| Dependency Injection | Laravel’s Container | Manually bind services or use symfony/dependency-injection. |
| Configuration | Laravel Config Files | Create a config publisher or use environment variables. |
| Events | Laravel Events | Replace Symfony events with Laravel’s Event facade. |
| Validation | Laravel Validation | Use Form Requests or manually validate DTOs. |
| Routing | Laravel Routes | Not needed unless exposing bundle endpoints. |
Recommended Stack Additions:
guzzlehttp/guzzle: For HTTP calls (if not using Symfony’s client).spatie/laravel-array-to-xml: If XML responses are required.symfony/http-client (optional): If leveraging Symfony’s client for consistency.spatie/laravel-activitylog: For auditing API interactions.Assessment Phase:
composer.json for Symfony dependencies.Client, Repository) vs. Symfony-specific code (e.g., Command, EventListener).Decoupling Phase:
HttpClient with Guzzle in a new Laravel service (e.g., ZGWReferentielijstenClient).Kernel (e.g., symfony/flex bootstrapping).ServiceProvider to publish config and routes./packages/referentielijsten-laravel/
├── src/
│ ├── Client.php # Guzzle-based client
│ ├── DTO/ # Bundle DTOs (adapted)
│ ├── Facades/ # Laravel facades (e.g., Referentielijsten::fetch())
│ └── ServiceProvider.php
└── config/referentielijsten.php
Implementation Phase:
ZGWReferentielijstenClient).SelectielijstRepository).ReferentielijstenFetched event).Testing Phase:
Mockery or VCR for HTTP recordings).429 Too Many Requests).VNG-referentielijsten OpenAPI spec is the single source of truth. Monitor for changes (e.g., VNG GitHub).composer require symfony/*:^6.0 for minimal version conflicts.cache() helper or a dedicated table.selectielijsten).How can I help you explore Laravel packages today?