PHPackages                             temirkhan/phpstan-internal-rules - 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. temirkhan/phpstan-internal-rules

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

temirkhan/phpstan-internal-rules
================================

PHPStan rules to prevent prohibited usage of classes marked as @internal

0.1.0(1y ago)141Apache-2.0PHP

Since Jan 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TemirkhanN/phpstan-internal-rule)[ Packagist](https://packagist.org/packages/temirkhan/phpstan-internal-rules)[ Docs](https://github.com/TemirkhanN/phpstan-internal-rules)[ RSS](/packages/temirkhan-phpstan-internal-rules/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

phpstan-internal-rules
======================

[](#phpstan-internal-rules)

PHPStan rules to handle @internal tag, preventing prohibited usage of such classes

- [Internal class instantiation](test/data/internal-class-instantiation-rule-violation.php)
- [Internal class or interface used as property type](test/data/internal-class-in-property-declaration-rule-violation.php)
- Inheritance from an internal class or interface
- Internal class method call(static, call\_user\_func and direct call)
- Internal trait usage

Usage
=====

[](#usage)

This is likely pretty much outdated since it was just a proof of concept.
You can give it a try by installing it via composer

```
composer require --dev temirkhan/phpstan-internal-rules
```

then add extension to your phpstan.neon.dist

```
includes:
  - vendor/temirkhan/phpstan-internal-rule/extension.neon
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

517d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49de4e214ba94d2a32a9e14a45822c3f9f758e89098cf837d23c51e509e10e92?d=identicon)[TemirkhanN](/maintainers/TemirkhanN)

---

Top Contributors

[![TemirkhanN](https://avatars.githubusercontent.com/u/12416657?v=4)](https://github.com/TemirkhanN "TemirkhanN (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/temirkhan-phpstan-internal-rules/health.svg)

```
[![Health](https://phpackages.com/badges/temirkhan-phpstan-internal-rules/health.svg)](https://phpackages.com/packages/temirkhan-phpstan-internal-rules)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)[gong023/assert_chain

enable you to use phpunit assert with method chain

1478.9k3](/packages/gong023-assert-chain)

PHPackages © 2026

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