Migrate sebastian/global-state to TypeScript

B Production-ready · version 8.0.2

sebastian/global-state 8.0.2 is a PHP package released under the BSD-3-Clause license and requires PHP >=8.3. Pext migrates it to TypeScript; on Node.js, 21 of 26 PHPUnit tests pass (80.7%), with 4 failures and 1 error. It depends on 2 tracked packages (weakest tier: Runtime-assisted), and 1 tracked package depends on it.

Snapshotting of global state

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

PHPUnit results on Node.js

80.7% of 26 tests passing (21 passed, 4 failed, 1 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
SnapshotTest4
CodeExporterTest1

What “Production-ready” means

Passes at least 80% of its original tests and behaves like the PHP original on the paths that matter. Remaining gaps are tracked.

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
8.0.2
License
BSD-3-Clause
Homepage
https://www.github.com/sebastianbergmann/global-state
Keywords
global state

Migrating a codebase that uses sebastian/global-state?

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