PHPackages                             arifpavel/elementor-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. arifpavel/elementor-stubs

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

arifpavel/elementor-stubs
=========================

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

3.1.4.1(5y ago)314.5k↓50%3[1 PRs](https://github.com/arifpavel/elementor-stubs/pulls)GPL-2.0+PHP

Since Apr 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/arifpavel/elementor-stubs)[ Packagist](https://packagist.org/packages/arifpavel/elementor-stubs)[ Docs](https://github.com/arifpavel/elementor-stubs)[ RSS](/packages/arifpavel-elementor-stubs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Elementor Stubs
===============

[](#elementor-stubs)

This package provides stub declarations for [Elementor](https://elementor.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.

The stubs are generated directly from the [source](https://wordpress.org/plugins/elementor/) using [stubs generator](https://github.com/GiacoCorsiglia/php-stubs-generator). Needless to say, this library repackages a subset of Elementor code, which is the work of the Elementor plugin developers.

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

[](#installation)

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

```
composer require --dev arifpavel/elementor-stubs

```

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

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

[](#usage-with-psalm)

Update your Psalm config to include the section:

```

```

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

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

[](#usage-for-intellisense)

If your editor has trouble parsing all of Elementor 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/arifpavel/elementor-stubs/elementor-stubs.php" ] }`

Versioning
----------

[](#versioning)

This package is versioned to match the Elementor version from which the stubs are generated. If any fixes to stubs are required, subsequent releases will be versioned as `ELEMENTOR_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 Elementor plugin source from wordpress.org &amp; place it inside this project.
3. Run `composer install`
4. Run `./generate.sh`

The `elementor-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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1870d ago

### Community

Maintainers

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

---

Top Contributors

[![arifpavel](https://avatars.githubusercontent.com/u/8214798?v=4)](https://github.com/arifpavel "arifpavel (1 commits)")

---

Tags

static analysiselementor

### Embed Badge

![Health badge](/badges/arifpavel-elementor-stubs/health.svg)

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

###  Alternatives

[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)[phpstan/extension-installer

Composer plugin for automatic installation of PHPStan extensions

50398.1M8.3k](/packages/phpstan-extension-installer)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[bmitch/churn-php

Discover files in need of refactoring.

1.4k1.5M12](/packages/bmitch-churn-php)[shipmonk/composer-dependency-analyser

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

6156.7M435](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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