PHPackages                             swissspidy/phpstan-no-private - 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. swissspidy/phpstan-no-private

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

swissspidy/phpstan-no-private
=============================

PHPStan rules for detecting usage of pseudo-private functions, classes, and methods.

v1.0.0(1y ago)8840.7k↑76.7%1[1 issues](https://github.com/swissspidy/phpstan-no-private/issues)20MITPHPPHP ^7.4 || ^8.0CI passing

Since May 14Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/swissspidy/phpstan-no-private)[ Packagist](https://packagist.org/packages/swissspidy/phpstan-no-private)[ RSS](/packages/swissspidy-phpstan-no-private/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (6)Used By (20)

Detect usage of pseudo-private code elements
============================================

[](#detect-usage-of-pseudo-private-code-elements)

[![Build](https://github.com/swissspidy/phpstan-no-private/workflows/Build/badge.svg)](https://github.com/swissspidy/phpstan-no-private/actions)[![Latest Stable Version](https://camo.githubusercontent.com/a07599cbffcc5a931555f2c0b78ad9f59e9a6fd96e50b85770b424cba8e760b5/68747470733a2f2f706f7365722e707567782e6f72672f737769737373706964792f7068707374616e2d6e6f2d707269766174652f762f737461626c65)](https://packagist.org/packages/swissspidy/phpstan-no-private)[![License](https://camo.githubusercontent.com/72c3a15cc498d5d6b2d203662f1d536914588fa0966584b82590cfb89a3da019/68747470733a2f2f706f7365722e707567782e6f72672f737769737373706964792f7068707374616e2d6e6f2d707269766174652f6c6963656e7365)](https://packagist.org/packages/swissspidy/phpstan-no-private)

This PHPStan extension emits deprecation warnings on code which uses properties/functions/methods/classes which are annotated as `@access private`.

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

[](#installation)

To use this extension, require it in [Composer](https://getcomposer.org/):

```
composer require --dev swissspidy/phpstan-no-private
```

If you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!

Manual installationIf you don't want to use `phpstan/extension-installer`, include rules.neon in your project's PHPStan config:

```
includes:
    - vendor/swissspidy/phpstan-no-private/rules.neon
```

Credits
-------

[](#credits)

This project is a fork of the excellent [phpstan/phpstan-deprecation-rules](https://github.com/phpstan/phpstan-deprecation-rules), which provides rules that detect usage of deprecated classes, methods, properties, constants and traits.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance59

Moderate activity, may be stable

Popularity46

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61% 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 ~182 days

Total

4

Last Release

554d ago

Major Versions

v0.2.1 → v1.0.02024-11-11

PHP version history (2 changes)v0.1.0PHP ^7.2 || ^8.0

v1.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/841956?v=4)[Pascal Birchler](/maintainers/swissspidy)[@swissspidy](https://github.com/swissspidy)

---

Top Contributors

[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (50 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (30 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (2 commits)")

---

Tags

phpstanphpstan-extension

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/swissspidy-phpstan-no-private/health.svg)

```
[![Health](https://phpackages.com/badges/swissspidy-phpstan-no-private/health.svg)](https://phpackages.com/packages/swissspidy-phpstan-no-private)
```

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

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

Doctrine extensions for PHPStan

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

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

Drupal extension and rules for PHPStan

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

PHPackages © 2026

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