Comprehensive Bug Fixes, Late Static Binding, Type Alias Expansion & Line-Drift Hardening - #26
Merged
Merged
Conversation
…seEntityFactory and related entity factories for testing
…e BaseGenericFactory and BaseGenericMap for improved generic handling; add comprehensive tests for nested type aliases and late static binding scenarios.
…emove variadic parameter contracts section
…for exception handling; add AdvancedEdgeCasesTest for comprehensive type validation scenarios
…lidation; enhance error messages for better clarity
…stead of throwing TypeError; enhance DocblockNormalizer to auto-complete return types for callables; add NestedAggregateService for testing; improve tests for GeneratorChecker and LazyIterators.
… add ClassUsingAliasedTraitMethod for trait method aliasing tests; update AdvancedEdgeCasesTest with nested conditional return type tests and trait method aliasing validation.
…ce test cases for optional tuple parameters and lazy callable collections; improve error message assertions in AdvancedEdgeCasesTest.
…examples for clarity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request addresses several edge cases in runtime contract resolution, Abstract Syntax Tree (AST) transformation, and type inheritance. It enhances engine stability across PHP 8.1 through 8.5 and ensures full compatibility with complex framework architectures.
Key Changes
StreamWrapperto preserve exact source line numbers for single-line constructors and methods. Refactored PHP 8.4 property hook injection to maintain expression-level AST structures and avoid parser token corruption.@return staticand genericstatic<T>on static factory methods and composite structures (such aslist<static>).@phpstan-typealiases from PHP 8.1 Enums, implemented recursive multi-tier alias expansion, and normalized file paths across operating systems to eliminate Windows cache misses.CallableWrapper, enabled lazy wrapping for collections of callables, and updatedErrorFactoryto attribute stack traces directly to userland call sites.