Migrate phar-io/version to TypeScript

D Converted · version 3.2.1

phar-io/version 3.2.1 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, 17 of 39 PHPUnit tests pass (43.5%), with 2 failures and 20 errors. It has no tracked dependencies, and 2 tracked packages depend on it.

Library for handling version information and constraints

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

PHPUnit results on Node.js

43.5% of 39 tests passing (17 passed, 2 failed, 20 errors, 0 skipped). Verified 2026-10-26.

Where tests fail

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

Test classFailing tests
VersionTest5
OrVersionConstraintGroupTest3
AndVersionConstraintGroupTest2
CompliesTest2
ExactVersionConstraintTest2

The remaining 8 failing tests are spread across other classes.

What “Converted” means

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

Requirements

PHP
^7.2 || ^8.0
Extensions
None declared

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

Dependencies

No tracked dependencies.

Used by

More from phar-io

Upstream

Version
3.2.1
License
BSD-3-Clause

Migrating a codebase that uses phar-io/version?

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