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

Phpstan React Laravel Package

wyrihaximus/phpstan-react

PHPStan extension for ReactPHP projects that flags blocking PHP functions such as file_get_contents, fopen, and fclose, and points to async ReactPHP replacements from react/filesystem and react/socket. Install via Composer; rules auto-load with phpstan/extension-installer or include extension.neon.

View on GitHub
Deep Wiki
Context7
3.0.0

Version 3.0 is a major step for this PHPStan extension: it goes well beyond flagging blocking calls and starts encoding how ReactPHP code is usually meant to be written.

The release adds a full set of event-loop rules that treat the loop as a global concern you reach through Loop::…, not something you inject, pass around, or keep on objects. PHPStan now nudges you toward static loop APIs, away from Loop::get() indirection and from calling methods on values typed as LoopInterface, and it catches promoted properties and traits that would hold a loop reference in your domain model. Together, those checks reflect the direction the ReactPHP ecosystem has been taking: fewer foot-guns around loop lifetime and clearer separation between application code and the runtime.

On the react/async side, 3.0 brings static analysis for fiber-style await usage. A parser visitor tracks which closures are wrapped in async, and a call-graph collector follows the stack when await might be reached indirectly. You get feedback when await appears outside an async closure, and when a plain closure can still reach await through callees—the cases that are easy to miss in review but painful at runtime.

Everything remains on by default, but you can tune the extension under parameters.wyrihaximus.reactphp.rules, so teams can adopt event-loop or async rules gradually or silence a category without dropping the whole package. Documentation and installation notes were refreshed (including the correct extension.neon include and guidance around PHPStan’s extension installer), and the project runs on current PHP and QA tooling so the new rules sit on a maintained foundation.

3.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 49
  • Total contributors: 2

Bug 🐞

Configuration ⚙,Dependencies 📦

Configuration ⚙

Configuration ⚙,Dependencies 📦,Enhancement ✨

Dependencies 📦

Dependencies 📦,Feature 🏗

Enhancement ✨

Feature 🏗

1.0.0

Usage

Include the rules file from the root of this package to have PHPStan check your code for blocking functions:

includes:
	- vendor/wyrihaximus/phpstan-react/phpstan-reactphp-rules.neon

1.0.0

  • Total issues resolved: 0
  • Total pull requests resolved: 3
  • Total contributors: 2

Dependencies 📦

Enhancement ✨

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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names