PHPackages                             spaze/phpstan-stripe - 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. spaze/phpstan-stripe

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

spaze/phpstan-stripe
====================

Stripe SDK extension for PHPStan

v3.3.0(1y ago)51.8M↓19.5%5[2 issues](https://github.com/spaze/phpstan-stripe/issues)5MITPHPPHP ^8.0CI passing

Since Nov 13Pushed 5mo ago3 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (20)Used By (5)

phpstan-stripe
==============

[](#phpstan-stripe)

Stripe SDK extension for PHPStan

Looking for a maintainer/EOL
----------------------------

[](#looking-for-a-maintainereol)

UPDATE: I've found a new maintainer(s), see [the discussion](https://github.com/spaze/phpstan-stripe/discussions/19) so this will probably change hands (and URL) soon. Thanks!

---

Adds particular types replacing `Stripe\StripeObject` type declaration for many properties in many classes used by the PHP library for the Stripe API. See `extension.neon` for the full list of currently replaced properties.

Also adds types for properties used only when the object is updated. These are not documented using `@property` tags on the classes (or the types are wrong), and the dev team [feels](https://github.com/stripe/stripe-php/pull/543) it should stay this way. Honestly, I'm not sure adding `@property` tags would be the best way either.

PHPStan will obviously flag such property access and this extension will resolve those errors by telling PHPStan such properties exist.

This extension is not using

```
parameters:
	universalObjectCratesClasses:
		- Stripe\StripeObject

```

in its configuration because in the SDK, everything `extends StripeObject` (or everything `extends ApiResource` which in turn `extends StripeObject`) so each property your code would read or write would exist, at least for PHPStan. And I wanted this extension to provide some more precise checks.

If you don't want to or can't use this extension, add the `universalObjectCratesClasses` config snippet to your `phpstan.neon` and be ready to go.

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

[](#installation)

The package is [hosted on Packagist](https://packagist.org/packages/spaze/phpstan-stripe) so you can install it using [Composer](https://getcomposer.org/):

```
composer require --dev spaze/phpstan-stripe

```

If you use [phpstan/extension-installer](https://github.com/phpstan/extension-installer), you are all set!

For manual installation, add this to your `phpstan.neon`:

```
includes:
	- vendor/spaze/phpstan-stripe/extension.neon

```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance48

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 79.1% 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 ~121 days

Recently: every ~159 days

Total

19

Last Release

549d ago

Major Versions

v0.1.0 → v1.0.02021-07-11

v1.0.2 → v2.0.02021-12-07

v2.4.0 → v3.0.02023-03-06

PHP version history (4 changes)v0.0.1PHP ^7.0

v0.1.0PHP ^7.1 || ^8.0

v2.0.0PHP ^7.3 || ^8.0

v3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6777bd445610e6e458e4d41bdefa3070d2ed4e068323362353b061b15e9ff81b?d=identicon)[spaze](/maintainers/spaze)

---

Top Contributors

[![spaze](https://avatars.githubusercontent.com/u/1966648?v=4)](https://github.com/spaze "spaze (72 commits)")[![anthonyryan1](https://avatars.githubusercontent.com/u/543852?v=4)](https://github.com/anthonyryan1 "anthonyryan1 (5 commits)")[![turbo124](https://avatars.githubusercontent.com/u/5827962?v=4)](https://github.com/turbo124 "turbo124 (4 commits)")[![franmomu](https://avatars.githubusercontent.com/u/720690?v=4)](https://github.com/franmomu "franmomu (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![javespi](https://avatars.githubusercontent.com/u/1534117?v=4)](https://github.com/javespi "javespi (1 commits)")[![kraynel](https://avatars.githubusercontent.com/u/4620699?v=4)](https://github.com/kraynel "kraynel (1 commits)")[![EliW](https://avatars.githubusercontent.com/u/1153183?v=4)](https://github.com/EliW "EliW (1 commits)")

---

Tags

static analysis

### Embed Badge

![Health badge](/badges/spaze-phpstan-stripe/health.svg)

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

###  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)[phpstan/phpstan-strict-rules

Extra strict and opinionated rules for PHPStan

69661.6M3.9k](/packages/phpstan-phpstan-strict-rules)[phpstan/phpstan-phpunit

PHPUnit extensions and rules for PHPStan

529102.1M8.6k](/packages/phpstan-phpstan-phpunit)[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)

PHPackages © 2026

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