PHPackages                             drenso/phan-extensions - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. drenso/phan-extensions

AbandonedArchivedProject[Testing &amp; Quality](/categories/testing)

drenso/phan-extensions
======================

This project contains several extensions (stubs/plugins) to be used with Phan for static PHP analysis

v3.5.1(4y ago)171.8M—2.1%411MITPHP

Since Mar 11Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Drenso/PhanExtensions)[ Packagist](https://packagist.org/packages/drenso/phan-extensions)[ Docs](https://github.com/Drenso/PhanExtensions)[ RSS](/packages/drenso-phan-extensions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (24)Used By (11)

PhanExtensions
==============

[](#phanextensions)

This project contains several extensions (stubs/plugins) to be used with Phan for static PHP analysis.

> Note: This project is no longer actively maintained!

[![Build Status](https://camo.githubusercontent.com/72ba2484d323e4de7825b9344515e45b8106c95d83b5b844be57bd408c3c92ac/68747470733a2f2f7472617669732d63692e6f72672f4472656e736f2f5068616e457874656e73696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Drenso/PhanExtensions)

Plugins
-------

[](#plugins)

We currently have the following plugins available:

#### Annotation\\SymfonyAnnotationPlugin

[](#annotationsymfonyannotationplugin)

Parses all annotation that start with an uppercase letter, in order to check whether they have been imported into the file, and to remove unused warnings from vanilla Phan if they are used correctly.

The Symfony version of this plugin (currently the only one) ignores the `Annotation`, `Target`, `Required` and `SuppressWarnings`annotations by default.

#### DocComment\\InlineVarPlugin

[](#doccommentinlinevarplugin)

Scans each file in the `/src` directory which contains a class (if a file contains multiple classes, it will also be scanned for every time a class is defined in it). This plugin is a workaround for a limitation in php-ast, which does not expose inline comments.

#### DocComment\\MethodPlugin

[](#doccommentmethodplugin)

Scans each method docblock for the use of the `@method`, in order to set the annotated class as used.

#### DocComment\\ThrowsPlugin

[](#doccommentthrowsplugin)

Scans each method docblock for the use of the `@throws`, in order to set the annotated class as used.

> **Note**: This plugin is obsolete since Phan 0.12.3, due to [this issue](https://github.com/phan/phan/issues/1555#event-1527018367) being closed.

### Usage

[](#usage)

You can enable a plugins by adding it to your Phan configuration:

```
return [
  'plugins' => [
    'vendor/drenso/phan-extensions/Plugin/Annotation/SymfonyAnnotationPlugin.php'
  ],
];
```

Stubs
=====

[](#stubs)

We currently have stubs for the following packages:

- curl
- intl
- ldap
- pdo
- radius
- sockets

You can enable a stub by adding it to your Phan configuration. Note that you also want to disable analysis on the specific folder. You probably already added the vendor directory to your configuration (in both lists), in which case you can skip this setup.

```
return [
  'directory_list' => [
    'vendor/drenso/phan-extensions/Stubs'
  ],

  "exclude_analysis_directory_list" => [
    'vendor/drenso/phan-extensions/Stubs'
  ],
];
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 89.5% 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 ~56 days

Recently: every ~85 days

Total

22

Last Release

1805d ago

Major Versions

v1.0.0 → v2.0.02018-03-12

v2.5.0 → v3.0.02020-05-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1835343?v=4)[Bob van de Vijver](/maintainers/bobvandevijver)[@bobvandevijver](https://github.com/bobvandevijver)

![](https://avatars.githubusercontent.com/u/3901745?v=4)[Tobias Feijten](/maintainers/tobias-93)[@tobias-93](https://github.com/tobias-93)

---

Top Contributors

[![bobvandevijver](https://avatars.githubusercontent.com/u/1835343?v=4)](https://github.com/bobvandevijver "bobvandevijver (51 commits)")[![tobias-93](https://avatars.githubusercontent.com/u/3901745?v=4)](https://github.com/tobias-93 "tobias-93 (2 commits)")[![TysonAndre](https://avatars.githubusercontent.com/u/1904430?v=4)](https://github.com/TysonAndre "TysonAndre (2 commits)")[![NotOwnerOfThisIsle](https://avatars.githubusercontent.com/u/103105578?v=4)](https://github.com/NotOwnerOfThisIsle "NotOwnerOfThisIsle (1 commits)")[![takeokunn](https://avatars.githubusercontent.com/u/11222510?v=4)](https://github.com/takeokunn "takeokunn (1 commits)")

---

Tags

pluginsymfonystubsstubpluginsphan

### Embed Badge

![Health badge](/badges/drenso-phan-extensions/health.svg)

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[mattiasgeniar/phpunit-query-count-assertions

A custom assertion for phpunit that allows you to count the amount of SQL queries used in a test. Can be used to enforce certain performance characteristics (ie: limit queries to X for a certain action).

160730.9k2](/packages/mattiasgeniar-phpunit-query-count-assertions)[zenstruck/mailer-test

Alternative, opinionated helpers for testing emails sent with symfony/mailer.

46671.1k3](/packages/zenstruck-mailer-test)[happyr/service-mocking

Make it easy to mock services in a built container

48253.8k2](/packages/happyr-service-mocking)[rezzza/alice-extension

Alice extension for Behat

3237.3k](/packages/rezzza-alice-extension)[viraj/cakephp-integrated

Integration testing for CakePHP

1968.9k](/packages/viraj-cakephp-integrated)

PHPackages © 2026

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