PHPackages                             phpunit/php-token-stream - 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. phpunit/php-token-stream

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

phpunit/php-token-stream
========================

Wrapper around PHP's tokenizer extension.

4.0.4(5y ago)6.4k392.7M—4.3%6020BSD-3-ClausePHPPHP ^7.3 || ^8.0

Since Sep 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sebastianbergmann/php-token-stream)[ Packagist](https://packagist.org/packages/phpunit/php-token-stream)[ Docs](https://github.com/sebastianbergmann/php-token-stream/)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ RSS](/packages/phpunit-php-token-stream/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (39)Used By (20)

phpunit/php-token-stream
========================

[](#phpunitphp-token-stream)

[![CI Status](https://github.com/sebastianbergmann/php-token-stream/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-token-stream/actions)[![Type Coverage](https://camo.githubusercontent.com/629ec76c83169e6ed9575a5e681c318627af31097193175b780af32ff394229f/68747470733a2f2f73686570686572642e6465762f6769746875622f73656261737469616e626572676d616e6e2f7068702d746f6b656e2d73747265616d2f636f7665726167652e737667)](https://shepherd.dev/github/sebastianbergmann/php-token-stream)

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

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require phpunit/php-token-stream

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev phpunit/php-token-stream

```

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity83

Widely adopted with strong download metrics

Community41

Growing community involvement

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.8% 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 ~87 days

Recently: every ~99 days

Total

38

Last Release

1758d ago

Major Versions

1.4.11 → 2.0.02017-08-03

1.4.12 → 3.0.02018-02-01

3.1.1 → 4.0.02020-02-07

PHP version history (7 changes)1.1.4PHP &gt;=5.2.7

1.1.5PHP &gt;=5.3.3

2.0.0PHP ^7.0

3.0.0PHP ^7.1

4.0.0PHP ^7.3

4.0.3PHP ^7.3 || ^8.0

3.1.2PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (324 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (9 commits)")[![christeredvartsen](https://avatars.githubusercontent.com/u/25402?v=4)](https://github.com/christeredvartsen "christeredvartsen (6 commits)")[![whatthejeff](https://avatars.githubusercontent.com/u/306525?v=4)](https://github.com/whatthejeff "whatthejeff (6 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (2 commits)")[![sun](https://avatars.githubusercontent.com/u/41992?v=4)](https://github.com/sun "sun (2 commits)")[![ivyhjk](https://avatars.githubusercontent.com/u/12478859?v=4)](https://github.com/ivyhjk "ivyhjk (2 commits)")[![orklah](https://avatars.githubusercontent.com/u/9605520?v=4)](https://github.com/orklah "orklah (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![fredemmott](https://avatars.githubusercontent.com/u/360927?v=4)](https://github.com/fredemmott "fredemmott (1 commits)")[![slashmili](https://avatars.githubusercontent.com/u/585764?v=4)](https://github.com/slashmili "slashmili (1 commits)")[![StephenClouse](https://avatars.githubusercontent.com/u/468025?v=4)](https://github.com/StephenClouse "StephenClouse (1 commits)")[![tamcap](https://avatars.githubusercontent.com/u/5289937?v=4)](https://github.com/tamcap "tamcap (1 commits)")[![tomzx](https://avatars.githubusercontent.com/u/188960?v=4)](https://github.com/tomzx "tomzx (1 commits)")[![rayrutjes](https://avatars.githubusercontent.com/u/5570853?v=4)](https://github.com/rayrutjes "rayrutjes (1 commits)")[![loilo](https://avatars.githubusercontent.com/u/1922624?v=4)](https://github.com/loilo "loilo (1 commits)")[![mazzcris](https://avatars.githubusercontent.com/u/6614577?v=4)](https://github.com/mazzcris "mazzcris (1 commits)")[![oker1](https://avatars.githubusercontent.com/u/431237?v=4)](https://github.com/oker1 "oker1 (1 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")

---

Tags

tokenizer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpunit-php-token-stream/health.svg)

```
[![Health](https://phpackages.com/badges/phpunit-php-token-stream/health.svg)](https://phpackages.com/packages/phpunit-php-token-stream)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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