PHPackages                             bellangelo/phpstan-require-file-exists - 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. bellangelo/phpstan-require-file-exists

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

bellangelo/phpstan-require-file-exists
======================================

A PHPStan rule for checking if the files mentioned in the imports really exist.

v1.2.0(1y ago)114Apache-2.0PHPPHP &gt;=7.4

Since Aug 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Bellangelo/phpstan-require-file-exists)[ Packagist](https://packagist.org/packages/bellangelo/phpstan-require-file-exists)[ GitHub Sponsors](https://github.com/bellangelo)[ RSS](/packages/bellangelo-phpstan-require-file-exists/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

phpstan-require-file-exists
===========================

[](#phpstan-require-file-exists)

**UPDATE:** This rule has been merged into PHPStan itself. Here is the PR: [phpstan/phpstan-src#3294](https://github.com/phpstan/phpstan-src/pull/3294)

Weirdly enough, PHPStan does not check if a file exists when used in a `require` or `include` statement. This is a PHPStan rule that tries to do exactly that.

Installation
------------

[](#installation)

```
composer require --dev bellangelo/phpstan-require-file-exists
```

Development
-----------

[](#development)

For local development and testing, `composer.json` contains several commands that you can run.

- `composer run tests ` - runs the PHPUnit tests.
- `composer run phpstan` - runs PHPStan on the `src` and `tests` directories.
- `composer run phpcs` - runs PHP CodeSniffer on the `src` and `tests` directories.
- `composer run phpcs:fix` - runs PHP CodeSniffer on the `src` and `tests` directories and tries to fix the issues.

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~15 days

Total

3

Last Release

715d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9512427?v=4)[Aggelos Bellos](/maintainers/Bellangelo)[@Bellangelo](https://github.com/Bellangelo)

---

Top Contributors

[![Bellangelo](https://avatars.githubusercontent.com/u/9512427?v=4)](https://github.com/Bellangelo "Bellangelo (42 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bellangelo-phpstan-require-file-exists/health.svg)

```
[![Health](https://phpackages.com/badges/bellangelo-phpstan-require-file-exists/health.svg)](https://phpackages.com/packages/bellangelo-phpstan-require-file-exists)
```

###  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)
