Download Latest Version Released version 3.1.2 source code.tar.gz (109.5 kB)
Email in envelope

Get an email when there's a new version of Latte

Home / v3.1.2
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-02-24 1.1 kB
Released version 3.1.2 source code.tar.gz 2026-02-24 109.5 kB
Released version 3.1.2 source code.zip 2026-02-24 213.8 kB
Totals: 3 Items   324.5 kB 0

Latte 3.1.2 introduces a clean feature flag system, tightens up the compiler API with two breaking changes, and brings the codebase under stricter static analysis. If you're extending the compiler, pay attention to the TokenStream and custom function changes below.

  • Feature enum with setFeature()/hasFeature() – a unified way to toggle engine capabilities like StrictTypes, StrictParsing, and MigrationWarnings. The old methods (setStrictTypes(), setStrictParsing(), setMigrationWarnings()) still work but are now deprecated in favor of the enum-based API.
  • setCacheDirectory() replaces the old setTempDirectory() – because "temp" was way too easily confused with "template". The old method still works but is deprecated.
  • LinterExtension now correctly validates ::class expressions – previously {=UnknownClass::class} slipped through validation because it was handled as a class constant instead of a class type check.
  • Added missing native type declarations across the codebase.
  • Improved phpDoc types and descriptions.
  • Unified declare(strict_types=1) to single-line format.
Source: README.md, updated 2026-02-24