adiog/syntax-highlight-bundle
Symfony bundle that packages Alex Gorbatchev’s SyntaxHighlighter 3.0.83 for Composer-based apps. Install via composer, enable the bundle in AppKernel, then run assets:install to publish the JS/CSS for client-side code highlighting.
assets:install) may conflict with Webpack Encore or Vite setups.dev-master branch is unstable (no version tags, no CI/CD). Updates could break syntax highlighting.assets:install command assumes Symfony’s legacy asset system. Apps using Webpack Encore or Vite would need:
app.js.postcss or sass-loader.dev-master).AppKernel.php.php bin/console assets:install (or manually copy files to web/).| Component | Compatibility Risk | Mitigation Strategy |
|---|---|---|
| Symfony 2/3 | ✅ Low | Follow README exactly. |
| Symfony 4+ | ❌ High | Avoid; use modern alternatives. |
| Twig | ✅ Low | Works as-is. |
| Blade (Laravel) | ❌ High | Requires manual JS/CSS injection. |
| Webpack/Vite | ❌ High | Manually include JS/CSS in app.js. |
| jQuery | ❌ High | May conflict with app’s jQuery version. |
| CSP Headers | ❌ High | JS may need unsafe-inline or nonce. |
composer.json and run composer update.assets:install).README.md.dev-master branch may break without warning. No semantic versioning.window.SyntaxHighlighter).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| JS/CSS not loaded | Broken syntax highlighting | Check assets:install output. |
| jQuery conflict | Highlighter fails silently | Use jQuery.noConflict(). |
| XSS via user-provided code | Security breach | Sanitize input or use a modern lib. |
| Symfony upgrade breaks bundle | Highlighter stops working | Fork and maintain the bundle. |
dev-master breaks |
Highlighter fails | Pin to a specific commit. |
How can I help you explore Laravel packages today?