webwizo/laravel-shortcodes
Add WordPress-style shortcodes to any Laravel app. Register custom shortcode classes, then use them in Blade views, content, or emails. Supports attributes, self-closing and enclosing tags, with a clean API for parsing and rendering dynamic content.
Architecture fit: The package sits in the content-rendering path — it parses shortcode attributes (e.g. [widget id="5" mode="x"]) and compiles them into output. This release targets an integration seam that matters for any Laravel app that runs user-authored content through an HTML sanitizer before shortcode compilation. That ordering (sanitize → parse) is common in CMS/blog/WYSIWYG flows, so the fix is relevant to the mainstream use case rather than an edge configuration.
Integration feasibility: Low-friction. This is a patch-level bug fix with no API surface change described. Existing call sites to parseAttributes() and compile() are unaffected in signature. Adopters already on the 1.0.x line can take it without code changes; the fix is transparent to consumers who never hit numeric-entity-encoded content.
Technical risk: Low but non-zero. The change alters attribute-decoding behavior, which means previously mis-parsed inputs will now parse correctly — output for affected content will change (from garbled numeric-indexed fragments to proper named key/value pairs). That is the intended outcome, but it is a behavior change for anyone who built workarounds around the broken parsing. Secondary risk: the underlying cause (entity encoding introduced by sanitizers) hints at a loosely coupled dependency on sanitizer behavior; other entity forms (e.g. = hex, or =) are not mentioned as covered, so the fix may be narrower than the class of problem.
Key questions:
") and named entities, or only decimal?Stack fit: Native fit for Laravel/PHP content pipelines — service-provider registration, Blade-adjacent rendering, and Composer-managed updates. No new runtime dependency is implied by the fix.
Migration path: Upgrade within 1.0.x via normal Composer constraint bump. Before rollout, inventory content that traverses a sanitizer ahead of shortcode compilation; that subset is where output will visibly change. For each affected template or content type, diff rendered output pre/post upgrade rather than assuming equivalence.
Compatibility: No breaking changes signalled. Backward compatibility holds for correctly-parsed content and for content without entity-encoded attributes. The incompatibility risk is behavioral, not structural — it lives in stored content and cached rendered output, not in code signatures.
Sequencing:
0, 1, 2 indexed fragments.Maintenance: Minimal. Patch-level fix, no configuration drift, no migration scripts. The HtmlEntityAttributeParsingTest regression test is a genuine operational asset — it locks the decode behavior so a future sanitizer or parser refactor cannot silently reintroduce the bug. Treat that test as the guardrail to preserve during any fork or vendoring.
Support: Expect a small, bounded tail of support tickets from content authors reporting that previously-broken shortcodes now render differently (or, conversely, that a workaround they applied is now double-applied). Prepare a short internal note explaining the change in terms of "attributes with encoded quotes/equals now parse correctly."
Scaling: Neutral. Attribute decoding is trivial per-render CPU work; the change does not alter complexity. The real scaling consideration is cache invalidation — rendered-output caches keyed on content hash will need a flush, and CDN or page-level caches may serve stale broken markup until expired.
Failure modes:
Ramp-up: Effectively zero for existing consumers — no new concepts, no API to learn. For new integrators, the one thing to internalize is the ordering contract between sanitization and shortcode compilation; the release note is the best available documentation of that interaction, which itself suggests the package would benefit from an explicit "sanitizers and shortcodes" doc section.
How can I help you explore Laravel packages today?