PHPackages                             cluion/moduark-phpstan - 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. cluion/moduark-phpstan

ActivePhpstan-extension

cluion/moduark-phpstan
======================

PHPStan extension for Moduark module boundaries.

v0.1.0-beta.1(yesterday)01↓50%MITPHPPHP ^8.2CI passing

Since Aug 16Pushed yesterdayCompare

[ Source](https://github.com/cluion/moduark-phpstan)[ Packagist](https://packagist.org/packages/cluion/moduark-phpstan)[ Docs](https://github.com/cluion/moduark-phpstan)[ RSS](/packages/cluion-moduark-phpstan/feed)WikiDiscussions main Synced today

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

Moduark PHPStan
===============

[](#moduark-phpstan)

PHPStan integration for [Moduark](https://github.com/cluion/moduark). It reports Moduark module-boundary violations in PHPStan without running Moduark's standalone parser a second time.

> This package is under initial development. The first slice supports only `internal_api_access` / `MOD-BOUNDARY-001`.

Requirements
------------

[](#requirements)

- PHP 8.2 or newer
- Moduark 0.4 beta
- PHPStan 2.2
- Laravel 12 or 13 through the installed Moduark package

Larastan is supported but optional.

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

[](#installation)

Install the Moduark beta as an application dependency, then install this extension as a development dependency:

```
composer require cluion/moduark:^0.4@beta
composer require --dev cluion/moduark-phpstan:^0.1@beta
```

If the application already requires `cluion/moduark:^0.4@beta`, only the second command is needed. A dependency's stability flag does not relax the consuming application's Composer stability constraints, so a clean project must declare the Moduark beta explicitly.

When `phpstan/extension-installer` is installed, Composer discovers `extension.neon` automatically. Otherwise include it manually:

```
includes:
    - vendor/cluion/moduark-phpstan/extension.neon
```

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

[](#configuration)

The extension deliberately does not boot Laravel. Its defaults match a standard Moduark application:

```
parameters:
    moduark:
        basePath: %currentWorkingDirectory%
        modulesPath: %currentWorkingDirectory%/app/Modules
        rootNamespace: App\Modules
        configPath: %currentWorkingDirectory%/config/modules.php
        baselinePath: %currentWorkingDirectory%/moduark-baseline.json
        suppressionsPath: %currentWorkingDirectory%/moduark-suppressions.json
        internalApiAccess:
            enabled: true
            severity: error
```

`config/modules.php` remains optional, matching Moduark itself. When the file is present it participates in cache invalidation; effective PHPStan settings still come from the explicit `moduark` block above.

Keep `internalApiAccess.enabled` and `severity` aligned with the effective `config/modules.php` architecture level and rule override. A `warning` remains visible through `php artisan module:check`; it does not become a blocking PHPStan error.

Active Moduark baseline and suppression entries are applied before PHPStan errors are produced. Remaining violations are non-ignorable in PHPStan; use Moduark's audited suppression manifest instead of `ignoreErrors`.

Current diagnostic
------------------

[](#current-diagnostic)

Moduark ruleCodePHPStan identifier`internal_api_access``MOD-BOUNDARY-001``moduark.internalApiAccess``config/modules.php`, the baseline, the suppression manifest, and Module entry metadata participate in PHPStan result-cache invalidation.

Development
-----------

[](#development)

```
composer verify
composer test:compatibility
```

The integration suite compares PHPStan output with Moduark's standalone rule and runs the same fixture with and without Larastan.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

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

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b008f596ba58069f0b50370e71ac2b724d60178515725233c5fdd4717ec8ce27?d=identicon)[ningyungame](/maintainers/ningyungame)

---

Top Contributors

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

---

Tags

PHPStanlaravelstatic analysisarchitecturemoduark

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/cluion-moduark-phpstan/health.svg)

```
[![Health](https://phpackages.com/badges/cluion-moduark-phpstan/health.svg)](https://phpackages.com/packages/cluion-moduark-phpstan)
```

###  Alternatives

[larastan/larastan

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

6.5k60.6M10.5k](/packages/larastan-larastan)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

5014.2M111](/packages/shipmonk-dead-code-detector)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67475.0M1.6k](/packages/phpstan-phpstan-doctrine)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79378.2M2.5k](/packages/phpstan-phpstan-symfony)[calebdw/larastan

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

16132.2k4](/packages/calebdw-larastan)[orrison/meliorstan

Provides PHPStan rules for improved code quality by detecting code smells and possible issues. In addition to enforcing particular naming and code style conventions to reduce bike-shedding.

1920.1k6](/packages/orrison-meliorstan)

PHPackages © 2026

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