PHPackages                             nadyita/phpstan-amp-file-rule - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. nadyita/phpstan-amp-file-rule

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

nadyita/phpstan-amp-file-rule
=============================

A PHPStan rule to detect the use of sync filesystem calls for which there are async counterparts. Must be used in conjunction with amphp/file

1.0.3(1y ago)01.7kMITPHPPHP ^8.1.17

Since Apr 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Nadyita/phpstan-amp-file-rule)[ Packagist](https://packagist.org/packages/nadyita/phpstan-amp-file-rule)[ RSS](/packages/nadyita-phpstan-amp-file-rule/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

PHPStan rules for amphp/file
============================

[](#phpstan-rules-for-amphpfile)

[amphp/file](https://github.com/amphp/file) provides a set of async filesystem functions that don't block. If you're using the amp framework, you want to eliminate calls to blocking PHP functions as much as possible.

This PHPStan rule will help you detect calls to blocking PHP functions and will propose replacement functions from `amphp/file` instead. Use this rule to ensure that you don't have any blocking filesystem calls in your code.

Usage
-----

[](#usage)

Add the package to your repository with `composer require --dev nadyita/phpstan-amp-file-rule`.

Edit your project's `phpstan.neon` file and add this rule:

```
includes:
    - vendor/nadyita/phpstan-amp-file-rule/phpstan-amp-file-rule.neon
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance45

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~107 days

Total

4

Last Release

428d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43dd28040fa6867fe87ca2cf705fc4690c2cb856ca94a1b19f0efa1002d1f237?d=identicon)[Nadyita](/maintainers/Nadyita)

---

Top Contributors

[![Nadyita](https://avatars.githubusercontent.com/u/43058421?v=4)](https://github.com/Nadyita "Nadyita (3 commits)")[![mreidel-godaddy](https://avatars.githubusercontent.com/u/85351962?v=4)](https://github.com/mreidel-godaddy "mreidel-godaddy (2 commits)")

### Embed Badge

![Health badge](/badges/nadyita-phpstan-amp-file-rule/health.svg)

```
[![Health](https://phpackages.com/badges/nadyita-phpstan-amp-file-rule/health.svg)](https://phpackages.com/packages/nadyita-phpstan-amp-file-rule)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78768.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66766.6M1.1k](/packages/phpstan-phpstan-doctrine)[phpat/phpat

PHP Architecture Tester

1.2k3.5M32](/packages/phpat-phpat)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33320.0M375](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20829.0M124](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
