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 today

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 72% of packages

Maintenance42

Moderate activity, may be stable

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

473d 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.5k55.4M8.4k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[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.

4853.5M91](/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.

33422.6M549](/packages/spaze-phpstan-disallowed-calls)[tomasvotruba/cognitive-complexity

PHPStan rules to measure cognitive complexity of your classes and methods

1635.6M289](/packages/tomasvotruba-cognitive-complexity)

PHPackages © 2026

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