Migrate sebastian/lines-of-code to TypeScript

D Converted · version 4.0.0

sebastian/lines-of-code 4.0.0 is a PHP package released under the BSD-3-Clause license and requires PHP >=8.3. Pext migrates it to TypeScript; on Node.js, 6 of 13 PHPUnit tests pass (46.1%), with no failures and 7 errors. It depends on 1 tracked package (weakest tier: Runtime-assisted), and 1 tracked package depends on it.

Library for counting the lines of code in PHP source code

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

PHPUnit results on Node.js

46.1% of 13 tests passing (6 passed, 0 failed, 7 errors, 0 skipped). Verified 2026-10-26.

Where tests fail

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

Test classFailing tests
CounterTest4
LineCountingVisitorTest3

What “Converted” means

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

Requirements

PHP
>=8.3
Extensions
None declared

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

Dependencies

Weakest dependency: C Runtime-assisted

Used by

More from sebastian

Upstream

Version
4.0.0
License
BSD-3-Clause
Homepage
https://github.com/sebastianbergmann/lines-of-code

Migrating a codebase that uses sebastian/lines-of-code?

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