Mago 1.47.0
Extensions in any language, Sponsored by CHECK24
Thanks to CHECK24 (@check24-opensource) for sponsoring Mago's new Extension API and PHP SDK.
✨ Features
Extensions
- Extension API: adds language-neutral workers, a PHP SDK, custom lint rules, analyzer plugins, and CLI tooling. (#2192)
See the extension documentation to get started.
Analyzer
--skip-ignores: disables configured analyzer ignores for a run. (#2191, f05c849)- Array key narrowing: narrows a key after a successful
array_key_existscheck. (#2199, c58e48b, 7cc1739)
🐛 Bug Fixes
Analyzer
- Logical assignments: merges assignments made by short-circuited right-hand expressions. (#2176, a53bc78)
- Magic properties: treats magic properties as possibly undefined. (#2177, cea8d53)
- Nullable inference: preserves
nullwhen inferring into amixedparameter. (#2175, 97988bb) - Scalar narrowing: prevents scalar intersections from collapsing incorrectly to
never. (#2179, #2206, 8d34248, c8bd837) - Flow structures: returns Flow's concrete
StructureTypefromtype_structure(). (#2186, ccde5ae) - Diagnostic casing: preserves method-name casing in unused-method diagnostics. (#2187, 13090af)
- Required interfaces: keeps requirement metadata without inheriting interface members. (#2189, e5a949e, 874ffac)
- Match subjects: evaluates method-call subjects once for exhaustive matching. (#2190, #2208, 7a7faa1)
- Private trait methods: stops inheriting private trait methods into child classes. (#2188, 8a8958a)
- Switch entry flow: keeps independently selected cases reachable after a terminating case. (#2185, efe7526)
- Method assertions: invalidates cached nested call results after mutating calls. (#2180, 353233b)
- Bool templates: recognizes bool-constrained templates in comparisons. (#2172, b84241a)
- Omitted generics: treats missing generic arguments as erased wildcards. (#2178, f1e029b)
- Docblock symbols: reports undefined types in class-level member and mixin tags. (#2193, 2c59ad3)
- Compound conditions: removes order-dependent impossible-comparison diagnostics. (#2195, 7ca65e2)
- Nullable object shapes: preserves object-shape fields in nullable docblock unions. (#2200, 5029124)
- Global annotations: honors
@vardocblocks onglobalstatements. (#2181, #2202, a7023c7) - Callable class strings: recognizes invokable classes in callable class-string bounds. (#2207, f77c965)
- Closure identity: recognizes every closure as an instance of
Closure. (#2203, d54d88e) - Symbol references: preserves source files for references returned to extensions. (#2211, aabe675)
- Unresolved dependencies: analyzes class bodies and exposes missing dependencies to extensions. (#2212, 24c9304, f1558d4)
- Class constants: canonicalizes class names when recording constant references. (#2213, b59529d)
- Missing property types: checks declarations without default values. (#2201, 2e4260f)
Codex
Linter
PHPDoc Syntax
- Trailing hyphens: prevents a hyphen from consuming the next byte in docblocks. (#2194, #2198, d46b35f)
Prelude
Extensions
- Windows startup: prevents an authentication race when extension workers connect. (111413a)
WASM
- Telemetry: excludes unavailable extension orchestrator telemetry from WASM builds. (9e8b752)
📖 Documentation
Extensions
- Extension guide: documents the architecture, PHP SDK, analyzer plugins, and custom rules. (7d67272)
- Starter template: recommends the extension template as the quickest starting point. (bb98a97)
Website
- Version order: lists documentation versions newest first. (#2204, ffd725e)
- Rule reference: refreshes the generated linter rule documentation. (3597d38)
🏗️ Internal
Maintenance
- Codex types: removes dead APIs and deduplicates type and comparator machinery. (3a28052, 3d301af, acd2d56)
- Analyzer internals: removes dead code and deduplicates reconciler and resolver logic. (02b352e)
- Formatter internals: simplifies presets, comments, alignment, and printer machinery. (e07980f, e595c13)
- Shared cleanup: deduplicates extension, codex, analyzer, and linter internals. (4b68329)
- Clippy policy: updates lint allowances for module roots and rest-pattern maintenance. (82b7522, 2053081, 332368a)
- Sponsors: refreshes the generated sponsor list. (8cec88c)
🙏 Thank You
Special thanks to CHECK24 for fully funding the Extension API's full-time development.
Contributors
A huge thank you to everyone who contributed code to this release:
- @dotdash: #2184, #2191, #2193, #2200, #2202
- @norberttech: #2186
- @hdimer: #2198
- @maximal: #2204
- @chrisvasz: #2201
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
- @james2doyle: #39
- @bendavies: #443, #1385
- @swayok: #887
- @SanderMuller: #2164, #2211, #2212, #2213, #2214
- @mathroc: #2172, #2199
- @edsrzf: #2175
- @BafS: #2176, #2177, #2195
- @yoannblot: #2178
- @gsteel: #2179, #2180, #2196
- @Skyript: #2185
- @maximal: #2187
- @conghuyn: #2188
- @mytskine: #2189
- @dragosprotung: #2190
- @kryyova: #2194
- @iainhallam: #2181
- @dantleech: #2203
- @ddanielou: #2206, #2207, #2208
- @Double-Ramzi: #2210
Full Changelog: 1.46.0...1.47.0