- Can I use this bundle in Laravel projects? It’s a Symfony package—will it work?
- No, this bundle is Symfony-specific and won’t integrate directly with Laravel. Laravel projects should use npm/yarn to install Popper.js (e.g., `npm install popperjs`) and bundle it via Webpack/Vite. For shared frontend assets, consider a micro-frontend or standalone JS library.
- What Laravel versions does this bundle support?
- This bundle targets Symfony, not Laravel. If you’re using Laravel with Symfony components (e.g., Symfony HTTP Kernel), ensure your Symfony version is 3+. For pure Laravel, avoid this bundle—use npm-based solutions instead. Laravel’s asset pipelines (Mix/Vite) won’t play well with its hardcoded asset paths.
- How do I install this in a Symfony 5/6/7 project? The README shows Symfony 3 syntax.
- Install via Composer as usual (`composer require alexandermatveev/popper-bundle`), but Symfony 5+ may break asset paths. Override the bundle path in `config/packages/assetic.yaml` or replace `bundles/alexandermatveevpopper/` with a dynamic asset helper. Test thoroughly—this bundle isn’t officially maintained for modern Symfony.
- Is Popper.js 1.14.4 safe for production? There are newer versions.
- Popper.js 1.14.4 is outdated and may contain unpatched security vulnerabilities (CVEs). The latest version (2.12.x) includes fixes and ES module support. If security is critical, drop this bundle and use `npm install popperjs@latest` with your Laravel asset pipeline. For legacy projects, weigh the risk against your threat model.
- Will this bundle work with Laravel Mix or Vite?
- No, this bundle relies on Symfony’s legacy `bundles/` asset structure, which conflicts with Laravel Mix/Vite. To use Popper.js in Laravel, install it via npm (`npm install popperjs`) and import it directly in your JavaScript. The bundle’s hardcoded paths make it incompatible with modern Laravel asset workflows.
- Are there alternatives for Laravel that don’t require Symfony?
- Yes. For Laravel, use npm/yarn to install Popper.js (`npm install popperjs`) and bundle it via Laravel Mix or Vite. Example: `import Popper from 'popperjs'` in your JS. Packages like `laravel-mix` or `vite-plugin-laravel` handle asset compilation seamlessly. Avoid Symfony-specific bundles unless your project is tightly coupled to Symfony.
- How do I update Popper.js in this bundle to the latest version?
- This bundle doesn’t support updates—it’s statically linked to Popper.js 1.14.4. To upgrade, fork the repository, replace the JS file with the latest Popper.js (from npm), and rebuild. Alternatively, abandon the bundle and use npm/yarn for Popper.js. The bundle’s lack of maintenance makes forking the only viable path for updates.
- Does this bundle support TypeScript or ES modules?
- No, the bundle includes Popper.js 1.14.4 as a minified UMD script, which lacks ES module support. Modern Laravel projects using TypeScript or ES modules will need to install Popper.js via npm (`npm install popperjs@2`) and import it directly. The bundle’s asset approach is incompatible with tree-shaking and modern JS tooling.
- What if I need Popper.js only for a few legacy components in Laravel?
- Isolate the legacy components by loading Popper.js via npm *only* for those parts (e.g., a separate JS file or iframe). Avoid the Symfony bundle entirely—use `npm install popperjs` and dynamically load it with a script tag or Webpack’s `require.context`. This keeps your modern Laravel setup clean while supporting old dependencies.
- Is there a Laravel-specific Popper.js package I should use instead?
- Laravel doesn’t need a dedicated Popper.js package. Install Popper.js via npm (`npm install popperjs`) and integrate it with Laravel Mix or Vite. For example, in `resources/js/app.js`, add `import 'popperjs'`. Packages like `laravel-popper` (if available) might wrap this, but npm is the standard approach. The Symfony bundle adds unnecessary complexity for Laravel projects.