siphoc/pdf-bundle
Siphoc PDF Bundle is a Symfony/PHP bundle that wraps wkhtmltopdf to generate PDFs from HTML strings or URLs. It provides service-based rendering, configurable binary paths and command options, and convenient streamed or downloadable responses for invoices, reports, tickets, and other printable docum...
Architecture fit: This is a Symfony2 bundle (siphoc/pdf-bundle), not a Laravel package. There is no service provider, no config/pdf.php publishable config, no facade, and no Laravel-style container binding. In a Laravel codebase it has effectively zero architectural fit — adopting it would mean maintaining a forked DI layer for a framework generation that Laravel never shared. The only reusable asset is the pattern: a thin service that takes rendered HTML and returns PDF bytes, decoupled from controllers. A TPM should treat this package as an architectural reference and a legacy-footprint signal, not a dependency candidate.
Integration feasibility: For Laravel, near zero without a rewrite of the bundle's container wiring. The underlying renderer it wraps (dompdf-class engine) is available directly through maintained packages or as an out-of-process service, so the bundle contributes nothing that cannot be obtained in one composer require of a supported library. For an inherited Symfony 2.x application, integration is feasible only as a pinned, quarantined stopgap. The TPM deliverable here is a scoping input: it tells you PDF generation exists in the legacy footprint and gives you a sizing anchor for the migration ticket.
Technical risk: High. Symfony 2.x is end-of-life with no security backports; the bundle has 14 stars, zero dependents, and no visible maintenance cadence. Transitive dependency exposure sits in the wrapped PDF engine, not in the wrapper itself — that engine is the actual CVE surface, particularly if any template input is user-influenced. Documentation is sparse enough that behavior must be read out of source. The composite score of 0.25 against an opportunity signal near 9 is a data-quality flag: in a deprecated niche, high opportunity usually means an empty market, not an opening. Do not let this into a vendor scorecard without a manual read.
Key questions:
Stack fit: Laravel 9–11 on PHP 8.1+ — no fit; do not adopt. Symfony 2.7/2.8 on PHP 5.6–7.1 — the only environment where it installs without heroics. Modern Symfony with Flex — no fit. The practical TPM position is to declare the stack mismatch explicitly in the ADR so the decision is not relitigated per team.
Migration path: In Laravel, skip the bundle and go straight to a maintained renderer or, preferably, an HTTP-based rendering service (headless Chromium sidecar, Gotenberg, or a managed API). Define the seam first: a single PdfRenderer contract with render(string $html, array $options): string bound in a service provider, so the implementation is swappable and the framework upgrade never becomes a document-generation project. For inherited Symfony2 code, wrap the existing bundle service behind that same contract, then swap the binding in a branch. Keep templates and business logic in the application; move rendering out of process.
Compatibility: Expect Composer constraint conflicts on PHP 8, PSR-4/PSR-11 modern wiring, and any recent Symfony or Laravel package. Pin transitive dependencies, run an SCA scan against the resolved lockfile, and test on the exact production PHP patch version. Output differences across engine versions are the quiet failure: fonts, page breaks, and metadata drift without errors.
Sequencing:
Maintenance: Effectively unmaintained. Zero dependents means zero de facto community maintenance — the burden transfers to your team on day one. A TPM should budget explicit fork-ownership time (patch, SCA, engine upgrades) for as long as the dependency survives, and cap that budget with a dated replacement commitment rather than an open-ended one.
Support: No vendor, minimal community, sparse documentation. Mean time to resolution depends on someone reading source. The mitigation is not training on the bundle — it is shrinking the surface: one adapter, one place to fix things, one owner named in the runbook.
Scaling: The bundle adds little overhead; the engine is the cost center — CPU- and memory-bound, with pathological cases on large tables and embedded images. For anything beyond interactive single-document requests, move generation to asynchronous workers and cache rendered assets by content hash. This is a roadmap decision the TPM should make before volume arrives, because retrofitting queueing into synchronous controller code is far more expensive than designing for it.
Failure modes: PHP version drift breaking the pinned dependency; Composer conflicts blocking unrelated upgrades; memory exhaustion on large or image-heavy documents; missing fonts and Unicode gaps surfacing only in production; unpatched CVEs in the wrapped engine; and silent rendering differences after environment or engine changes. The last one is the most dangerous operationally — it produces wrong invoices without throwing exceptions. Gate it with golden-file output tests in CI.
Ramp-up: Moderate to high. Engineers need Symfony2 bundle conventions, the bundle's service wiring, and the wrapped engine's API — none of it documented. The TPM lever is to fund a short spike that produces a written adapter spec and the golden-file corpus, so the knowledge lives in the repo rather than in one engineer's head. In a Laravel context, ramp-up should be near zero: the team should never touch this package at all, and the assessment's real output is the decision record explaining why.
How can I help you explore Laravel packages today?