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 Phpunit Laravel Package

phpstan/phpstan-phpunit

PHPStan extension for PHPUnit: improves type inference for mocks (intersection types for createMock/getMock), understands Foo|MockObject phpDocs, adds early-terminating methods to avoid undefined vars, and refines assert() types. Optional strict rules catch improper assertion usage.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package is designed as a PHPStan extension, aligning perfectly with PHP's static analysis ecosystem. It extends PHPStan's core capabilities to handle PHPUnit-specific patterns without requiring major architectural changes. The modular design via neon configuration files allows seamless integration into existing PHPStan setups.

Integration feasibility: High. Installation via Composer is straightforward, and the phpstan/extension-installer automates configuration. Manual setup requires minimal edits to phpstan.neon. The package has clear documentation for both setup and usage scenarios.

Technical risk: Moderate. Potential false positives may occur with legacy test patterns or non-standard PHPUnit usage. Compatibility with PHPUnit versions

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