PHPackages                             wpsyntex/polylang-phpstan - 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. wpsyntex/polylang-phpstan

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

wpsyntex/polylang-phpstan
=========================

Polylang extension for PHPStan

2.2(3mo ago)452.1k↑11.6%1[1 issues](https://github.com/polylang/polylang-phpstan/issues)2GPL-3.0-or-laterPHPPHP ^8.0CI passing

Since Mar 2Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/polylang/polylang-phpstan)[ Packagist](https://packagist.org/packages/wpsyntex/polylang-phpstan)[ Docs](https://polylang.pro)[ RSS](/packages/wpsyntex-polylang-phpstan/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (10)Used By (2)

Polylang PHPStan
================

[](#polylang-phpstan)

This package provides a [PHPStan](https://phpstan.org/) extension for [Polylang](https://wordpress.org/plugins/polylang/) and [Polylang Pro](https://polylang.pro). It should be used in combination with [Polylang Stubs](https://github.com/polylang/polylang-stubs/).

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

[](#requirements)

- PHP 8+

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

[](#installation)

Require this package as a development dependency with Composer.

Tip

`polylang/polylang-stubs` is optional but strongly recommended.

```
composer require --dev wpsyntex/polylang-phpstan
composer require --dev wpsyntex/polylang-stubs
```

Configuration
-------------

[](#configuration)

### Adding the extension

[](#adding-the-extension)

Include the extension and stubs in the PHPStan configuration file.

Important

Prior to version 2.1 (included), `polylang/polylang-stubs` is automatically loaded. Starting from version 2.2, it must be configured manually.

```
includes:
  - vendor/wpsyntex/polylang-phpstan/extension.neon
parameters:
  scanFiles:
    - vendor/wpsyntex/polylang-stubs/polylang-stubs.php
```

### Opt in to WordPress stubs overrides

[](#opt-in-to-wordpress-stubs-overrides)

The `stubs/wordpress-override.php` file provides corrected type definitions for specific WordPress functions that have imprecise or incorrect type hints in the standard WordPress stubs (currently `sanitize_key()`, `maybe_serialize()`, and `sanitize_text_field()`).

```
  stubFiles:
    - vendor/wpsyntex/polylang-phpstan/stubs/wordpress-override.php
```

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance76

Regular maintenance activity

Popularity35

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~257 days

Recently: every ~310 days

Total

8

Last Release

104d ago

Major Versions

0.7 → 1.02022-04-20

v1.2 → 2.02025-11-05

### Community

Maintainers

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

---

Top Contributors

[![Hug0-Drelon](https://avatars.githubusercontent.com/u/69580439?v=4)](https://github.com/Hug0-Drelon "Hug0-Drelon (10 commits)")[![Screenfeed](https://avatars.githubusercontent.com/u/1878479?v=4)](https://github.com/Screenfeed "Screenfeed (9 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wpsyntex-polylang-phpstan/health.svg)

```
[![Health](https://phpackages.com/badges/wpsyntex-polylang-phpstan/health.svg)](https://phpackages.com/packages/wpsyntex-polylang-phpstan)
```

###  Alternatives

[xaboy/form-builder

好用的PHP表单生成器，快速生成现代化的form表单,支持前后端分离。内置17种常用表单组件。目前在政务系统、OA系统、ERP系统、电商系统、流程管理等系统中已稳定应用。

76275.0k5](/packages/xaboy-form-builder)[lipemat/phpstan-wordpress

Phpstan extension for working with WordPress

1256.3k1](/packages/lipemat-phpstan-wordpress)

PHPackages © 2026

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