- Can I use **atoolo/citygov-bundle** directly in a Laravel project without Symfony?
- No, the bundle is tightly coupled with Symfony’s EventDispatcher, DependencyInjection, and Doctrine ORM. You’d need to rewrite core components (e.g., search logic, GraphQL resolvers) or run it as a separate Symfony microservice exposed via API. Laravel alternatives like Scout (for search) or Lighthouse (for GraphQL) would simplify integration.
- What Laravel alternatives exist for the bundle’s search functionality?
- Replace Solr/Elasticsearch (used via `atoolo/search-bundle`) with Laravel Scout + Algolia, Meilisearch, or Elasticsearch’s PHP client. Scout’s adapter pattern lets you swap backends without rewriting business logic. For GraphQL, Lighthouse is a drop-in alternative to Symfony’s GraphQL bundle.
- Does this bundle support German/Swiss public sector compliance (e.g., `sp_meta_string_leikanumber`) in Laravel?
- The bundle includes compliance features like `sp_meta_string_leikanumber`, but they’re tied to Doctrine schemas. You’d need to manually replicate these tables in Laravel’s migrations or build a custom adapter to map Doctrine entities to Eloquent models. No native Laravel support exists.
- How do I handle Symfony’s dependency conflicts (e.g., `symfony/dependency-injection`) in a Laravel project?
- Isolate the bundle in a separate Symfony app (e.g., Docker container) and communicate via REST/GraphQL APIs. Alternatively, use Composer’s `replace` or `provide` directives to override Symfony dependencies with Laravel equivalents, but this risks breaking functionality. Test thoroughly with PHP 8.1+.
- What’s the best way to integrate this bundle’s GraphQL API with Laravel?
- Avoid Symfony’s GraphQL bundle entirely—use Lighthouse for Laravel and rewrite the bundle’s resolvers as custom Lighthouse types. If you must use the original bundle, expose its GraphQL endpoint as a microservice and proxy requests via Laravel’s HTTP client or a gateway like Kong.
- Are there Laravel-compatible migrations for the bundle’s Doctrine schemas (e.g., `sp_meta_string_leikanumber`)?
- No, the bundle assumes Doctrine migrations. You’ll need to manually create Laravel migrations for these tables or use a tool like `doctrine/dbal` to generate SQL from Doctrine schemas. For production, test schema compatibility with Laravel’s Schema Builder or use raw SQL.
- How do I test this bundle in a Laravel environment if it’s Symfony-dependent?
- Mock Symfony dependencies (e.g., EventDispatcher, Doctrine) in Pest/Laravel tests using interfaces or trait-based stubs. For integration tests, deploy the bundle in a separate Symfony container and test API interactions. Focus on testing adapted components (e.g., search logic rewritten for Scout).
- What’s the maintenance overhead of using this bundle in Laravel?
- High. You’ll need to maintain custom adapters (Doctrine→Eloquent, Symfony→Laravel configs), handle dependency conflicts, and stay updated with both Symfony and Laravel’s evolving ecosystems. The bundle’s last release (2026-06-03) suggests active maintenance, but Laravel-specific changes may lag.
- Can I use this bundle for a commercial (non-government) project?
- Technically possible, but misaligned. The bundle’s features (e.g., public sector compliance, employee portals) are optimized for municipalities. Commercial projects might need to strip or rewrite non-relevant components (e.g., `sp_meta_string_leikanumber`), adding complexity. Evaluate Laravel alternatives like Filament or Nova for admin panels.
- How do I deploy this bundle alongside Laravel in production?
- Containerize the bundle in a separate Symfony Docker service and expose its APIs (REST/GraphQL) to Laravel via HTTP clients or a gateway. Use environment variables to share configs (e.g., database credentials). Monitor cross-service latency, especially for search or GraphQL queries, as Symfony’s stack may introduce overhead.