Repository navigation
Major Bug fixes for next minor release (v0.15.0) - #145
Merged
Merged
Conversation
…rnChecker, and DocblockParser; add tests for bare array enforcement and fix bug for bare array type-checking
…or internal directory checks; add UserInternalDirectoryTraceTest for enhanced violation reporting
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…olution; add FullyQualifiedNameEliminationTest for comprehensive coverage of FQCN handling
…; refactor related methods and tests for PHP 8.5 clone syntax support
…@self-out post-conditions
…ests for numeric string key coercion and auto-index behavior
…tants; add IntMaskOfConstantSoundnessTest for comprehensive validation of int-mask behavior
…eInc and computeDec methods in RuntimeTypeChecker; enhance FunctionContractInjector with nullability checks; introduce tests for increment/decrement and coalesce assignment semantics.
…tween MemberAssignChecker and RuntimeTypeChecker
… tests for line number preservation in generic constructor calls
… InlineChecker and SpecialTypeResolver; introduce tests for inline routing and scalar refinements
…ics; update StaticTypeEvaluator and FunctionContractInjector to utilize new checks; add EliminationBox and ObjectGenericReturnEliminationTest for comprehensive testing of elimination safety rules.
…per for traversable type checks; add new IterableWrapper methods for enhanced type validation; introduce Nullable and Union Iterable Return tests for comprehensive coverage.
…prehensive tests for discriminated unions, including boolean, null, multi-field, and enum discriminators.
…add DynamicNumericStringKeyEliminationTest for comprehensive coverage of dynamic numeric string keys in array evaluations.
…o call it during reset
…d update tests for generic binding preservation and error handling
…variance handling; add InvariantNullableUnionVarianceTest for comprehensive coverage of variance behavior in generics.
… handling; introduce UnionIterableMapFixture for improved type checking in union scenarios.
…ethods for invariant intersection equality and flattening intersection members. Enhance InvariantNullableUnionVarianceTest with new tests for covariant and contravariant variance boxes.
…ce methods for splitting phrases and add comprehensive tests for various violation scenarios.
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.
Woop-woop, Hardening the runtime checker and resolving edge cases.. Yeah..
1. Type Checking & Variance Soundness
arrayContract Enforcement: Stopped treating barearrayas an unconstrainedmixedbypass in parameters and return types unless guaranteed by a native non-nullablearraytypehint.@template-contravariantacross scalars, ranges, literals,class-string<T>,object, collections, unions, and intersections.\WeakMapto halt invalid mutations).2. AST Transformation & Single-Evaluation Guarantees
clone& PHP 8.5clone($obj, [...]):executeClone()/executeCloneWith()).pushPendingCloneSource()/popPendingCloneSource()) withtry/finallyunwinding to support nested clones inside__clone().return $this->slot();) evaluate exactly once and preserve reference aliasing.@param-out&@self-out: Hoisted return expressions before exit checks so post-conditions evaluate after the return expression executes (and are skipped if the return expression throws).++/--and??=:computeInc()/computeDec()to preserve PHP's native semantics on strings,null, and booleans.??=to$target ?? ($target = check(...))to preserve short-circuiting, uninitializedreadonlyproperties, and PHP 8.4sethooks.withPendingGeneric()for multi-line constructor calls (e.g.new Pair(\n 1,\n 2\n)).3. Compile-Time Static Elimination Soundness
\FullyQualified&namespace\Class Resolution: SwitchedObjectEvaluatorandConstantAndEnumEvaluatorto strict syntactic AST name resolution without stripping leading slashes.intand implemented PHP 8+ lazy auto-incrementing key rules (nextFreeElement) inArrayLiteralEvaluator.int-mask-ofConstant Verification: Verified via non-autoloading reflection that constants matchingint-mask-of<Class::*>are genuine integers (not strings, floats, booleans, or enum case objects).yieldKeys: Prevented eliminatingsetupScope()onint $x = nullwhenrespect_native_nullability = false, and prevented eliminatingcheckYield()when the yield key expression mutates the yielded variable.4. Diagnostics, Cache & Test Parity
src/Internal/Paths: SwitchedErrorFactoryandViolationCollectortoPathMatcher::isLibraryInternal()so user applications containing asrc/Internal/folder do not have their stack frames and violation attributions stripped.PropertyOpcodeParityTestverifying mirrored opcode alignment, and bumpedCacheManager::VERSION_PREFIXtov0.14.5_.