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↓72.8%5[2 issues](https://github.com/spaze/phpstan-stripe/issues)5MITPHPPHP ^8.0CI passing

Since Nov 13Pushed 1w 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 3d 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

56

—

FairBetter than 97% of packages

Maintenance63

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 78.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 ~121 days

Recently: every ~159 days

Total

19

Last Release

596d 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 (73 commits)")[![anthonyryan1](https://avatars.githubusercontent.com/u/543852?v=4)](https://github.com/anthonyryan1 "anthonyryan1 (5 commits)")[![franmomu](https://avatars.githubusercontent.com/u/720690?v=4)](https://github.com/franmomu "franmomu (4 commits)")[![turbo124](https://avatars.githubusercontent.com/u/5827962?v=4)](https://github.com/turbo124 "turbo124 (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![kraynel](https://avatars.githubusercontent.com/u/4620699?v=4)](https://github.com/kraynel "kraynel (1 commits)")[![javespi](https://avatars.githubusercontent.com/u/1534117?v=4)](https://github.com/javespi "javespi (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.5k55.4M8.4k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[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.

4853.5M91](/packages/shipmonk-dead-code-detector)[phpstan/phpstan-strict-rules

Extra strict and opinionated rules for PHPStan

70370.0M5.3k](/packages/phpstan-phpstan-strict-rules)[phpstan/phpstan-phpunit

PHPUnit extensions and rules for PHPStan

533113.2M11.7k](/packages/phpstan-phpstan-phpunit)

PHPackages © 2026

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