dskripchenko/laravel-php-pdf
Laravel integration for the PHP-PDF library, making it easy to generate and work with PDF documents inside your Laravel applications. Provides a familiar service-provider setup and a clean, framework-friendly API for creating PDFs.
Architecture fit
This release strengthens the package's position as a thin, idiomatic Laravel adapter over dskripchenko/php-pdf. Both new features are container-resolution extension points (signing.signer, fonts.provider) rather than concrete implementations, which is the correct architectural choice: it keeps CSP/HSM/KMS and font-licensing concerns out of the package and in application or infrastructure code. The PHP_PDF_SIGNER env fallback matches Laravel convention and allows per-environment bindings (local dev fake signer, production HSM) without code changes. For teams already treating PDF rendering as a platform capability, this is a clean seam to own.
Integration feasibility
Low-to-moderate. Integration is config-only for existing users: absent signing.signer and fonts.provider keys, behaviour is unchanged (certificate/key from config still applies, fonts.families still governs). The one hard dependency is the php-pdf bump from ^1.16 to ^1.18, and effectively ^1.20 if detached CMS signing is in scope. That is a real upgrade, not a patch, and its PHP-version and API surface must be validated before we commit.
Technical risk
CmsSigner may hold a stale HSM session, PIN, or cloud credential. This is the highest-risk item in the release and needs explicit investigation.fonts.families. This will break pixel/byte-level snapshot tests and may change already-approved document templates. It is a correctness fix, but it is user-visible.php-pdf floor pulls in upstream changes across 1.16 → 1.18/1.20 that are not described here and are outside this package's changelog.signDetached() + CmsSigner now fails loudly on <1.20. That is better than a TypeError, but it means a partial upgrade can produce a runtime guard rather than a compile-time one.Key questions
Signer and FontProvider, or are we binding to php-pdf concrete classes?php-pdf 1.18–1.20, and do they match our production runtime?Stack fit
Fits standard Laravel service-provider patterns with no framework version assumptions introduced by this release. The two new config keys are additive and namespaced (signing.*, fonts.*), so a published config file can be merged without conflict. Works naturally alongside existing queue-based rendering and scheduled document generation.
Migration path
php-pdf constraint to ^1.18 (or ^1.20 if detached CMS signing is required) and review the upstream changelog for 1.16 → 1.20 before locking.signing.signer and fonts.provider default to null and that the existing certificate/key path still takes precedence when they are unset.signing.signer first in a non-production environment behind a fake or dev signer, then against a staging HSM/KMS.fonts.provider only where font licensing prevents bundling Liberation/Arial aliases in the repo.Compatibility
Primary gating factors are the PHP runtime and the upstream library floor. Any consumer pinned to older php-pdf will need a coordinated bump. The signDetached + CmsSigner path requires ^1.20 and will otherwise raise a clear error — treat that as a hard prerequisite in acceptance criteria, not a nice-to-have. No breaking changes to this package's public API are signalled.
Sequencing Dependency bump and lockfile audit → config merge with all new keys inert → visual regression pass and re-baselining → signer binding validated in staging → font provider opt-in per deployment → production rollout with signing enabled last, since it carries the external-system dependency.
Maintenance
Ongoing cost is low at the package level (two config keys, one bug fix) but the coupling to php-pdf is now the dominant maintenance vector: we are tracking an upstream library whose releases gate our signing capabilities. Budget a standing task for upstream version review rather than treating this as a one-off bump.
Support Two new classes of support ticket appear. First, signer resolution failures — the error surface will point at container binding rather than at PKI, so first-line support needs a runbook mapping symptoms to "check binding, check HSM reachability, check credential expiry." Second, "bold text renders as regular" reports, which this release fixes but which may now surface as changed document appearance on previously signed or archived templates.
Scaling Signer resolution being cached is good for throughput but potentially bad for concurrency: PKCS#11 tokens and many HSMs serialize cryptographic operations, so horizontal worker scaling will not necessarily scale signing throughput. Font provider calls during rendering may pull and cache font binaries; verify memory footprint per worker before enabling broadly. Plan capacity around the signer, not the renderer.
Failure modes
signDetached runs against php-pdf <1.20 — explicit error, but only at call time.Ramp-up For teams using the package as-is (render, no signing, fonts bundled in the repo): near zero — a dependency bump and a regression pass. For teams adopting the signer binding: substantial. It requires PKI and HSM/KMS fluency that most application teams do not have in-house; expect to involve platform or security engineering, and treat the first integration as a joint effort with an explicit acceptance test for signing under load and across worker restarts. The font provider is a smaller but non-trivial ask, since it implies owning font licensing and distribution decisions.
How can I help you explore Laravel packages today?