github nette/latte v3.1.2
Released version 3.1.2

7 hours ago

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.

Don't miss a new latte release

NewReleases is sending notifications on new releases.