- Is locaine/lcn-include-assets-bundle a Laravel package?
- No. It is a Symfony 2 bundle, despite being indexed alongside Laravel and general PHP packages. It depends on Symfony's Bundle base class, AppKernel registration, the DI container, and Symfony 2 templating helpers. Laravel has no interception point for any of those, so the code cannot run inside a Laravel application.
- Can I install locaine/lcn-include-assets-bundle in a Laravel app with Composer?
- Composer may resolve it, but installation will not give you usable classes. The package relies on PSR-0 autoloading and Symfony 2 namespace conventions that Laravel's autoloader and service container do not wire up. There is no service provider, no facade, and no Blade integration. Plan on a reimplementation rather than an adoption.
- What does this bundle actually do?
- It recreates the Symfony 1 helpers use_javascript() and use_stylesheet() inside Symfony 2 templates. Views can register CSS and JS files from anywhere in the render tree, and the layout emits them later, in order. The concept is essentially an asset registry plus a render step in the layout.
- Which PHP and Symfony versions does it support?
- It targets Symfony 2 with era-appropriate PHP constraints, most likely PHP 5.3 through 5.6, and Twig 1.x. Symfony 2 is end of life, so those constraints block installation on any currently supported PHP runtime. Verify the exact composer.json ceilings for PHP, Symfony 2.x minor range, Twig major, and autoload standard before making any decision, because a single mismatch is disqualifying.
- How do I get use_javascript/use_stylesheet behaviour in Laravel Blade?
- Use Blade stacks, which provide the same semantics natively: register anywhere, render once, in order. Call @push('scripts') or @push('styles') in any partial or view, then place @stack('scripts') and @stack('styles') in your layout. No third-party package is needed, and the behaviour is about a hundred lines if you prefer a small service provider with an asset registry singleton.
- Does it work with modern Symfony versions or Symfony 2 only?
- It is a Symfony 2 bundle and does not fit modern Symfony either. AppKernel registration, PSR-0 autoloading, and Twig 1.x coupling are all retired patterns. On current Symfony, rewrite against AssetMapper or Webpack Encore instead of trying to preserve this bundle's API surface.
- Is locaine/lcn-include-assets-bundle maintained and safe for production?
- It shows no meaningful maintenance: one star, zero dependents, no releases, and no demonstrated production usage. The bus factor is one, and there is no visible security handling for a component that emits markup into every page. Running it in production means every future PHP or framework upgrade becomes a manual patch exercise, and any incident is debugged cold from source.
- How do I install it in a legacy Symfony 2 application?
- Vendor the bundle and pin every transitive dependency, freezing the lockfile at working versions. Register it through AppKernel as the README describes, and isolate it behind an internal adapter so it can be swapped later. Do not add new call sites, and do not treat this as a long-term solution.
- Does the bundle guarantee asset ordering and deduplication?
- The design registers assets from the view layer and emits them in the layout, so ordering depends on registration sequence and the layout's render step. Deduplication and conflict handling are not clearly documented beyond a short README. If ordering or dedup is your actual requirement, clarify that first, since both have better native answers in Laravel and modern Symfony.
- What are the best alternatives for asset inclusion in Laravel?
- Start with Blade @push and @stack, which cover register-anywhere and render-once semantics with zero dependencies. For bundling and versioning, use Laravel's Vite pipeline or Mix depending on your version. Only reach for a third-party asset helper if you need something stacks genuinely cannot express, and check its maintenance record before adopting it.