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
Mjml Binary

Mjml Binary Laravel Package

gollumsf/mjml-binary

gollumsf/mjml-binary makes it easy to compile MJML into responsive HTML emails in Laravel/PHP projects. It bundles the MJML binary, so you can render templates without managing external installations or dependencies.

View on GitHub
Deep Wiki
Context7

gollumsf/mjml-binary simplifies compiling MJML email templates into responsive HTML in Laravel and PHP applications by wrapping the MJML binary. It reduces the need to manually install or manage Node.js tooling, giving you a clean, programmatic way to turn .mjml templates into production-ready email markup.

  • Lightweight wrapper around the MJML binary
  • Simple API for compiling templates to responsive HTML
  • Laravel-friendly integration and configuration
  • Configurable binary path and compiler options
  • Helps keep email builds consistent across environments
Frequently asked questions about Mjml Binary
Do I need Node.js or npm to compile MJML in Laravel with gollumsf/mjml-binary?
No. The package ships precompiled MJML binaries as a Composer dependency and invokes them through a subprocess (Symfony Process), so you do not need Node.js or npm on your servers or in your Docker images. The trade-off is that you must be able to execute a bundled native binary at runtime, which rules out serverless and edge runtimes.
How do I install and use gollumsf/mjml-binary in a Laravel app?
Install it with composer require gollumsf/mjml-binary, then call the bundled binary on a .mjml template through Symfony Process and capture the HTML from stdout. The package was built for MjmlBundle (Symfony), so in Laravel you write a small wrapper service yourself instead of getting config, caching, and template helpers out of the box. There is no service to run, no API key, and no network call at render time.
Which MJML version is bundled, and how do I upgrade it?
The shipped binary is effectively frozen at an MJML release from around early 2021, since the package's last release was January 2021. Any newer MJML components or responsive-email fixes are unavailable unless you rebuild or replace the binary yourself. Check the artifact in vendor before assuming a component works, and plan an upgrade path before depending on new MJML features.
Does this package work on Alpine, ARM64, or Windows?
Binaries are architecture- and libc-specific, so Alpine (musl), ARM64 (Graviton, Apple Silicon), and Windows are common failure points. Confirm the release assets cover your Docker base image and CI runner before adopting, because your base-image choice becomes constrained by what the package ships. Many teams end up pinning a glibc amd64 image purely to make it run.
Is gollumsf/mjml-binary compatible with Laravel 10 or 11 and PHP 8.x?
The package is a thin binary wrapper, so PHP 8.x itself is not the blocker; the real constraint is that it targets MjmlBundle for Symfony, which must be current and compatible with your stack. Because the last release was January 2021, there is no tested or declared support for modern Laravel versions, so you should validate the binary in your own CI before committing. In Laravel you would bypass MjmlBundle entirely and invoke the binary via Process.
What license does gollumsf/mjml-binary use, and is GPL-3.0 a problem for my SaaS?
It is licensed GPL-3.0. For internal SaaS email rendering this is usually tolerable, but for redistributed or on-premise-shipped PHP products it is a legal review item and possibly a blocker. Escalate this early rather than assuming it is fine, especially if your product bundles vendor code.
Does Composer install of this package require network access, and will it work in air-gapped CI?
Binary distribution packages typically fetch or place a platform-specific artifact during Composer install or post-install scripts, which means network egress and writable paths at build time. Air-gapped or strict CI pipelines will break unless the artifact is vendored or pre-cached in your internal Composer mirror. Test a clean install in a locked-down pipeline before rolling it out.
Is gollumsf/mjml-binary still maintained, and what are the alternatives if it is abandoned?
It is effectively unmaintained: last release January 2021, around 3 stars, and 0 dependents, so the bus factor is one. Realistic alternatives are running the MJML npm CLI as a build step, calling a hosted MJML API, or adopting a maintained PHP-native renderer. Decide your exit path now, because templates are portable MJML files and swapping the renderer later is mostly a Dockerfile and pipeline change.
How should I test MJML email rendering in PHPUnit or Pest with this binary?
Because rendering happens in a subprocess, your test suite needs the binary available in CI with a matching OS, architecture, and libc. Keep small .mjml fixtures and assert on key output HTML (head styles, media queries, table structure) rather than brittle full-string comparisons. Snapshot tests for a handful of transactional templates catch most regressions from a binary or MJML version change.
How do I render MJML to HTML in Laravel without MjmlBundle?
Run the bundled binary through Symfony Process, passing the template via a file path or stdin, and take the compiled HTML from stdout. Wrap that in a service class or queued job so email sending stays out of the request cycle for high-volume transactional mail. Templates remain plain MJML, so migration from an npm build step or a hosted MJML API is mostly Dockerfile and pipeline cleanup.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource