- Is knplabs/knp-media-exposer-bundle a Laravel package?
- No. It is a Symfony bundle that integrates the knplabs/media-exposer library into Symfony's dependency injection container and routing. It has no Laravel service provider, facade, config convention, or adapter. Laravel teams should not install it and expect Laravel-style behavior.
- Can I use KNP Media Exposer Bundle with Laravel 11?
- There is no practical integration path. The bundle is Symfony 2/3-era and likely pins PHP 5.x or 7.x constraints, while Laravel 10/11 requires PHP 8.1+ over modern Symfony components. With no community port and zero dependents, Composer resolution is likely to fail rather than degrade gracefully. Reimplement the concept natively instead.
- How do I install knplabs/knp-media-exposer-bundle?
- In a Symfony project you would require it with Composer, register the bundle in your kernel or bundles.php, and configure the media exposer service. That workflow depends on Symfony's container and bundle system. It does not apply to Laravel applications.
- Is knplabs/knp-media-exposer-bundle still maintained?
- No. The project is archived and explicitly unmaintained, with a public and unanswered call from KNP Labs for a new official maintainer. No security advisories will be issued. Its 7 stars and 0 dependents mean effectively zero production usage to learn from.
- What are Laravel alternatives for secure media URLs and access control?
- Use native Laravel primitives: config/filesystems.php disks as a strategy registry, Storage::disk($name)->url($path) for public URLs, and Storage::disk($name)->temporaryUrl($path, $ttl) for signed or expiring links. Flysystem adapters, CDN patterns, and signed URL policies cover most needs. A thin MediaUrlResolver service can map disk names to strategies when multiple backends must be abstracted.
- Does KNP Media Exposer support signed or temporary URLs?
- The bundle's core role is generating public URLs for media while applying voter-based access control, so private files can be served through controllers instead of direct disk paths. Any signed or expiring behavior depends on the pluggable exposer implementations rather than the bundle plumbing itself. In Laravel, Storage::temporaryUrl is the direct native answer.
- What PHP and Symfony versions does KNP Media Exposer Bundle support?
- It is a Symfony 2/3-era bundle, so it almost certainly pins PHP 5.x or 7.x constraints in Composer. You should check its composer.json for exact version bounds before considering anything. Modern Symfony and PHP 8.1+ compatibility is unlikely without a fork.
- How does access control work in KNP Media Exposer Bundle?
- A central MediaExposer service delegates to pluggable exposers, and voter-based permissions decide whether a media URL can be exposed. Private files are served through controllers rather than being directly reachable on disk. This keeps real filesystem paths out of generated URLs.
- How do I migrate from KNP Media Exposer Bundle to Laravel?
- Reimplement the concept, not the code. Build a thin MediaUrlResolver with a disk-name-to-strategy map, use Storage::url and Storage::temporaryUrl for resolution, and delegate CDN or image-transform concerns to dedicated services. This keeps file exposure logic out of controllers without adopting an unmaintained Symfony bundle.
- Should I fork knplabs/knp-media-exposer-bundle for Laravel?
- Only if you accept that a dependency decision becomes an ownership commitment. Forking means rewriting the bundle's DI configuration as a Laravel provider or depending on the bare library and hand-rolling the wiring. Name an internal owner and ongoing budget first, because reimplementing natively is usually cheaper and safer.