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
Checker: whole-program type checking for PHP# in the Mago fork #2
The engine compiles one file at a time by design: opcache sets ZEND_COMPILE_IGNORE_OTHER_FILES. So a type error that spans files is only known before the code runs if a whole-program checker finds it. That checker is PHP#'s compiler, as Roslyn is for C# and hh_client is for Hack.
Capability: the consumer's Mago fork (github.com/heyJordanParker/mago) parses PHP# natively and fails check on any type error. That covers generics, list<T> and map<K, V>, internal, delegates and closed unions, with no ignore list. Its language server, from upstream PR php#1926, gives Agents and editors the same diagnostics.
Starting point: upstream Mago branch rfc/generic-types (PR php#1826, +1,450 lines) already parses <T> and ::<T>. Its analyzer and codex crates do not understand native generics yet.
Why later: each syntax decision in this repo becomes checker work once the engine side lands.
Activity
fix: extensions meet generics: plain PHP's calls are checked, and a b…
fix(engine): a Map of string keys refuses a plain PHP list, not an ar…