You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve method reflection for dynamic static calls ($var::method()) to enable purity and side-effect checking
- In `StaticCallHandler::processExpr()`, when the class part of a static call
is an expression (e.g. `$enum::from()`), resolve the method reflection via
`getObjectTypeOrClassStringObjectType()` — the same approach already used in
`resolveType()` for return type computation.
- Previously, `$methodReflection` was always null for `$expr->class instanceof Expr`,
causing a false "call to unknown method" impure point for every dynamic static call.
- Guard `$this`-invalidation and promoted-property initialization logic with
`$expr->class instanceof Name` to prevent incorrect scope effects when the call
target is an expression (e.g. `$other::__construct()`).
- Update `CallToStaticMethodStatementWithoutSideEffectsRuleTest::testDynamicStaticCall`
expectations: pure dynamic static calls are now correctly detected as having no effect.
0 commit comments