Back to blog

Week in review: 20 July 2026

A recap of what shipped during the week of 20 July. Three items this week: the third Porting to JS/TS post covers TypeScript's type system, the open source showcase page got an update after eight published case studies, and myclabs/deep-copy is closing in on 100% ahead of next week's write-up.

Porting to JS/TS, Part 3: TypeScript's type system

The third entry in the Porting to JS/TS series looks at what changes when the target language has a real type system. PHP's own type system still has no generics, and container types (an array of User objects, a collection keyed by string) are enforced only by docblock convention that nothing checks at runtime or compile time. TypeScript's structural typing and strict null checks close that gap: a converted function that returns User[] or User | null gets a signature the compiler actually verifies at every call site.

The post also covers how Pext decides which target to emit. The TypeScript output target (config.target) is inferred from the PHP source itself, not something a team hand-writes after conversion. Type hints, docblock annotations, and the shapes the transpiler already tracks internally for its own analysis feed directly into the emitted TypeScript, so a project with well-typed PHP comes out the other side with well-typed TypeScript by default.

The open source showcase gets an update

Eight external libraries now have a full published case study on the blog: PHPUnit, sebastian/exporter, brick/math, composer/semver, egulias/email-validator, dragonmantank/cron-expression, voku/portable-ascii, and ramsey/uuid. That's enough coverage now that scrolling through the blog index to find them stopped being a reasonable way to browse them.

The /case-studies page was updated to list all eight directly, each with its current pass rate and a link straight to the write-up. It's the fastest way to see where Pext stands against a specific library without reading through unrelated weekly recaps to find it.

myclabs/deep-copy closing in on 100%

myclabs/deep-copy was last mentioned in the 4 May recap, sitting at 83% with a full clone implementation in place. The remaining gaps have narrowed this week to two areas: circular object graph handling during a deep copy, and the filter/matcher chain the library uses to decide which properties get cloned versus skipped versus replaced.

Both are closer to done than the percentage alone suggests. A dedicated write-up is coming once the library closes out, likely next week.