Skip to content

Releases: typephp-php/typephp

v0.11.8

Choose a tag to compare

@rcalicdan rcalicdan released this 18 Oct 06:50
0e59adc

What's Changed

  • Improve F-bounded generics handling and static late bound generics parameter detection. Minor bug fixes and performance optimization by @rcalicdan in #119

Full Changelog: v0.11.7...v0.11.8

v0.11.7

Choose a tag to compare

@rcalicdan rcalicdan released this 14 Oct 17:21

What's Changed

  • Added support for php 8.5 clonewith syntax and Minor performance improvement by @rcalicdan in #118
  • Improve error formatting for f-bounded generics error

Full Changelog: v0.11.6...v0.11.7

v0.11.6

Choose a tag to compare

@rcalicdan rcalicdan released this 13 Oct 17:22
4f18780

What's Changed

Full Changelog: v0.11.5...v0.11.6

v0.11.5

Choose a tag to compare

@rcalicdan rcalicdan released this 11 Oct 15:31
fb08b46

What's Changed

Full Changelog: v0.11.4...v0.11.5

v0.11.4

Choose a tag to compare

@rcalicdan rcalicdan released this 10 Oct 08:48
c673bd0

What's Changed

Full Changelog: v0.11.3...v0.11.4

v0.11.3

Choose a tag to compare

@rcalicdan rcalicdan released this 07 Oct 07:07
4e4244e

What's Changed

  • Enhance Docblock Normalization for nested Callable docblock syntax and Improve .env Framework Config handling by @rcalicdan in #107

Full Changelog: v0.11.2...v0.11.3

v0.11.2

Choose a tag to compare

@rcalicdan rcalicdan released this 06 Oct 10:22
08fa491

What's Changed

Full Changelog: v0.11.1...v0.11.2

v0.11.1

Choose a tag to compare

@rcalicdan rcalicdan released this 05 Oct 07:23
  • Improve warning output violation mdoe.

Full Changelog: v0.11.0...v0.11.1

v0.11.0

Choose a tag to compare

@rcalicdan rcalicdan released this 04 Oct 19:21
9c42c15

TypePHP v0.11.0 introduces audit reporting mode, global value redaction, runtime validation for array and object member mutations, configuration via root composer.json, and resolves several edge cases in stream I/O, trait inheritance, static property access, and reference returns.


New Features

  • Audit Report and Warning Modes (#94):
    Added the on_violation configuration option ('throw', 'report', 'warn'). In 'report' mode, violations do not crash execution; they are collected into a structured JSON report file at shutdown, with support for parallel test runner sharding (ParaTest, Pest). In 'warn' mode, violations emit deduplicated E_USER_WARNING notices.
  • Global Value Redaction (redact_values):
    Added universal value masking via typephp.php, composer.json, or the TYPEPHP_REDACT_VALUES environment variable. Masks raw values in TypeError messages and audit reports (e.g., string given instead of leaking raw secrets or PII), providing compliance protection across parameters, returns, properties, and local variables.
  • Project Configuration in composer.json (extra.typephp) (#95):
    Added support for project-level settings in root composer.json under extra.typephp, including auto-boot, on-violation, report-file, fail-on-report, and redact-values.
  • Array Dimension and Object Property Member Validation:
    Added runtime type checking for member assignments ($arr[$key] = $val, $arr[] = $val, $obj->prop = $val, and nested chains). Mutations are validated atomically on isolated copies to preserve state upon failure.
  • O(1) Collection Mutation Optimization in Hybrid Mode:
    Mutations to collections (list<T>, array<K, V>, T[]) in hybrid mode now validate the modified element directly in $O(1)$ time, eliminating whole-array re-scans while preventing false negatives on interior elements.
  • Bare Block Lexical Scoping:
    Added Node\Stmt\Block to soft-scope boundaries. @var annotations declared inside bare { ... } blocks now shadow outer types locally and revert when the block closes.

Bug Fixes

  • Nested Trait Property Type Resolution (#103):
    Fixed an issue where class names in a property's @var docblock were not resolved against the declaring trait's use imports when the trait was composed through an intermediate trait.
  • Parent Property Assignment from Cross-File Traits (#99):
    Fixed an issue where property @var contracts were left unresolved when assigned from a trait located in a separate file and namespace from the parent model.
  • Stream Wrapper Plain File I/O and PharData Parity (#102):
    Fixed feof() returning true one read too early on plain files, and eliminated spurious warnings when generating archives using PharData.
  • Static Property isset() Compilation Failure (#101):
    Fixed an AST transformation bug where isset() on static properties generated invalid expression checks (Cannot use isset() on the result of an expression).
  • Return by Reference Preservation (#98):
    Fixed methods declaring reference returns (function &name()) losing their reference binding after return type checks.
  • Conditional Returns on Private and Protected Methods (#97):
    Fixed parameter-based conditional return types (($param is T ? A : B)) on private and protected methods incorrectly evaluating to the false branch due to missing parameter scope arguments.

Upgrade Notice

This release contains no breaking changes to existing public APIs or configuration files. If upgrading from v0.10.x, run vendor/bin/typephp cache:clear to invalidate cached AST transformations.

Full Changelog: v0.10.28...v0.11.0

v0.10.28

Choose a tag to compare

@rcalicdan rcalicdan released this 03 Oct 14:58
88fcb12

What's Changed

Full Changelog: v0.10.27...v0.10.28