Skip to content

Mago 1.47.0

Choose a tag to compare

@github-actions github-actions released this 18 Aug 14:45
· 3 commits to main since this release
1.47.0
1fd7bc4

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_exists check. (#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 null when inferring into a mixed parameter. (#2175, 97988bb)
  • Scalar narrowing: prevents scalar intersections from collapsing incorrectly to never. (#2179, #2206, 8d34248, c8bd837)
  • Flow structures: returns Flow's concrete StructureType from type_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 @var docblocks on global statements. (#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

  • @api metadata: preserves @api on properties, methods, and constants. (#2214, 37450cd)

Linter

  • Language constructs: excludes clone, exit, and die from ambiguous function calls. (#2196, 828cc42)

PHPDoc Syntax

  • Trailing hyphens: prevents a hyphen from consuming the next byte in docblocks. (#2194, #2198, d46b35f)

Prelude

  • Imagick classes: adds missing Imagick class stubs, including ImagickPixel. (#2210, 5e9b671)

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:

Issue Reporters

Thank you to everyone who reported issues that shaped this release:

Full Changelog: 1.46.0...1.47.0