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 1w 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

22

—

LowBetter than 22% of packages

Maintenance42

Moderate activity, may be stable

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

471d 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

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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