Migrate doctrine/collections to TypeScript

B Production-ready · version 3.1.0

doctrine/collections 3.1.0 is a PHP package released under the MIT license and requires PHP ^8.4. Pext migrates it to TypeScript; on Node.js, 233 of 242 PHPUnit tests pass (96.2%), with 8 failures and 1 error. It depends on 2 tracked packages (weakest tier: Converted), and 1 tracked package depends on it.

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

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

PHPUnit results on Node.js

96.2% of 242 tests passing (233 passed, 8 failed, 1 errors, 0 skipped). Verified 2026-10-21.

Where tests fail

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

Test classFailing tests
ArrayCollectionTest4
AbstractLazyArrayCollectionTest3
ClosureExpressionVisitorTest1
ExpressionBuilderTest1

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.4
Extensions
None declared

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

Dependencies

Weakest dependency: D Converted

Used by

More from doctrine

Upstream

Version
3.1.0
License
MIT
Homepage
https://www.doctrine-project.org/projects/collections.html
Keywords
php, collections, array, iterators

Migrating a codebase that uses doctrine/collections?

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