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.8kMITPHPPHP ^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 1w 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

32

—

LowBetter than 69% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity18

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

518d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43058421?v=4)[Nadyita](/maintainers/Nadyita)[@Nadyita](https://github.com/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.5k60.6M10.5k](/packages/larastan-larastan)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67475.0M1.6k](/packages/phpstan-phpstan-doctrine)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79378.2M2.5k](/packages/phpstan-phpstan-symfony)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

5014.2M111](/packages/shipmonk-dead-code-detector)[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.

33923.4M632](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20832.2M213](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

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