PHPackages                             ubean/psalm-internal-extends - 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. ubean/psalm-internal-extends

ActivePsalm-plugin[Testing &amp; Quality](/categories/testing)

ubean/psalm-internal-extends
============================

Psalm plugin that enforces @internal / @psalm-internal for traits (and similar) across namespaces.

v1.0.0(10mo ago)07MITPHPPHP ^8.3

Since Sep 1Pushed 10mo agoCompare

[ Source](https://github.com/ubeann/psalm-internal-extends)[ Packagist](https://packagist.org/packages/ubean/psalm-internal-extends)[ Docs](https://github.com/ubean/psalm-internal-extends)[ RSS](/packages/ubean-psalm-internal-extends/feed)WikiDiscussions development Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Psalm Internal Trait Enforcer
=============================

[](#psalm-internal-trait-enforcer)

Enforces internal visibility boundaries for trait usage in Psalm.

Configuration
-------------

[](#configuration)

Add the plugin to your `psalm.xml` and set an optional `policy` inside the `` configuration. Supported values:

- namespace (default): consumer namespace must equal, be a child of, or a parent of the internal namespace.
- package: only the top-level vendor segment must match (e.g., `Vendor\...`).

Example psalm.xml snippet:

```

    namespace

```

If not specified, the policy defaults to `namespace`.

Issue name
----------

[](#issue-name)

This plugin emits the issue `InternalTraitUse` when a class uses a trait outside the allowed internal boundary.

License
-------

[](#license)

Released under the MIT License. See `LICENSE` for details.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance54

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

305d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4399916?v=4)[ubean](/maintainers/ubean)[@uBean](https://github.com/uBean)

---

Top Contributors

[![ubeann](https://avatars.githubusercontent.com/u/76271600?v=4)](https://github.com/ubeann "ubeann (13 commits)")

---

Tags

phppluginstatic analysistraitsinternalpsalm

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ubean-psalm-internal-extends/health.svg)

```
[![Health](https://phpackages.com/badges/ubean-psalm-internal-extends/health.svg)](https://phpackages.com/packages/ubean-psalm-internal-extends)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.9k82.2M7.7k](/packages/vimeo-psalm)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.4k](/packages/larastan-larastan)[weirdan/doctrine-psalm-plugin

Stubs to let Psalm understand Doctrine better

897.3M59](/packages/weirdan-doctrine-psalm-plugin)[dave-liddament/sarb

Provides tools for baselining static analysis results and comparing against that baseline

1651.6M](/packages/dave-liddament-sarb)[exakat/exakat

The smart static analyzer for PHP

437.8k](/packages/exakat-exakat)

PHPackages © 2026

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