- Does krystal-sf/ux-prism work with Laravel?
- No. Despite UX-toolkit style marketing language, krystal-sf/ux-prism is a Symfony UX bundle from the Krystal Symfony estate, built around Twig, AssetMapper, importmaps, and Symfony Flex bundle registration. It has no Blade views, no service provider, and no Laravel package discovery support, so it cannot be dropped into a Laravel app. For a Laravel target the practical move is to replicate the pattern natively with a Blade component rather than add a compatibility shim.
- How do I install krystal-sf/ux-prism in a Symfony project?
- Run composer require krystal-sf/ux-prism, then register the bundle either through the Flex recipe or a manual entry in config/bundles.php. Add one or two importmap entries for prismjs and the package's Stimulus controller, then reference the Twig function or twig: component in your templates. Expect one to two developer days for a realistic spike including theme selection, language curation, and an escaping review.
- Why can't Composer find krystal-sf/ux-prism?
- The repository lives on GitLab under an organization namespace and is almost certainly private, so Packagist will not resolve it. You need a Composer VCS repository entry pointing at the GitLab URL plus an auth token in CI, or a mirrored fork inside your own namespace. Treat that access setup as a prerequisite task, not an afterthought, because it also becomes an availability dependency you do not control.
- Does krystal-sf/ux-prism require AssetMapper, or does it also support Webpack Encore?
- The bundle is designed around the AssetMapper plus importmap pipeline and Symfony UX Twig components, and it does not appear to ship an Encore or Webpack Mix integration path. Teams on Encore inherit a translation layer that usually costs more than wiring Prism.js directly. Before committing, confirm with the maintainer whether importmap is a hard requirement or just the documented default.
- Is krystal-sf/ux-prism safe for highlighting untrusted user code?
- That is the risk you must test rather than read. Syntax highlighting consumes potentially user-authored code, and the classic failure is escaping after highlighting instead of before, or relying on Prism's unescaped-markup plugin. Run an explicit test with a script tag payload through the actual Twig component or function before you ship. If the output is inserted with raw filters, sanitize upstream or pick a different renderer.
- Which PHP and Symfony versions does krystal-sf/ux-prism support?
- There is no visible CI matrix, no dependents, and no public score, so supported PHP and Symfony ranges are only knowable from the composer.json peer constraints. Those constraints will gate your own Symfony major upgrades, since Symfony UX Twig components and AssetMapper have both shipped behavior changes across minor releases. Ask the owning team directly whether a matrix exists and what the support commitment is.
- How do I configure Prism themes, plugins, and languages in krystal-sf/ux-prism?
- Configuration appears to run through a bundle config tree covering theme selection, plugin toggles, and the language set. It is unclear from the outside whether the package pins prismjs itself or expects the host app to provide it through the importmap, and either answer creates a version negotiation problem at the asset layer. Curate languages deliberately, because importing every Prism language component bloats the bundle quickly.
- What is the Laravel equivalent of this Prism integration?
- There is none in the organization, and none is expected. The equivalent is roughly half a day of native work: a Blade component such as x-code-block, a resources/js/prism.js entry importing prismjs plus selectively imported language components, a service provider publishing theme CSS, and a stack-based script include. That gives your team outright ownership and avoids a Symfony dependency entirely.
- Is krystal-sf/ux-prism actively maintained?
- There is no adoption signal to point at: no stars, no dependents, no public issue traffic, and a single maintainer serving a single consumer organization. That means no independent security review, no CVE feed, and no external bug surface. It is best treated as an internal convenience wrapper around a commodity library rather than a dependency you can lean on long term.
- What should Laravel teams use instead of krystal-sf/ux-prism for code highlighting?
- Use Prism.js or Shiki directly through Vite and wrap it in your own Blade component. Prism.js is the same underlying library this bundle wraps, so you get identical output without the Symfony coupling, and Shiki is a strong option if you want server-side highlighting with zero client JavaScript. Either way, escape code before highlighting and test with a script tag payload.