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 1mo 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 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

621d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63b436ff6324681c11dc5b9f21ba2ae07cbdb25859ab63a9cbc6212cb3051b07?d=identicon)[Bellangelo](/maintainers/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.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

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

Doctrine extensions for PHPStan

66466.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.

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

Drupal extension and rules for PHPStan

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

PHPackages © 2026

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