Repository navigation
Releases: typephp-php/typephp
Releases · typephp-php/typephp
Release list
v0.11.8
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
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
v0.11.5
What's Changed
- Minor feature improvements and bug fixes by @rcalicdan in #115
Full Changelog: v0.11.4...v0.11.5
v0.11.4
v0.11.3
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
What's Changed
- Minor bug fixes in #104 and quality of life improvements in #105 by @rcalicdan in #106
Full Changelog: v0.11.1...v0.11.2
v0.11.1
- Improve warning output violation mdoe.
Full Changelog: v0.11.0...v0.11.1
v0.11.0
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 theon_violationconfiguration 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 deduplicatedE_USER_WARNINGnotices. -
Global Value Redaction (
redact_values):
Added universal value masking viatypephp.php,composer.json, or theTYPEPHP_REDACT_VALUESenvironment variable. Masks raw values inTypeErrormessages and audit reports (e.g.,string giveninstead 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 rootcomposer.jsonunderextra.typephp, includingauto-boot,on-violation,report-file,fail-on-report, andredact-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:
AddedNode\Stmt\Blockto soft-scope boundaries.@varannotations 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@vardocblock were not resolved against the declaring trait'suseimports when the trait was composed through an intermediate trait. - Parent Property Assignment from Cross-File Traits (#99):
Fixed an issue where property@varcontracts 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):
Fixedfeof()returning true one read too early on plain files, and eliminated spurious warnings when generating archives usingPharData. - Static Property
isset()Compilation Failure (#101):
Fixed an AST transformation bug whereisset()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
What's Changed
- Minor bug fixed and resolve #93 by @rcalicdan in #96
Full Changelog: v0.10.27...v0.10.28