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

Inky Extra Laravel Package

twig/inky-extra

Twig extension that provides the inky_to_html filter, converting Zurb Inky email templates into responsive, table-based HTML. It brings Inky's component-driven markup to Twig-based apps, letting you write cleaner email layouts that render reliably across mail clients.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. twig/inky-extra is a thin Twig extension that registers the inky_to_html filter, delegating layout compilation to ZURB Inky. Architecturally it is a presentation-layer add-on, not infrastructure: no services, no queues, no schema, no external calls. It fits cleanly into any PHP stack that already renders email views through Twig (the Symfony/Laravel-with-TwigBridge lineage). For a Blade-first Laravel application, it is not a drop-in — it forces a dual-templating decision (scoped Twig environment for emails only, or broader Twig adoption). That is the single most important architectural fork a TPM must resolve before committing.

Integration feasibility. Low-to-moderate. The package is Composer-installable, MIT-licensed, and requires only a Twig Environment with the extension registered. There is no runtime dependency, no migration, and no data-layer impact. The real effort is organizational and configuration-level: standing up a rendering path for emails and deciding how it coexists with Laravel's native Mailable/Blade flow.

Technical risk.

  • Blade/Twig coexistence — dual engines mean two mental models, two caching paths, and inconsistent review practices. Highest-probability source of developer error.
  • Security posture — the v3.26.0 release explicitly fixes XSS and pre-escapes input on HTML-emitting filters (CVE-2026-46637). This is reassuring for maintenance velocity but also a signal that rendering untrusted dynamic content into HTML through this filter is an active attack surface. Any adoption must pin >=3.26.0 and enforce escaping discipline in Twig.
  • Ecosystem immaturity — 166 stars and 0 dependents indicate limited real-world hardening. Blast radius if the package stalls is moderate (it wraps Inky, which is independently consumable), but there is no evidence base of peer adoption to lean on.
  • Rendering fidelity is not guaranteed — Inky outputs email-safe HTML, but Outlook/Gmail quirks and CSS inlining still require a real client-QA loop (Litmus/Email on Acid). The package does not remove that obligation.
  • Design ceiling — Inky is opinionated; dark mode, AMP, and heavy interactivity are out of scope. Design stakeholders must accept constraints up front.

Key questions to close before a decision:

  1. Is the team already on Twig, or is this a Blade-first app? (Determines whether this is "configure it" or "introduce a second templating engine.")
  2. What is current email volume and failure rate, and what is the measurable baseline we are improving?
  3. Who owns security patching for this dependency, and what is the SLA for applying CVE fixes?
  4. Do roadmap requirements include dark mode, AMP, or client-side interactivity? (If yes, Inky is the wrong tool.)
  5. What is the current authoring workflow (design → dev handoff), and will Inky actually reduce handoffs or just relocate them?

Integration Approach

Stack fit. Best fit is Symfony/Twig or a Laravel app already using TwigBridge. For Blade-native Laravel, the pragmatic pattern is a scoped Twig environment dedicated to emails, registered via a service provider and pointed at resources/views/emails. Do not convert application views; keep Blade for web and Twig+Inky for email only. This contains the dual-engine cost to one bounded surface.

Migration path (phased, measurable at each gate).

  1. Setup (week 1): add twig/twig ^3.x and twig/inky-extra ^3.26 to composer.json; register a singleton Twig environment with filesystem loader, template cache, and InkyExtension; create resources/views/emails/ and a base InkyMailable/renderer service that centralizes escaping and CSS inlining (premailer-style).
  2. Pilot (weeks 2–3): migrate 2–3 high-volume, low-variance flows (password reset, order confirmation, welcome). Benchmark render time, error rate, and dev hours against the current baseline.
  3. Standardize (week 4): lock the base class, template conventions, and escaping rules; add CI validation (lint/compile check) so malformed templates fail the build, not production sends.
  4. Roll out (weeks 5–6): migrate remaining transactional templates; leave marketing to a follow-up decision once the pilot data is in.
  5. Optimize (ongoing): enable compiled-template caching, render off the request path via queues, and monitor failures.

Compatibility considerations.

  • Pin the dependency at ^3.26 or later to inherit the CVE-2026-46637 XSS fix; document the pin rationale in the repo.
  • Verify Twig 3.x against the PHP version in use and against TwigBridge (if applicable); confirm the extension registers cleanly alongside other Twig extensions.
  • CSS inlining is not provided by this package — pair it with an inliner (premailer or equivalent) or Outlook/Gmail rendering will degrade.
  • Keep email templates out of the Blade view cache path to avoid cache-collision confusion.

Sequencing principle. Prove the rendering pipeline with one template before proving the authoring workflow across the team. The technical integration is cheap; the team-behavior change is the expensive part, and it should be sequenced last.

Operational Impact

Maintenance. The package lives under the twigphp organization and shows an active cadence (v3.26.0 shipped a CVE fix). That is a genuine positive for a TPM weighing bus-factor risk. However, low stars and zero dependents mean we should treat it as "maintained, not widely battle-tested" and budget internal ownership accordingly: assign a named maintainer, track upstream releases, and patch within a defined window (e.g., 14 days for security fixes). The dependency surface is small (Twig + Inky), which keeps upgrade risk contained.

Support. No vendor SLA and no commercial backing. Support is community/upstream-issue-driven. Operationally this means: we own first-line diagnosis, we need a documented escalation path to upstream, and we should keep the Inky compilation step isolated enough that a fallback to raw HTML templates is possible without a rewrite.

Scaling. Server-side rendering is CPU-cheap and scales horizontally with the existing web/queue tier. At 10K–100K+ emails/month the cost is negligible; the real scale lever is compiled-template caching and queue-based rendering so peak sends don't block request threads. No new infrastructure is required, which keeps the scaling story simple to explain to stakeholders.

Failure modes to design against.

  • XSS via unescaped dynamic content — mitigated by pinning ≥3.26.0 and enforcing Twig autoescape; treat as a standing security-review item.
  • Silent HTML malformation — Inky can emit structurally valid but visually broken output; catch with CI compile checks and a rendering-QA gate on template changes.
  • Template syntax errors blocking sends — fatal for transactional flows; require pre-merge validation.
  • Cache staleness — compiled Twig cache must invalidate on deploy; verify auto_reload/cache-clear behavior in CI.
  • Blade/Twig developer confusion — two engines means wrong-file edits and misrouted data; mitigate with directory conventions and onboarding docs.
  • Upstream stall — low adoption increases abandonment risk; keep the Inky step behind an interface so the engine can be swapped.

Ramp-up. Realistic estimate: ~1 sprint for engineering to stand up the scoped Twig environment and pilot, plus ongoing 1–2 sprints of template migration for a typical transactional set. Developers need modest upskilling (Inky component syntax + Twig conditionals — both lightweight for PHP devs). Designers need a short Inky constraint briefing so expectations on dark mode/AMP are set before, not after, build.

TPM recommendation and metrics. Run a 2-month pilot on three transactional flows with a go/no-go gate. Track: (1) dev hours per template vs. baseline, (2) email rendering failure/support-ticket rate, (3) time-to-iterate on a template change, and (4) zero security regressions from the escaping discipline. Success on those four justifies broader rollout; failure on rendering fidelity or security posture is a clean stop-loss, given the contained blast radius of a scoped email-only integration.

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.
teamzac/geocoder
ideatica/config-writer
keaton-php/pipe-dream
jacksonwebservices/laravel-user-suite
maksimru/conditional-laravel-debugbar
gismatul/nova-support-chat
gismatul/laravel-support-chat
networkrailbusinesssystems/oracle-api
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel