PHPackages                             gacela-project/phpstan-extension - 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. gacela-project/phpstan-extension

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

gacela-project/phpstan-extension
================================

PHPStan rule for projects using Gacela

0.4.0(1y ago)43.9k[4 issues](https://github.com/gacela-project/phpstan-extension/issues)1MITPHPPHP &gt;=8.0

Since Nov 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/gacela-project/phpstan-extension)[ Packagist](https://packagist.org/packages/gacela-project/phpstan-extension)[ Fund](https://chemaclass.com/sponsor)[ RSS](/packages/gacela-project-phpstan-extension/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (6)Used By (1)

Gacela PHPStan extension
========================

[](#gacela-phpstan-extension)

This is a PHPStan extension for Gacela Framework. This enforces module boundaries.

See [main Gacela project](https://github.com/gacela-project/gacela) for more information.

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

[](#installation)

```
composer require --dev gacela-project/phpstan-extension
```

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

[](#configuration)

To configure this PHPStan extension you need 2 things.

#### Base module namespace

[](#base-module-namespace)

It is assumed that all your modules are under the same namespace. Assume the namespaces for your modules are:

- `App\Modules\ModuleA`
- `App\Modules\ModuleB`

The base namespace for your modules is `App\Modules`.

#### Excluded namespaces (Optional)

[](#excluded-namespaces-optional)

If you have namespace that hold code that can be used by any module (e.g. `App\Shared`), then you need to add them to `excludedNamespaces`. Default: `[]`.

### Update PHPStan configuration

[](#update-phpstan-configuration)

Update your project's `phpstan.neon` file:

```
includes:
  - vendor/gacela-project/phpstan-extension/extension.neon

parameters:
    gacela:
        modulesNamespace:
        excludedNamespaces:
            - excluded
            - namespaces
```

### Examples

[](#examples)

#### Example without excludedNamespaces

[](#example-without-excludednamespaces)

```
includes:
  - vendor/gacela-project/phpstan-extension/extension.neon

parameters:
    gacela:
        modulesNamespace: App\Modules
```

#### Full example

[](#full-example)

```
includes:
  - vendor/gacela-project/phpstan-extension/extension.neon

parameters:
    gacela:
        modulesNamespace: App\Modules
        excludedNamespaces:
            - App\Shared
```

Usage
-----

[](#usage)

Run PHPStan as usual. It will additional point out any violations of module boundaries.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~155 days

Total

5

Last Release

636d ago

PHP version history (2 changes)0.1PHP &gt;=7.4, &lt;8.3

0.4.0PHP &gt;=8.0

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/3d166420c6770c5941e10bd68b2d26501eabb432e280d8e6eba0a344bcc1e5ae?d=identicon)[Chemaclass](/maintainers/Chemaclass)

---

Top Contributors

[![Chemaclass](https://avatars.githubusercontent.com/u/5256287?v=4)](https://github.com/Chemaclass "Chemaclass (28 commits)")[![DaveLiddament](https://avatars.githubusercontent.com/u/6787687?v=4)](https://github.com/DaveLiddament "DaveLiddament (4 commits)")

---

Tags

frameworkgacelaphpphpstan

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gacela-project-phpstan-extension/health.svg)

```
[![Health](https://phpackages.com/badges/gacela-project-phpstan-extension/health.svg)](https://phpackages.com/packages/gacela-project-phpstan-extension)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M679](/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.9M571](/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.0k](/packages/orchestra-testbench)

PHPackages © 2026

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