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: Architectural Guard outline: deep

Architectural Guard 🛡️

mago guard is a powerful architectural validation utility for enforcing boundaries and coding standards within a PHP project. It acts as a high-performance, single-binary replacement for tools like deptrac (for dependency validation) and arkitect (for structural rule enforcement).

Think of it as a two-part fortress for your codebase: the Perimeter Guard and the Structural Guard.

Perimeter Guard: Defending Your Boundaries

The Perimeter Guard is responsible for dependency validation. It ensures that different parts of your application only communicate in ways you've explicitly allowed. Its primary goal is to protect your architectural layers and prevent invalid dependencies from crossing into your core domain logic.

For example, you can enforce rules like:

  • Your Domain layer must not depend on any other layer.
  • Your UI layer can depend on the Application layer, but not the other way around.
  • A specific module is only allowed to use certain approved libraries.

This is crucial for maintaining a clean, decoupled architecture that is easy to maintain and scale.

Structural Guard: Enforcing Internal Order

The Structural Guard is responsible for enforcing coding conventions on the symbols themselves. It inspects the internal structure of your code to ensure it follows a consistent and predictable pattern.

For example, you can enforce rules like:

  • All classes in the App\Http\Controllers namespace must be final and have names ending in Controller.
  • Interfaces in the Domain must be named with an Interface suffix.
  • A specific namespace may only contain enum definitions.

This helps maintain a high level of code quality and consistency across the entire project.

Dive In

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