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

Plugin Mockery Laravel Package

psalm/plugin-mockery

Adds Psalm static analysis support for the Mockery testing framework. Improves type inference and understanding of mocked objects and expectations in PHPUnit-style tests. Install via Composer and enable with psalm-plugin for better mock-related diagnostics.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables accurate static analysis of test code using Mockery, eliminating false positives in Psalm and reducing hidden defects in test logic
  • Supports roadmap priorities for test reliability by integrating seamlessly with existing static analysis infrastructure (no custom tooling needed)
  • Clear "buy" decision: building similar functionality would require significant effort vs. 10-minute setup of this open-source plugin
  • Critical for teams using Mockery in tests where precise type resolution for mock objects impacts code quality and debugging efficiency

When to Consider This Package

  • Adopt when using both Psalm for static analysis and Mockery for test mocking (e.g., in Laravel projects with complex test doubles)
  • Prioritize if your team struggles with Psalm errors in test files due to untyped Mockery objects
  • Avoid if using alternative mocking frameworks (PHPUnit native mocks, Prophecy) or not leveraging Psalm for code quality checks
  • Skip for projects on Psalm <5.0 (though plugin supports up to v7) or where test code is not subject to static analysis

How to Pitch It (Stakeholders)

Executives: "This plugin ensures our test code is as rigorously checked as production code—reducing hidden defects that cause production incidents. It’s a zero-friction, one-time setup with immediate ROI in defect prevention and reduced debugging time."
Engineering: "Seamlessly integrates with existing Psalm and Mockery workflows—no code changes required. Eliminates manual @var annotations for mocks, resolves false positives in test code analysis, and accelerates CI pipelines by catching type errors early. Fully compatible with current toolchain versions and requires no ongoing maintenance."

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