- Is Cacofony a Laravel package or a Symfony bundle?
- Cacofony is actually a Symfony 6 bundle, despite some listings describing it as a Laravel package. Laravel uses Symfony components but does not load Symfony bundles, so it will not integrate into a standard Laravel application. Confirm your framework before installing.
- Can I install keiwen/cacofony in a Laravel application?
- No—Cacofony targets Symfony 6 and relies on Symfony's HTTP kernel, routing, security, and bundle configuration. Laravel's container and package auto-discovery do not load Symfony bundles. Installing it in Laravel will not provide the fluent API described in some overviews.
- What PHP version does Cacofony require?
- Cacofony v6 requires PHP 8.0+ because it moves from annotations to PHP 8 attributes. The package overview also mentions PHP 8.1+ support. Check your composer.json and any remaining doctrine/annotations dependencies.
- How do I install Cacofony with Composer?
- Run composer require keiwen/cacofony in a Symfony 6 project. There is no Laravel package auto-discovery; you must register the bundle and configure routing and security as documented. For Laravel, this package is not applicable.
- What breaking changes are in Cacofony v6.0.0?
- v6 removes annotation-based RestrictToRole and TemplateParameter in favor of PHP 8 attributes, drops the param fetcher, single-method routes, and Conflict/Locked HTTP exceptions. There is no deprecation bridge, so v5.x users must migrate in one hop. Test coverage is critical because some failures are silent.
- Is Cacofony test-friendly for Pest or PHPUnit?
- The overview claims test-friendly design with Pest/PHPUnit helpers and no static state to reset, but that description appears aimed at Laravel. In Symfony, test your attribute migration and removed exception catches explicitly. Do not rely on smoke tests for authorization changes.
- How do I migrate RestrictToRole from annotations to attributes in Cacofony?
- Replace annotation imports with PHP 8 attributes and ensure PHP 8.0+ is active. Remove doctrine/annotations wiring if no other bundle needs it. Treat this as a security review: a missed controller can become over-permissive rather than throwing an error.
- What replaces the removed param fetcher and single-method routes?
- There is no replacement—Cacofony v6 states these features had low to none added value. Rewrite param fetcher usage as explicit action arguments and convert single-method routes to multi-method actions. Scan your codebase for @ParamFetcher and single-method @Route usages before upgrading.
- Does Cacofony work in production with Laravel and Symfony mixed?
- Avoid adding Cacofony to a shared Composer constraint spanning Laravel and Symfony applications. Its Symfony 6 requirement will drag the Symfony side forward and leave Laravel dependencies unsatisfiable. Isolate it to Symfony-only services.
- What are alternatives to Cacofony for Laravel developers?
- For Laravel, use native Laravel features or Laravel-first packages that support package auto-discovery and the Laravel container. Cacofony is not a Laravel utility; treating it as one risks wasted integration effort. Evaluate Laravel-specific bus and helper packages instead.