takeit/amp-html-bundle
A Symfony bundle that adds AMP HTML support to your app: render AMP-compliant Twig templates, manage AMP components and styles, and serve fast, validated mobile pages alongside existing views. Includes helpers for common AMP tags and easy Composer setup.
Architecture fit
Despite the "Laravel/PHP package" framing, takeit/amp-html-bundle is a Symfony2/Symfony3 bundle, not a framework-agnostic library. Its architecture is tightly coupled to Symfony primitives: a DI extension loading YAML/XML service definitions, an event subscriber on kernel.response to swap the response body, a Twig extension, and bundle configuration merged into the container. None of this maps onto Laravel's service container, middleware pipeline, or Blade. The reusable asset is the thin conversion layer it wraps — almost certainly lullabot/amp, which is itself abandoned — not the packaging.
Integration feasibility Drop-in installation into a Laravel app is not feasible. Feasible paths, in descending order of effort:
lullabot/amp (or a maintained fork) and write your own Laravel glue. Avoids the Symfony baggage entirely — the bundle adds little that isn't one service class plus config.Technical risk — high, on several independent axes:
Key questions
amp-img rewriting) or just lightweight HTML sanitization?amp-toolbox sidecar, or a hosted conversion service)?Stack fit Poor for Laravel. There is no Laravel service provider, no Blade directive, no middleware. Every integration point — config tree, Twig function, response listener, route/controller conventions — must be rebuilt in idiomatic Laravel terms. Treat the bundle as a specification, not a dependency.
Migration path (if AMP is confirmed as a requirement)
config/amp.php, and replace the Symfony kernel.response subscriber with a response middleware or a response macro that rewrites the body for ?amp / amp. subdomain / Accept negotiation.<link rel="amphtml"> back-reference on the canonical page.Compatibility
Verify PHP constraint (^5.5|^7.x era is likely) against the target runtime before any spike. Check the transitive dependency tree for abandoned or vulnerable packages — Composer audit will likely flag issues. If PHP 8 support is absent, the "port" is effectively a rewrite with reference material, and should be estimated as such.
Sequencing
amp-toolbox sidecar, or hosted conversion APIs — compare on fidelity and operational cost.Maintenance Effectively zero upstream. No security patches, no PHP-version updates, no response to bug reports. Any fork we create becomes a permanent internal liability with a named owner or it will rot. Budget ongoing maintenance time even for a "just depend on it" path.
Support No vendor, no active community, no issue triage. Internal engineers are the only escalation path. Documentation is limited to the README and source.
Scaling Conversion is CPU-bound DOM manipulation performed per request. At any meaningful traffic volume this must be cached aggressively (full-page cache keyed by URL + variant) or moved off the request path into a build/precompute step. Validate memory ceilings — DOM rewriting on large HTML documents is memory-hungry, and PHP-FPM workers will surface that quickly.
Failure modes
Ramp-up Low to read — the bundle is small and the conversion concept is straightforward. High to own safely — requires AMP spec familiarity, validator tooling, and a working knowledge of the underlying converter's quirks. Realistically one engineer for 1–2 weeks to spike and evaluate, and continuing fractional ownership thereafter.
TPM recommendation Do not adopt. The package is abandoned, targets EOL frameworks, is architecturally incompatible with Laravel, and sits on a product surface (AMP) whose strategic value has substantially declined. If AMP is genuinely required, take the converter dependency directly, implement ~150 lines of Laravel middleware and configuration, and put a validator in CI — that yields a smaller, owned, testable surface than resurrecting this bundle. If AMP is not a hard requirement, the correct decision is to close the request.
How can I help you explore Laravel packages today?