PHPackages                             mediawiki/phan-utils - 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. mediawiki/phan-utils

ActiveLibrary

mediawiki/phan-utils
====================

Utilities for phan to be used in plugins, originally developed for taint-check-plugin

0.1.2(5y ago)040GPL-2.0-or-laterPHPPHP ^7.2.0

Since May 21Pushed 2mo ago18 watchersCompare

[ Source](https://github.com/wikimedia/mediawiki-tools-phan-Utils)[ Packagist](https://packagist.org/packages/mediawiki/phan-utils)[ RSS](/packages/mediawiki-phan-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

MediaWiki Phan Utils
====================

[](#mediawiki-phan-utils)

This repo contains some utilities that can be used when developing [Phan](https://github.com/phan/phan) plugins. This code was originally written as part of MediaWiki's [taint-check](https://github.com/wikimedia/phan-taint-check-plugin).

### Install

[](#install)

```
$ `composer require mediawiki/phan-utils`

```

### Usage

[](#usage)

Add `use MediaWikiPhanUtils\MediaWikiPhanUtils` to the visitor class. Note that the implementing class MUST have the following properties:

```
/**
 * @property \Phan\Language\Context $context
 * @property \Phan\CodeBase $code_base
 */

```

Additionally, the class SHOULD implement the following method:

```
protected function getLogChannel() : string

```

to specify the name of the channel used in debug logs.

### Environment variables

[](#environment-variables)

You can use the `PHAN_DEBUG` variable to print debug information. The variable can take the name of a file (if running from shell, /dev/stderr is convenient), or `-` for stdout.

License
-------

[](#license)

[GNU General Public License, version 2 or later](COPYING)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance56

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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

Total

3

Last Release

2185d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/716c86d71cbf921e7912a505f89d799de398fc0a3af0bd4c8862834b2d642bd7?d=identicon)[wikimedia](/maintainers/wikimedia)

---

Top Contributors

[![Daimona](https://avatars.githubusercontent.com/u/38216014?v=4)](https://github.com/Daimona "Daimona (3 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (2 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (1 commits)")

---

Tags

phpstaticanalyzerphan

### Embed Badge

![Health badge](/badges/mediawiki-phan-utils/health.svg)

```
[![Health](https://phpackages.com/badges/mediawiki-phan-utils/health.svg)](https://phpackages.com/packages/mediawiki-phan-utils)
```

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[mediawiki/phan-taint-check-plugin

A Phan plugin to do security checking

27777.0k3](/packages/mediawiki-phan-taint-check-plugin)[dantsu/php-osm-static-api

PHP library to easily get static image from OpenStreetMap (OSM), add markers and draw lines.

97141.0k1](/packages/dantsu-php-osm-static-api)[symbiote/silverstripe-phpstan

PHPStan for Silverstripe

1223.7k14](/packages/symbiote-silverstripe-phpstan)

PHPackages © 2026

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