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

jangregor/phpstan-prophecy

PHPStan extension for phpspec/prophecy that improves type inference in tests. It teaches PHPStan the real types returned from Prophecy workflows like prophesize(), willExtend(), and reveal(), so your revealed doubles are understood as the mocked class.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Targets PHPStan users leveraging Prophecy for test doubles. Fits well in projects already using both tools, but Laravel's default testing stack (PHPUnit mocks) rarely uses Prophecy, limiting relevance to niche use cases. PHPStan's static analysis benefits from this extension only when Prophecy is actively used in tests.

Integration feasibility: Simple via Composer (composer require --dev jangregor/phpstan-prophecy). Automatic configuration with phpstan/extension-installer or manual extension.neon inclusion. Requires existing PHPStan and Prophecy dependencies.

Technical risk: Low adoption (0 dependents) indicates minimal community usage and potential maintenance concerns. Last release date (2026-02-10) appears erroneous; actual activity (changelog shows 2020-2021 updates) suggests inconsistent maintenance. Compatibility with PHPStan 1.0+ is confirmed, but future PHPStan updates may break functionality if not actively maintained.

Key questions: Is Prophecy actively used in test suites? What is the project's current maintenance cadence? How does the package handle PHPStan version upgrades? Are there known issues with Laravel-specific test patterns?

Integration Approach

Stack fit: Only relevant for Laravel projects using Prophecy for test doubles (uncommon in typical

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