PHPackages                             lctrs/php-ext-stubs-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lctrs/php-ext-stubs-generator

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

lctrs/php-ext-stubs-generator
=============================

Generate stubs for any PHP extension.

0.2.0(4y ago)212[1 PRs](https://github.com/Lctrs/php-ext-stubs-generator/pulls)MITPHPPHP ^8.0.0

Since Sep 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Lctrs/php-ext-stubs-generator)[ Packagist](https://packagist.org/packages/lctrs/php-ext-stubs-generator)[ Docs](https://github.com/Lctrs/php-ext-stubs-generator)[ RSS](/packages/lctrs-php-ext-stubs-generator/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (21)Versions (7)Used By (0)

php-ext-stubs-generator
=======================

[](#php-ext-stubs-generator)

[![Integrate](https://github.com/Lctrs/php-ext-stubs-generator/workflows/Integrate/badge.svg)](https://github.com/Lctrs/php-ext-stubs-generator/actions)[![Release](https://github.com/Lctrs/php-ext-stubs-generator/workflows/Release/badge.svg)](https://github.com/Lctrs/php-ext-stubs-generator/actions)[![Renew](https://github.com/Lctrs/php-ext-stubs-generator/workflows/Renew/badge.svg)](https://github.com/Lctrs/php-ext-stubs-generator/actions)

[![Mutation Score](https://camo.githubusercontent.com/df6cc2e47015fccad59adca836844105ef866f20d0dd28f6df09ab4d51da1611/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532464c637472732532467068702d6578742d73747562732d67656e657261746f722532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/Lctrs/php-ext-stubs-generator/master)[![Code Coverage](https://camo.githubusercontent.com/d2d01550fb69dd254f8a7f14c4b99b4a024ce08299e791b82e30840bd881ed60/68747470733a2f2f636f6465636f762e696f2f67682f4c637472732f7068702d6578742d73747562732d67656e657261746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Lctrs/php-ext-stubs-generator)[![Type Coverage](https://camo.githubusercontent.com/0db1798b7f7289fe2114f012ddd6fc207f3cbeb976f6c920dee2bf268465b9d9/68747470733a2f2f73686570686572642e6465762f6769746875622f4c637472732f7068702d6578742d73747562732d67656e657261746f722f636f7665726167652e737667)](https://shepherd.dev/github/Lctrs/php-ext-stubs-generator)

[![Latest Stable Version](https://camo.githubusercontent.com/973903dfea8a01611a7aaeabd939b4f1eea007cf5df8981e5da0177edd75ec1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4c637472732f7068702d6578742d73747562732d67656e657261746f723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Lctrs/php-ext-stubs-generator)[![Total Downloads](https://camo.githubusercontent.com/0b372d63bccbdf415dceadf4d0cc308e497330b5507210a94f241c5dd506497d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4c637472732f7068702d6578742d73747562732d67656e657261746f723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Lctrs/php-ext-stubs-generator)

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

[](#installation)

Run

```
composer require --dev lctrs/php-ext-stubs-generator
```

Usage
-----

[](#usage)

```
php vendor/bin/generate-stubs-for-ext extension_name
```

By default, the command will places the generated stubs in a directory named `stubs/` at the root of the project. You can change the name of this directory by passing a `--target` option to the command as below (nested directories are supported) :

```
php vendor/bin/generate-stubs-for-ext extension_name --target src/stubs/
```

Changelog
---------

[](#changelog)

Please have a look at [`CHANGELOG.md`](CHANGELOG.md).

Contributing
------------

[](#contributing)

Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).

License
-------

[](#license)

This package is licensed using the MIT License.

Please have a look at [`LICENSE.md`](LICENSE.md).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~1 days

Total

3

Last Release

1704d ago

### Community

Maintainers

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

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (598 commits)")[![lctrs-bot](https://avatars.githubusercontent.com/u/62859014?v=4)](https://github.com/lctrs-bot "lctrs-bot (559 commits)")[![Lctrs](https://avatars.githubusercontent.com/u/5477973?v=4)](https://github.com/Lctrs "Lctrs (94 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (3 commits)")

---

Tags

extensiongeneratorphpstubs

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lctrs-php-ext-stubs-generator/health.svg)

```
[![Health](https://phpackages.com/badges/lctrs-php-ext-stubs-generator/health.svg)](https://phpackages.com/packages/lctrs-php-ext-stubs-generator)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M563](/packages/symfony-maker-bundle)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M55](/packages/roave-backward-compatibility-check)[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M34](/packages/humbug-php-scoper)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)

PHPackages © 2026

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