Skip to content

Upgrade Guide

TCPDF-Next is currently on the 1.x release line. This page explains the versioning policy and how to stay up to date.

Semantic Versioning

TCPDF-Next follows Semantic Versioning 2.0.0:

Version BumpMeaningSafe to Update?
Patch (1.0.x)Bug fixes, documentation, internal refactorsYes — fully backward-compatible
Minor (1.x.0)New features, non-breaking additionsYes — no existing code changes needed
Major (x.0.0)Breaking API changesRead the migration guide first

During the 1.x series, the public API is considered stable. Any breaking change will be reserved for the next major release and will be accompanied by a detailed migration guide.

Checking the Changelog

Before upgrading, review the CHANGELOG on GitHub. Every release lists:

  • Added — new features and classes
  • Changed — modifications to existing behaviour
  • Deprecated — APIs that will be removed in the next major version
  • Fixed — bug fixes
  • Security — vulnerability patches (upgrade immediately)

Updating via Composer

bash
# Update to the latest compatible version within your constraint
composer update yeeefang/tcpdf-next

# Or pin to a specific version
composer require yeeefang/tcpdf-next:^1.2

After updating, run your test suite to verify nothing is broken:

bash
composer test

Migrating from Other Libraries

If you are coming from another PDF library, the following guides will help you map familiar concepts to their TCPDF-Next equivalents:

From legacy TCPDF

TCPDF-Next is not a fork. It is a ground-up rewrite with a completely new API. Key differences:

  • Static configuration constants replaced by typed enums and value objects.
  • Global state eliminated — each Document instance is self-contained.
  • All classes are readonly where possible, with strict declare(strict_types=1).
  • PHP 8.5+ required (see Why PHP 8.5?).

A side-by-side migration cheat sheet will be published alongside the 1.0 stable release.

From FPDF / FPDI

The cell/multiCell/text/write methods have intentionally similar names, so the learning curve is minimal. The main differences are:

  • Named parameters and enums replace positional integer flags.
  • Output uses the OutputDestination enum instead of single-character strings.
  • Font management is handled through FontConfig rather than manual file placement.

From Dompdf / wkhtmltopdf

If you are used to HTML-to-PDF conversion, see the Artisan package, which provides a full CSS3 rendering pipeline on top of TCPDF-Next Core. For programmatic PDF construction, the API-driven approach described in Basic Usage will be more performant and predictable than HTML-based generation.

Released under the LGPL-3.0-or-later License.