- How does AkumaDistributionBundle differ from Symfony’s native `config/bundles.php` for bundle registration?
- This bundle bypasses Symfony’s standard `registerBundles()` method by extending `AkumaKernel` and reading bundle definitions from `bundle.yml` files. Unlike `config/bundles.php`, it enforces environment-specific and priority-based loading via YAML, but requires kernel inheritance and may conflict with Symfony’s autowiring or CompilerPasses.
- Can I use this package in Laravel (Symfony-based) applications without breaking existing bundle logic?
- No—this package targets Symfony’s `Kernel` and `Bundle` interfaces directly, not Laravel’s service container or package system. Laravel’s `AppServiceProvider` and `PackageServiceProvider` handle bundle-like logic differently, so this won’t integrate natively. Consider alternatives like `spatie/laravel-package-tools` for Laravel-specific needs.
- What Symfony versions does this bundle support, and are there plans for Symfony 5/6 compatibility?
- The bundle requires Symfony ≥2.8.0 but lacks explicit support for Symfony 5/6+ features like autoconfigure or runtime bundles. The custom kernel extension risks breaking changes in newer Symfony versions (e.g., `getBundles()` vs. `registerBundles()`). No roadmap updates are visible, so test thoroughly if adopting for legacy projects.
- How does the `require` field in bundle.yml handle circular dependencies between bundles?
- The `require` field defines bundle dependencies via YAML, but the package lacks built-in validation for circular dependencies. Unlike Symfony’s `ContainerBuilder`, which detects cycles during compilation, this bundle resolves dependencies at runtime, potentially causing bootstrap failures if misconfigured. Manual testing is required.
- Will this bundle slow down my application’s bootstrap time compared to static bundle registration?
- Yes—dynamic bundle loading via `AkumaKernel` introduces runtime resolution overhead, unlike Symfony’s compile-time `AppCache`. The bundle’s environment checks and priority logic add latency, though the impact depends on your bundle count. For performance-critical apps, static registration (e.g., `config/bundles.php`) is preferable.
- Can I use this bundle alongside Symfony’s `config/packages/` system without conflicts?
- No—this bundle forces parallel configurations. It ignores Symfony’s `config/packages/` system entirely, requiring you to maintain `bundle.yml` files per bundle. This duplication can lead to sync issues if configurations drift. For modern Symfony, prefer `config/bundles.php` or `autoconfigure` instead.
- Are there known production deployments using this bundle, or is it experimental?
- There are no visible production deployments or dependent packages, and the GitHub repository has minimal activity. The bundle’s non-standard approach (kernel extension, runtime resolution) suggests it’s niche or experimental. Proceed with caution, especially for critical applications.
- How do I debug bundle loading issues with this package?
- Use the `akuma:debug:bundle` command to list registered bundles, but note it won’t integrate with Symfony’s `debug:container` or `debug:config` tools. For deeper issues, enable Symfony’s debug mode and inspect the custom `AkumaKernel` logic. Environment-specific bundle activation may obscure errors if bundles conflict.
- Could I achieve the same result with a CompilerPass or Extension instead of overriding the kernel?
- Yes—environment-specific bundle loading could be implemented via a `CompilerPass` or `Extension` without kernel inheritance. This would align with Symfony’s core mechanisms, avoid runtime resolution costs, and integrate with `config/packages/`. The bundle’s approach is heavier but offers YAML-based flexibility for legacy setups.
- What are the risks of using environment-specific bundle activation in production?
- Environment-specific bundles (e.g., `environment: ['prod']`) can expose unintended bundles if misconfigured, violating the principle of least privilege. Debugging is harder due to runtime bundle state changes, and Symfony’s security tools (e.g., `security:check`) may not account for dynamically loaded bundles. Always validate bundle activation in staging.