PHPackages                             ffi/ide-helper-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. ffi/ide-helper-generator

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

ffi/ide-helper-generator
========================

FFI API generator for PHP

0.1.12(2y ago)67.9k↑13.3%[1 issues](https://github.com/php-ffi/ide-helper-generator/issues)4MITPHPPHP ^8.1CI passing

Since Aug 11Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/php-ffi/ide-helper-generator)[ Packagist](https://packagist.org/packages/ffi/ide-helper-generator)[ RSS](/packages/ffi-ide-helper-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (14)Used By (4)

FFI IDE Helper Generator
========================

[](#ffi-ide-helper-generator)

 [![PHP 8.1+](https://camo.githubusercontent.com/9f4aa6ee980f28a1bd79c1b88efa34323b4ef10b7d3dded49774d1e9bea42633/68747470733a2f2f706f7365722e707567782e6f72672f6666692f6964652d68656c7065722d67656e657261746f722f726571756972652f7068703f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ffi/ide-helper-generator) [![Latest Stable Version](https://camo.githubusercontent.com/c90c866e5b623436d20e1d17e2b7a758dfc528c6bf89eee98a0b35bf928a0094/68747470733a2f2f706f7365722e707567782e6f72672f6666692f6964652d68656c7065722d67656e657261746f722f76657273696f6e3f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ffi/ide-helper-generator) [![Latest Unstable Version](https://camo.githubusercontent.com/f413cd89f657def95af2aabfc8cf1f493826159478bc2767e81fa803779ac52e/68747470733a2f2f706f7365722e707567782e6f72672f6666692f6964652d68656c7065722d67656e657261746f722f762f756e737461626c653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ffi/ide-helper-generator) [![Total Downloads](https://camo.githubusercontent.com/eaafcecb6892e4a44166f7a24453ef2bdffac25661f6e4746305adbc71654640/68747470733a2f2f706f7365722e707567782e6f72672f6666692f6964652d68656c7065722d67656e657261746f722f646f776e6c6f6164733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/ffi/ide-helper-generator) [![License MIT](https://camo.githubusercontent.com/ac4a3fc5726e5b5efb42407a32b119f18383da46af03353db0a79555657dc2a7/68747470733a2f2f706f7365722e707567782e6f72672f6666692f6964652d68656c7065722d67656e657261746f722f6c6963656e73653f7374796c653d666f722d7468652d6261646765)](https://raw.githubusercontent.com/php-ffi/ide-helper-generator/master/LICENSE.md)

 [![](https://github.com/php-ffi/ide-helper-generator/workflows/build/badge.svg)](https://github.com/php-ffi/ide-helper-generator/actions)

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

[](#requirements)

- PHP ^8.4
- [castxml](https://github.com/CastXML/CastXML) ([binaries](https://github.com/CastXML/CastXMLSuperbuild/releases))

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

[](#installation)

Library is available as Сomposer repository and can be installed using the following command in the root of your project as a dev-dependency.

```
$ composer require ffi/ide-helper-generator --dev
```

Usage
-----

[](#usage)

### Generate Metadata

[](#generate-metadata)

Before generating the helper, the headers must be parsed to build the metadata data. To do this, `castxml` will be used, which in turn uses the original compiler (like `clang`) to build the AST.

```
use FFI\Generator\Printer\PhpStormMetadataPrinter;
use FFI\Generator\CodeGenerator;

echo new CodeGenerator()
    ->parse(__DIR__ . '/example-header.h')
    ->generate(new PhpStormMetadataPrinter())
    ->save(__DIR__ . '/resources/.phpstorm.meta.php');
```

### Analyze Metadata

[](#analyze-metadata)

After the metadata is generated, it should be parsed and an abstract syntax tree built in memory.

```
use FFI\Generator\CodeGenerator;

$result = new CodeGenerator()
    ->parse(__DIR__ . '/example-header.h');

foreach ($result->nodes as $namespace) {
    var_dump($namespace);
}
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance53

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~67 days

Total

13

Last Release

742d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150420?v=4)[Ruslan Sharipov](/maintainers/Serafim)[@serafim](https://github.com/serafim)

---

Top Contributors

[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (8 commits)")

---

Tags

autocompletehelperideutilitygeneratorautocompletionffi

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ffi-ide-helper-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ffi-ide-helper-generator/health.svg)](https://phpackages.com/packages/ffi-ide-helper-generator)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[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.1M568](/packages/symfony-maker-bundle)[bocharsky-bw/file-naming-resolver

A lightweight library which helps to resolve a file/directory naming of uploaded files using various naming strategies.

1134.9k](/packages/bocharsky-bw-file-naming-resolver)[mis/yii2-ide-helper

Yii2 IDE Helper, generates correct PHPDocs for all components, to improve auto-completion.

1664.2k3](/packages/mis-yii2-ide-helper)

PHPackages © 2026

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