common-gateway/zgw-to-open-belasting-bundle
aanslagen) and objections (bezwaren). This aligns well with government/tax domain systems built on Symfony/Laravel, particularly where interoperability with Dutch public sector APIs is required.spatie/laravel-symfony-bundle) may be needed.HttpClient, Serializer).zorgdracht/zgw-common).aanslagen) in its own database.| Risk Area | Description | Mitigation Strategy |
|---|---|---|
| Symfony vs. Laravel | Laravel lacks native Symfony bundle support; integration requires abstraction layers. | Use spatie/laravel-symfony-bundle or wrap bundle services in Laravel facades. |
| API Versioning | ZGW/PINK APIs may evolve; bundle may lag in updates. | Monitor upstream APIs, fork if needed, or use middleware for schema validation. |
| Error Handling | Bundle may lack granular error handling for edge cases (e.g., malformed ZGW data). | Implement custom exception handlers or middleware to translate bundle errors. |
| Testing Overhead | Bundle tests may not cover Laravel-specific edge cases (e.g., queue workers, caching). | Write integration tests for Laravel-specific scenarios (e.g., job queues). |
| Performance | Schema validation/mapping could be CPU-intensive for high-volume ZGW feeds. | Benchmark with expected payload sizes; consider async processing (Laravel Queues). |
aanslagen/bezwaren be stored? (Host DB, PINK API, or both?)| Component | Symfony Host | Laravel Host | Notes |
|---|---|---|---|
| Bundle Installation | composer require |
Requires spatie/laravel-symfony-bundle |
Laravel needs Symfony container integration. |
| Dependency Injection | Native (DI) | Manual wiring or spatie bridge |
Laravel’s service container is incompatible with Symfony bundles by default. |
| HTTP Client | symfony/http-client |
guzzlehttp/guzzle or symfony/http-client |
Bundle may use Symfony’s client; Laravel can adopt it via spatie. |
| Serialization | symfony/serializer |
symfony/serializer (via spatie) |
JSON/XML handling requires Symfony’s serializer. |
| Event System | Symfony Events | Laravel Events | Bundle may emit Symfony events; translate to Laravel events if needed. |
| Validation | Symfony Validator | Laravel Validator | Custom validators may need adaptation. |
Add Symfony Bridge:
composer require spatie/laravel-symfony-bundle
Configure config/symfony.php to include the bundle’s paths.
Bundle Registration:
config/app.php (Symfony) or via spatie bridge (Laravel).public function register() {
$this->app->singleton('zgw_to_open_belasting.transformer', function ($app) {
return include __DIR__.'/../../vendor/common-gateway/zgw-to-open-belasting-bundle/Resources/config/services.php';
});
}
Dependency Mapping:
HttpClient) with Laravel equivalents or wrap them:
// Example: Wrap Symfony HttpClient in Laravel HTTP client
$symfonyClient = new \Symfony\Contracts\HttpClient\HttpClient();
$laravelClient = new \Illuminate\Http\Client\PendingRequest($symfonyClient->getBaseUri());
Event Translation:
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
$dispatcher = new EventDispatcher();
$dispatcher->addListener('zgw.zaken.transformed', function ($event) {
event(new \App\Events\ZgwTransformed($event->getData()));
});
Testing:
Pre-Integration:
Core Integration:
Extensibility:
Production Readiness:
common-gateway/zgw-to-open-belasting-bundle for updates.symfony/validator).composer exclude or custom installers to trim dependencies.How can I help you explore Laravel packages today?