Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mago Laravel Package

carthage-software/mago

Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It brings Rust-inspired speed and reliability to PHP projects with a modern toolchain and great developer experience, plus multiple install options (script, Homebrew, Composer).

View on GitHub
Deep Wiki
Context7

title: Lexer and parser command reference outline: deep

Command reference

The mago ast command is a powerful inspection tool that tokenizes and parses a single PHP file, giving you insight into its lexical and syntactical structure.

:::tip For global options that can be used with any command, see the Command-Line Interface overview. Remember to specify global options before the ast command. :::

Usage: mago ast [OPTIONS] <FILE>

Arguments

<FILE>

Required. The path to the single PHP file you want to inspect.

Options

--tokens

Display the stream of raw tokens generated by the lexer instead of the parsed AST. This is useful for debugging low-level syntax issues. This can be combined with --json for machine-readable output.

--json

Display the output (either the AST or the token stream) in a machine-readable, pretty-printed JSON format. This is ideal for integration with other tools and scripts.

--names

After parsing the AST, this flag runs the name resolver and prints a list of all symbols (classes, functions, etc.) and their fully qualified names. This is useful for debugging namespace and import resolution.

Shared Reporting Options

The ast command uses a shared set of options for reporting parsing errors.

See the Shared Reporting and Fixing Options documentation.

:::tip The ast command only reports parsing errors. Auto-fixing and baseline features are not applicable to this command. :::

Help

Flag, Alias(es) Description
--help, -h Print the help summary for the command.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport