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
{{ message }}
Repository navigation
LSP rename: magic and implicitly-called interface methods are renamed without their callers #521
Renaming __construct, __invoke, __toString or an interface method that PHP calls implicitly (offsetGet, offsetSet, current, key, next, count, getIterator, jsonSerialize) edits the declaration and the sites that spell the name, but not the implicit callers (new Foo(), $f(), $a[..], casts, foreach). Member references miss them for the same reason, and the member-name filter used when searching closed files skips files that only call the method implicitly.
Proposed fix
Add a rename blocker for __* names and for the methods of PHP's built-in interfaces (ArrayAccess, Iterator, IteratorAggregate, Countable, JsonSerializable, Stringable) when the class implements them. References should either list the implicit sites or say they may be incomplete.
Acceptance
Rename of each of these is refused with a clear message.
Test at the Workspace level (renameBlockers) and at the LSP level.
Activity