Migrate theseer/tokenizer to TypeScript

D Converted · version 1.2.3

theseer/tokenizer 1.2.3 is a PHP package released under the BSD-3-Clause license and requires PHP ^7.2 || ^8.0. Pext migrates it to TypeScript; on Node.js, 11 of 23 PHPUnit tests pass (47.8%), with 5 failures and 7 errors. It has no tracked dependencies, and 1 tracked package depends on it.

A small library for converting tokenized PHP source code into XML and potentially other formats

ConvertsYes
Runs on Node.jsYes
Runs on BunNot yet measured
TypeScript typesNot emitted

PHPUnit results on Node.js

47.8% of 23 tests passing (11 passed, 5 failed, 7 errors, 0 skipped). Verified 2026-10-26.

Where tests fail

The 4 test classes with the most failing tests on Node.js:

Test classFailing tests
TokenCollectionTest5
XMLSerializerTest4
TokenizerTest2
Issue18Test1

What “Converted” means

Converts cleanly to TypeScript. Test verification is pending or still climbing.

Requirements

PHP
^7.2 || ^8.0
Extensions
domtokenizerxmlwriter

As declared in the package's Composer metadata. Pext provides PHP extensions through its runtime modules.

Dependencies

No tracked dependencies.

Used by

Upstream

Version
1.2.3
License
BSD-3-Clause

Migrating a codebase that uses theseer/tokenizer?

See how Pext migrates a real PHP application, its Composer dependencies and its test suite to TypeScript.