thunderer/shortcode
Framework-agnostic PHP library for parsing and processing shortcodes/BBCodes. Extract shortcodes from text, handle replacements, and apply them via processors and events. Includes serializers for Text/XML/JSON/YAML. Supports PHP 5.3–8.x.
[user-profile], [image width=600]). Reduces reliance on hardcoded templates or complex frontend frameworks.[alert type="warning"] for admin dashboards).[api-call endpoint="users"]).Adopt If:
RegexParser for speed; RegularParser for correctness).Look Elsewhere If:
react-markdown).WordpressParser but be aware of limitations).For Executives:
"This package lets us build dynamic content systems faster without locking into WordPress or heavy frontend tools. For example, we could let users format comments or docs with shortcodes like [highlight]code[/highlight]—processed server-side in PHP—while keeping full control over the output. It’s MIT-licensed, actively maintained, and avoids vendor lock-in. Early adopters like [hypothetical team] used it to reduce template maintenance by 40%."
For Engineers: *"Shortcode is a modular PHP library that replaces ad-hoc regex or string replacements with a clean, extensible API. Key benefits:
ShortcodeFacade) or low-level control (Processor, Parser).[[tag]] instead of [tag]).RegexParser is fast for simple cases; RegularParser handles edge cases (nesting, malformed tags).[user-avatar] regex with a handler that fetches data from the DB dynamically. Or serialize shortcodes to JSON for a headless CMS."*For Designers/Content Teams: *"This tool lets you add interactive elements to static content without coding. For example:
[video src="..." width="500"].[note type="warning"].[weather city="NY"].
We can design these shortcodes to match our brand, and they’ll work across all our PHP apps—no frontend dependencies."*How can I help you explore Laravel packages today?