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

Phpstan Mockery Laravel Package

phpstan/phpstan-mockery

PHPStan extension for Mockery: infers intersection types for mocks (Foo&MockInterface), understands shouldReceive/shouldHaveReceived/allows/expects, supports partial/alias/overload mocks, multiple interfaces, and proper constructor args for accurate static analysis.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: This package enhances PHPStan's static analysis for Mockery-based tests, fitting seamlessly into Laravel's dev workflow where PHPUnit + Mockery is standard. It operates purely in the dev environment with zero production impact, improving type safety for mock objects without altering application code. The intersection type handling aligns with PHPStan's core strength in precise type inference.

Integration feasibility: High feasibility. Requires only composer require --dev and automatic configuration via phpstan/extension-installer (or manual extension.neon inclusion). No code changes needed in existing tests—PHPStan automatically leverages the extension during analysis. Compatible with standard Laravel PHPStan setups.

Technical risk: Moderate. Low

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