PHPackages                             aarsteinmedia/divi-stubs - 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. aarsteinmedia/divi-stubs

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

aarsteinmedia/divi-stubs
========================

DIVI function, class, and global variable declaration stubs for easier static analysis.

4.27.7(1y ago)083GPL-2.0+PHP

Since Oct 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/aarsteinmedia/divi-stubs)[ Packagist](https://packagist.org/packages/aarsteinmedia/divi-stubs)[ Docs](https://github.com/aarsteinmedia/divi-stubs)[ RSS](/packages/aarsteinmedia-divi-stubs/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

DIVI Stubs
==========

[](#divi-stubs)

This package provides stub declarations for [DIVI](https://www.elegantthemes.com) core functions, classes, interfaces, and global variables. These stubs can help plugin and theme developers leverage static analysis tools like [Psalm](https://getpsalm.org/) and plugins like Intellisense, Intelephense.

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

[](#installation)

Require this package as a dev-dependency with [Composer](https://getcomposer.org):

```
composer require --dev aarsteinmedia/divi-stubs

```

Alternatively, you may download `divi-stubs.php` directly.

Usage with Psalm
----------------

[](#usage-with-psalm)

Update your Psalm config to include the section:

```

```

Furthermore, ensure DIVI core code is *not* included under ``.

Usage for Intellisense
----------------------

[](#usage-for-intellisense)

If your editor has trouble parsing all of DIVI classes, functionc, etc, you may find the stubs useful for enabling code completion and related features. For example, [here](https://github.com/bmewburn/vscode-intelephense/issues/113) are instructions for usage with VSCode's [Intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client) extension. Or in a local workspace for intelephense create a `.php` file and add `{ "intelephense.stubs": [ "/vendor/aarsteinmedia/divi-stubs/divi-stubs.php" ] }`

Versioning
----------

[](#versioning)

This package is versioned to match the DIVI version from which the stubs are generated. If any fixes to stubs are required, subsequent releases will be versioned as `DIVI_VERSION.X`.

Generating stubs for a different WordPress version
--------------------------------------------------

[](#generating-stubs-for-a-different-wordpress-version)

You should be running PHP 7.1 or later to follow these steps, so any function definitions that are polyfills for older versions of PHP are excluded from the stubs. Additionally, the Stubs Generator package at least requires PHP 7.1.

1. Clone this repository and `cd` into it.
2. Download DIVI theme source from [Elegant Themes](https://www.elegantthemes.com) &amp; place it inside this project.
3. Run `composer install`
4. Run `./generate.sh`

The `divi-stubs.php` file should now be updated. Feel free to submit a Pull Request if you'd like to see a release for a newer version. If things have fallen behind, please generate stubs for each missing version in a distinct commit so we can have a continuous release history.

### Credits

[](#credits)

This package is highly dependent on GiacoCorsiglia's stub packages.

### License

[](#license)

[GPLv2](LICENSE)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

6

Last Release

615d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17679744?v=4)[Johan Martin Aarstein](/maintainers/johanaarstein)[@johanaarstein](https://github.com/johanaarstein)

---

Top Contributors

[![johanaarstein](https://avatars.githubusercontent.com/u/17679744?v=4)](https://github.com/johanaarstein "johanaarstein (9 commits)")

---

Tags

static analysisdivi

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/aarsteinmedia-divi-stubs/health.svg)

```
[![Health](https://phpackages.com/badges/aarsteinmedia-divi-stubs/health.svg)](https://phpackages.com/packages/aarsteinmedia-divi-stubs)
```

###  Alternatives

[phpdocumentor/reflection-common

Common reflection classes used by phpdocumentor to reflect the code structure

9.1k736.5M37](/packages/phpdocumentor-reflection-common)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k8.8M118](/packages/deptrac-deptrac)[phpstan/extension-installer

Composer plugin for automatic installation of PHPStan extensions

506109.3M11.4k](/packages/phpstan-extension-installer)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.9M224](/packages/icanhazstring-composer-unused)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6198.4M667](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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