Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mago 0.0.14 #202165

Merged
merged 2 commits into from
Dec 22, 2024
Merged

mago 0.0.14 #202165

merged 2 commits into from
Dec 22, 2024

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
We are thrilled to unveil **Mago v0.0.14**, a groundbreaking update that takes Mago to the next level! This release introduces **reflections**, smarter linting, and critical bug fixes.

🚀 New Features

Reflections and Built-in PHP Type Awareness

  • Mago is now aware of all PHP built-in types, thanks to JetBrains/phpstorm-stubs.
  • Reflections enable Mago to analyze and understand your entire codebase, including built-in PHP types, user-defined code, and dependencies.

New Analysis Linter Plugin

  • Undefined Functions Rule: Detects and notifies you about calls to undefined functions.
  • Undefined Constants Rule: Identifies the usage of undefined constants.
  • These rules are just the beginning! Reflections pave the way for detecting runtime errors statically, with planned rules for inheritance and other advanced analysis.

Smarter Linter Suggestions

  • Mago’s linter is now smarter and more context-aware:
    • It will no longer suggest renaming parameters or adding types to parameters inherited from a class or interface, avoiding potential inheritance-breaking changes.

Improved Analysis with Composer

  • To get the best results, include your vendor directory in your configuration file (excluding composer files). Example:
[source]
paths = ["src"]
includes = ["vendor"]
excludes = ["*/vendor/composer/*"]

🐛 Bug Fixes

Lexer Fixes

  • Recognizes callable as a keyword.
  • Correctly parses heredoc when a line starts with the label text (e.g., PHPDOC in the example below).
$a = <<<PHP

PHPDOC <-- no longer mistakenly considered as the closing label

PHP;

Linter Fixes

  • The implicit nullable parameter rule now fixes code correctly, preventing runtime issues.

Formatter Fixes

  • Parentheses are preserved in cases like new ($foo->bar())() to avoid errors.

🌟 Community Contributions

A huge shoutout to @bendavies (Ben Davies) for reporting many of these issues in our Discord. Your feedback and effort make Mago better for everyone!


What's Changed

Full Changelog: carthage-software/mago@0.0.13...0.0.14

@github-actions github-actions bot added rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Dec 22, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Dec 22, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Dec 22, 2024
Merged via the queue into master with commit 47f8c15 Dec 22, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the bump-mago-0.0.14 branch December 22, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants