This release focuses on reducing false positives, improving type system accuracy, performance optimizations, and introducing new linter rules.
New Features
Linter
-
New
property-namerule (#703)
Added a new linter rule to enforce consistent property naming conventions across your codebase. -
New
use-specific-assertionsrule
Introduced a new rule that encourages using specific assertion methods (e.g.,assertTrue,assertNull) instead of genericassertEquals/assertSamewith literal values for better clarity and intent.
Analyzer
- Type narrowing for symbol existence checks
The analyzer now properly narrows types based on symbol and member existence checks likefunction_exists(),method_exists(),property_exists(), anddefined(). This eliminates false positives when conditionally using symbols after checking their existence.
Bug Fixes
Analyzer
-
Fixed false positives for class-string comparisons and static variable initialization
Resolved issues where the analyzer incorrectly flagged valid code involving class-string type comparisons and static variable initialization patterns. -
Fixed false positive for
count()comparison on non-empty-list
The analyzer no longer incorrectly reports issues when comparing the count of anon-empty-listwith integer values. -
Fixed list type preservation when narrowing with
is_array()
Usingis_array()on a union type containing a list no longer incorrectly loses the list type information. -
Fixed interface method resolution for
__callStatic
The analyzer now only reports interface implementation issues when resolving actual methods, not when resolving magic__callStaticcalls. -
Fixed invalid array access assignment value checking
Improved detection of invalid values being assigned through array access expressions.
Reconciler
- Fixed list type narrowing preserving assertion element types
Type narrowing on list types now correctly preserves the element type assertions, preventing false positives in generic list operations.
Docblock
- Fixed
@methodtag withstaticreturn type
The docblock parser now correctly handles@methodtags that specifystaticas their return type.
Linter
- Made
strict-assertionsrule less strict
Thestrict-assertionsrule has been adjusted to reduce noise while still catching problematic assertion patterns.
WASM
- Matched analyzer default settings
The WASM build now uses the same default analyzer settings as the native build for consistent behavior.
Reporting
- Fixed duplicate issue collection
Removed unnecessary duplicate checking when collecting issues, improving performance and correctness.
Performance Improvements
-
Optimized type combiner
Significant performance improvements to the type combination logic, reducing analysis time for codebases with complex type operations. -
Lowered analysis thresholds
Adjusted internal thresholds for formula complexity and algebra operations to improve analysis speed on large codebases without sacrificing accuracy. -
Early return optimization for pragma collection
Added early return when no pragmas are present, avoiding unnecessary processing.
Build Improvements
- Profile-Guided Optimization (PGO) for Tier 1 targets
Release binaries for macOS and Windows are now built with PGO, resulting in 5-15% performance improvements.
Full Changelog: 1.0.0-rc.10...1.0.0-rc.11