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
Undeclarable vendor classes should become run-time traps instead of aborting the build; per-file exclude for Composer roots #628
Problem. Composer packages ship one class per supported dependency version and pick one at run time (google/cloud-core Logger/AppEngineFlexFormatter.php Monolog 1/2 variant next to ...V3.php; psy/psysh Readline/Hoa/FileLink.php). php never loads the other variant, so its signature is never checked. Manticore compiles every file and stops:
compile failed: Declaration of LegacyFormatter::format(array $record) must be compatible with LineFormatter::format(LogRecord $r): string
Proposal.
A class that cannot be declared (incompatible signature, missing parent) in a file reached only through Composer autoload is marked undeclarable with the diagnostic kept as a warning; the first new, static call, class_exists-autoload or extends of it throws at run time with the original message — same model as undefined-function traps.
Manifest: per-file / glob exclude inside a Composer root (today only the package-level composer.packages allow-list exists).
Acceptance. The LineFormatter/LegacyFormatter example from #614 builds, prints the LineFormatter result, and new LegacyFormatter throws the declaration error at run time.
Activity