Weave 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

Laravel Ide Macros Laravel Package

tutorigo/laravel-ide-macros

Bring IDE autocompletion to your Laravel macros. This package scans your application for registered macros and generates helper files, so PhpStorm and other IDEs recognize macro methods with full type hints and suggestions.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: laravel-ide-macros is a developer-tooling package that generates IDE-facing stub files describing Laravel macro methods (methods added at runtime via Macroable::macro()), so IDEs can autocomplete and type-check calls that static analysis would otherwise miss. It sits purely in the dev/static-analysis layer — it ships no runtime service provider logic that affects request handling, and its output is a generated file consumed by the IDE/static analyser. This makes it architecturally non-invasive: it complements, rather than competes with, barryvdh/laravel-ide-helper, and only matters for teams that lean heavily on macros (custom collections, query builders, response/request macros, string helpers).

Integration feasibility: High. The 1.6.0 release is additive: Illuminate\Http\Request support extends coverage to request macros (a very common extension point), and TestResponse/TestView support extends coverage into test-authored macros, which previously would have appeared as undefined methods in test code. The Laravel 9 dependency bump signals active maintenance and version currency. All three changes reduce friction rather than add it — no new configuration surface, no new runtime dependency.

Technical risk: Low, with two caveats worth tracking. First, the package's value is entirely derived from the accuracy of generated stubs; if macro registration happens conditionally (feature flags, environment guards, service-provider ordering), the generated file can silently diverge from what actually exists at runtime. Second, IDE-helper-style packages are tightly coupled to Laravel internals; the explicit "bump dependencies for Laravel 9" is a reminder that major-version upgrades will require coordinated package bumps. Because the artefact is dev-only, the blast radius of a bad generation is limited to red squiggles and false positives in the IDE — not production behaviour.

Key questions:

  • Do we have macros registered outside a single, discoverable location (closures in config, conditional registration, third-party packages) that the generator would miss?
  • Is the generated stub file committed to VCS (team consistency) or gitignored and generated per-developer (freshness)?
  • Does our CI run static analysis (PHPStan/Psalm) that would consume these stubs, or is this purely an IDE convenience?
  • What is the team's actual macro footprint — is Request/TestResponse coverage a real need or theoretical?
  • Where does this sit relative to laravel-ide-helper in our generation pipeline, and does one overwrite the other's output?

Integration Approach

Stack fit: Suitable for any Laravel 8/9-era codebase using Composer and a modern IDE (PhpStorm, VS Code + Intelephense). It is a require-dev dependency by design — it should never land in production autoload paths. The 1.6.0 additions map cleanly onto existing team practices: Request macros are a common pattern for request-shape normalisation, and TestResponse/TestView macros show up in teams that build custom assertion helpers.

Migration path: Effectively zero-migration for new adopters: composer require --dev, optionally publish config, run the generation command, and point the IDE at the output file. For teams already running the package, 1.6.0 is a non-breaking minor — regenerating stubs after upgrade picks up the new Request/TestResponse/TestView coverage. The only action item is the Laravel 9 dependency bump: confirm the host application and any pinning constraints (CI images, other dev dependencies) also resolve cleanly on Laravel 9 before bumping in a shared branch.

Compatibility: The release explicitly targets Laravel 9, which is the headline compatibility signal. Verify coexistence with laravel-ide-helper (separate output files, both referenced from the IDE config) and with any static-analysis baseline files. PHP version constraints should be checked against the team's minimum supported runtime.

Sequencing:

  1. Add as require-dev and generate stubs; validate autocomplete on a known Request macro.
  2. Add the generation command to a Composer script (e.g. post-autoload-dump) or a documented onboarding step so new developers get the file without tribal knowledge.
  3. Decide commit-vs-gitignore for the generated file and document the decision.
  4. Only then consider wiring generated stubs into CI static analysis — that upgrades the tool from "IDE nicety" to "correctness gate" and raises the bar on generation fidelity.

Operational Impact

Maintenance: Minimal. The package is passive — no daemon, no runtime hooks, no scheduled work. Ongoing cost is bounded to (a) regenerating stubs when macros change, and (b) keeping pace with Laravel major versions, which 1.6.0 demonstrates the maintainer is doing. The realistic long-term risk is upstream abandonment of a small, single-maintainer package; mitigated by the fact that removal is a one-line composer remove with no production fallout.

Support: Low support burden. Failures surface as IDE warnings, not incidents, and are self-diagnosed by "did you regenerate?". The main support need is onboarding documentation: one paragraph explaining what the generated file is, why it exists, and how to refresh it.

Scaling: Scales linearly and trivially — generation cost is proportional to the number of registered macros, which is small even in large applications. No impact on request throughput, deployment time, or infrastructure. The only scaling concern is team-wide freshness: with many developers, a committed generated file reduces drift; a gitignored one requires reliable automation.

Failure modes:

  • Stale stubs — macros added or renamed without regeneration, producing false positives/negatives in the IDE. Most common failure; mitigated by automating generation.
  • Silent coverage gaps — conditionally registered macros omitted from output, giving a false sense of completeness.
  • Version skew — a Laravel upgrade outpaces the package, temporarily breaking generation. Non-blocking for delivery.
  • Tool overlap — conflicting or duplicated stub output with laravel-ide-helper if file paths are misconfigured.
  • No production failure mode — worth stating explicitly to stakeholders: this cannot take down an environment.

Ramp-up: Near-zero. A developer can adopt it in under fifteen minutes: install, generate, configure the IDE include path. The conceptual overhead is one sentence ("it teaches your IDE about macros"). The 1.6.0 additions modestly widen the useful surface — Request and TestResponse/TestView macros are exactly the places teams most often lose autocomplete — so the value-per-minute-of-setup ratio improves, particularly for teams with heavy custom test assertion helpers.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource