- Can I use fados/chartjs-bundle in a Laravel application?
- No. fados/chartjs-bundle is a Symfony 2 bundle that depends on Symfony's HttpKernel Bundle class, DI compiler passes, and Twig extension tagging, none of which Laravel provides. Laravel uses service providers and Blade, and the package ships no adapter layer. Composer will also refuse to resolve it against a modern Laravel application.
- Why does Composer fail to install fados/chartjs-bundle in Laravel?
- The bundle typically constrains symfony/framework-bundle to ~2.3 or ~2.8 and PHP to >=5.3, while current Laravel releases require PHP 8.1+ and pull Symfony 6 or 7 components transitively. Those constraints are mutually exclusive, so composer require stops with a dependency conflict before any code is evaluated. Using --ignore-platform-reqs only leaves an autoloaded bundle class that Laravel never instantiates.
- What does fados/chartjs-bundle actually do?
- It is a small Symfony 2 bundle that adds a Twig helper for Chart.js. The helper emits a canvas element and serializes a chart configuration array to JSON so a browser-side Chart.js instance can render it. It does not provide server-side rendering, a JavaScript build, or any Laravel integration.
- Is fados/chartjs-bundle compatible with Chart.js v3 and v4?
- No. The generated configuration targets the Chart.js v1/v2 API, while Chart.js v3 (2021) and v4 (2022) changed the scales, tooltip callback, and default configuration APIs. Even if you extracted the output, the markup would be stale against a modern Chart.js runtime. You would need to rewrite the config generation regardless of framework.
- Is fados/chartjs-bundle still maintained?
- No meaningful maintenance is visible. The last release was 2017-08-11, the repository has around 2 stars and 0 dependents, and there is no CI badge or test suite reference. Zero dependents means no third party has validated it in production and there is no downstream ecosystem to surface bugs. Treat it as abandoned.
- How do I render Chart.js charts in a Laravel Blade template without this bundle?
- Build a small Blade component that renders a canvas and passes the config as JSON, for example an x-chart component using @json($config) or data attributes, then initialize new Chart(ctx, config) in your existing Vite/JS bundle. That is roughly a half-day of work and gives you full ownership. It avoids pulling Symfony's kernel into Laravel or forking an abandoned bundle.
- What PHP and Symfony versions does fados/chartjs-bundle require?
- The bundle targets Symfony 2.3/2.8 and PHP >=5.3, which matches the era it was released in. It does not declare support for Laravel or for modern PHP versions. A current Laravel application needs PHP 8.1+ and Symfony 6/7 components, so the requirements do not overlap.
- Is it safe to run a Symfony 2 bundle in production?
- It is not advisable. Symfony 2.8, the final 2.x LTS, ended community support in November 2018 and commercial support in 2019, so any transitive Symfony 2.x dependency is unpatched against CVEs disclosed since. The bundle itself is unmaintained, with no releases since 2017. Running it in production means owning the security risk yourself.
- Does fados/chartjs-bundle support server-side chart image rendering?
- No. The bundle only outputs a canvas element and a JSON chart configuration for client-side Chart.js. It does not render PNG or SVG on the server and has no export, queue, or headless-browser integration. If you need server-side images, you need a different tool entirely.
- What are the alternatives to fados/chartjs-bundle for Laravel projects?
- For Laravel, the practical options are writing a small in-house Blade component plus a Chart.js wrapper, or using a maintained Laravel chart package that fits your PHP and Laravel versions. Forking this bundle into a service provider and Blade component is only about 50 to 150 lines, but then you own the fork. Because the feature surface is thin, in-house is usually cheaper than adopting or forking.