- Can I use derafu/symfony-query-bundle in a Laravel project?
- No, this bundle is **exclusively for Symfony** and relies on Symfony’s Container, Doctrine ORM, and EventDispatcher. Laravel’s architecture (Eloquent, Service Container) is incompatible, though you could extract the core *derafu/query* library and adapt it for Laravel manually.
- What Laravel packages offer similar query abstraction for filtering/sorting/pagination?
- For Laravel, consider *spatie/laravel-query-builder* (Eloquent-based), *darkaonline/l5-swagger* (API query params), or *fideloper/proxy* (tenant-aware queries). These avoid Symfony dependencies while providing similar functionality.
- Does this bundle support multi-tenancy in Laravel?
- Not natively. The bundle’s tenant-aware features rely on Symfony’s Doctrine repositories. In Laravel, use *stancl/tenancy* (for Eloquent) or middleware-based scopes to isolate queries by tenant without Symfony.
- How does derafu/query compare to Laravel’s Query Builder performance?
- Performance depends on implementation, but *derafu/query* adds abstraction layers (e.g., dynamic filtering) that may introduce overhead. Benchmark against Eloquent’s native query builder or *spatie/laravel-query-builder* for your specific use case.
- Can I integrate this bundle if my Laravel app uses Doctrine instead of Eloquent?
- No—this bundle assumes Symfony’s Doctrine integration. You’d need to rewrite the QueryBuilder adapters for Laravel’s Doctrine setup, which isn’t officially supported. Stick to Eloquent or use *doctrine/dbal* directly.
- What’s the learning curve for maintaining this bundle in a Laravel project?
- High. The bundle assumes Symfony’s DI, events, and routing. Debugging or extending it in Laravel would require deep knowledge of both frameworks, plus rewriting Symfony-specific logic (e.g., Request handling).
- Are there SaaS-specific features in derafu/query that Laravel lacks?
- Potentially—like tenant-aware repositories or role-based filtering—but these aren’t Laravel-native. Evaluate if the abstraction justifies porting or if simpler solutions (e.g., Eloquent scopes + middleware) suffice.
- How do I test this bundle in a Laravel environment?
- You can’t directly. Test the underlying *derafu/query* library in isolation (via Composer) by mocking Symfony dependencies, but integration tests would require a Symfony kernel. Laravel’s testing tools (e.g., HTTP tests) won’t work out-of-the-box.
- What’s the best way to adopt derafu/query’s features in Laravel without Symfony?
- Extract the core *derafu/query* library (via Composer) and build Laravel-specific adapters for Eloquent/Query Builder. Focus on the query logic (e.g., filtering, sorting) and avoid Symfony’s Request/Event integrations.
- Is this bundle actively maintained for Laravel compatibility?
- No—it’s **Symfony-only**. The maintainers don’t provide Laravel support. If you need these features, consider forking the project or using Laravel-native alternatives like *spatie/laravel-query-builder*.