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

ActiveLibrary

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

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

4.27.7(1y ago)078GPL-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 1mo ago

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 43% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

562d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0294903c3a76d1c777ea99fec3d63e208caa05ca23b261e53655e3ea666cf45b?d=identicon)[johanaarstein](/maintainers/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

[phpstan/phpstan

PHPStan - PHP Static Analysis Tool

13.9k341.8M29.6k](/packages/phpstan-phpstan)[phpdocumentor/reflection-common

Common reflection classes used by phpdocumentor to reflect the code structure

9.1k706.8M26](/packages/phpdocumentor-reflection-common)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[squizlabs/php_codesniffer

PHP\_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

1.5k365.7M25.5k](/packages/squizlabs-php-codesniffer)

PHPackages © 2026

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