Migrate fruitcake/php-cors to TypeScript

B Production-ready · version 1.4.0

fruitcake/php-cors 1.4.0 is a PHP package released under the MIT license and requires PHP ^8.1. Pext migrates it to TypeScript; on Node.js, 47 of 49 PHPUnit tests pass (95.9%), with 1 failure and 1 error. It depends on 1 tracked package (weakest tier: Converted), and 2 tracked packages depend on it.

Cross-origin resource sharing library for the Symfony HttpFoundation

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

PHPUnit results on Node.js

95.9% of 49 tests passing (47 passed, 1 failed, 1 errors, 0 skipped). Verified 2026-10-21.

Where tests fail

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

Test classFailing tests
CorsServiceTest2

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.1
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 fruitcake

Upstream

Version
1.4.0
License
MIT
Homepage
https://github.com/fruitcake/php-cors
Keywords
cors, symfony, laravel

Migrating a codebase that uses fruitcake/php-cors?

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