Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Shortcodes Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Which sanitizers were observed producing numeric entities (HTMLPurifier, DOMPurify output passed server-side, WordPress-style filters)?
  • Does the decode path handle hex numeric entities (") and named entities, or only decimal?
  • Is there a documented contract for when sanitization should occur relative to shortcode parsing, or is ordering left to the integrator?
  • Are there known workarounds in the wild (custom attribute parsers, pre-decode middleware) that this release now makes redundant or conflicting?
  • What is the package's versioning policy — is a parsing-behavior change treated as patch-appropriate, and what would force a minor/major?

Integration Approach

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:

  1. Pin the package to the patched release in a staging branch.
  2. Build a representative fixture set: shortcodes with quoted attributes, shortcodes passed through the sanitizer, and shortcodes with no sanitizer in the path.
  3. Assert rendered output matches expectations post-fix; specifically verify attributes resolve to named pairs rather than 0, 1, 2 indexed fragments.
  4. Clear compiled/rendered caches, since cached output from the broken parser will persist past deploy.
  5. Roll to production behind normal release cadence; monitor for content complaints rather than error rates, since this failure mode is silent and visual.

Operational Impact

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:

  • Silent mis-render persisted in cache: the primary post-deploy risk. Mitigate with an explicit cache purge step.
  • Double-decoding: if the application already pre-decodes entities before handing content to the package, behavior could shift in the opposite direction. Worth a targeted test.
  • Partial coverage: hex or named entities not covered by this fix would fail identically to the original bug — verify rather than assume.
  • Ordering ambiguity: teams that sanitize after compilation were never affected and should not change their pipeline based on this note.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast