PHPackages                             gplanchat/durable-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. gplanchat/durable-phpstan

ActivePhpstan-extension

gplanchat/durable-phpstan
=========================

PHPStan extension for gplanchat/durable (activityStub generics, ActivityStub::\_\_call → Awaitable).

00PHP

Since Mar 29Pushed 1mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

gplanchat/durable-phpstan
=========================

[](#gplanchatdurable-phpstan)

Optional **PHPStan 2** extension for [**gplanchat/durable**](../durable/). It teaches PHPStan that:

- **`WorkflowEnvironment::activityStub(SomeContract::class)`** returns **`ActivityStub`** (via aligned PHPDoc generics — see **ADR012** in the monorepo).
- Each **`#[ActivityMethod]`** method on the contract appears on the stub and returns **`Awaitable`**, where **`R`** is the contract method’s return type.

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

[](#requirements)

- PHP **8.2+**
- **`phpstan/phpstan` ^2.0**
- **`gplanchat/durable`** (same major as your app)

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

[](#installation)

```
composer require --dev gplanchat/durable-phpstan
```

If you do not use [phpstan/extension-installer](https://github.com/phpstan/extension-installer), include the extension explicitly:

```
includes:
    - vendor/gplanchat/durable-phpstan/extension.neon
```

Why PHPStan levels matter
-------------------------

[](#why-phpstan-levels-matter)

From PHPStan level **1** onward, **`reportMagicMethods`** is enabled through the level chain. **`ActivityStub`** relies on “magic” **`__call`** for ergonomics, so **without this extension** you get **`method.notFound`** on **`$stub->greet()`** even though runtime is correct. This package fixes that by exposing virtual methods via **`MethodsClassReflectionExtension`**.

Development (monorepo)
----------------------

[](#development-monorepo)

From **`src/DurablePhpStan/`** (monorepo) :

```
composer install
./vendor/bin/phpstan analyse -c phpstan.neon.dist
```

Publishing
----------

[](#publishing)

The Packagist payload is entirely under **`packages/durable-phpstan/`** (no `../../` paths).

See also
--------

[](#see-also)

- [ADR012 — Activity stub, PSR-6, warmup, static analysis](../../documentation/adr/ADR012-activity-stub-metadata-and-static-analysis.md)
- [OST003 — Activity call ergonomics](../../documentation/ost/OST003-activity-api-ergonomics.md)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/144109625f8029112d56f43d08120cf03a0918ea3b4fd59ab53f09b02f630b00?d=identicon)[gplanchat](/maintainers/gplanchat)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gplanchat-durable-phpstan/health.svg)

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

PHPackages © 2026

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