Skip to main content

MEP-75 implementation tracking

Per-phase tracking for MEP-75 Mochi+PHP package bridge. Status values: NOT STARTED, IN PROGRESS, BLOCKED, LANDED, DEFERRED. Commit is the merge commit short SHA on main.

A phase is LANDED only when its gate is green for every target (consume direction + publish direction where applicable). Missing surfaces become N.1, N.2, ... sub-phases per the umbrella-phase coverage rule.

Phase status

PhaseTitleStatusCommitTracking page
0Skeleton: package3/php/ layout + Driver/Workspace scaffold + errorsLANDEDphase-00
1Packagist v2 sparse-index client (version resolution + dist URL)LANDED
2Composer dist fetcher + SHA-256 content-addressed cacheLANDED
3PHP Reflection CLI (reflect.php + Go invoker + JSON surface parser)LANDED
4Closed PHP-to-Mochi type-mapping tableLANDEDphase-04
5Mochi extern fn / extern type emitter + SKIPPED.txtLANDEDphase-05
6import php grammar wiring + MEP-55 build orchestrationLANDEDphase-06
7vendor/autoload.php generator (PSR-4, no composer install)LANDEDphase-07
8mochi.lock [[php-package]] integration + --check modeLANDEDphase-08
9TargetPhpLibrary emit (PSR-4 src/ + composer.json + README)LANDEDphase-09
10Packagist publish flow (GPG tag + Sigstore OIDC + Update API)LANDEDphase-10
11Interface and abstract class bridgeLANDEDphase-11
12Async PHP bridge (ReactPHP / RevoltPHP event-loop injection)LANDEDphase-12
13Phar distribution pathLANDEDphase-13
14Full 24-package fixture corpus gate + mochi.lock round-tripLANDEDphase-14

Per-phase fields

Each phase tracking page documents (or will document, once the phase begins):

  • Gate: the test or check that must pass for the phase to be LANDED.
  • Files to touch: the bridge-side files (Go) the phase introduces or modifies.
  • Fixtures: which of the 24-package fixture corpus the phase validates against.
  • Skip count: the expected SkipReport count per fixture package (golden numbers).
  • Sub-phase decomposition (if needed): N.1, N.2, ... entries when an upstream constraint forces splitting.

Fixture corpus

The 24-package fixture corpus from the MEP-75 spec (top Composer packages by download count):

guzzlehttp/guzzle, symfony/console, symfony/http-foundation, laravel/framework, phpunit/phpunit, monolog/monolog, doctrine/orm, psr/log, nesbot/carbon, vlucas/phpdotenv, league/flysystem, paragonie/random_compat, ramsey/uuid, bacon/bacon-qr-code, spatie/laravel-permission, barryvdh/laravel-debugbar, composer/composer, phpmailer/phpmailer, symfony/mailer, league/oauth2-server, firebase/php-jwt, socialiteproviders/google, stripe/stripe-php, spatie/laravel-medialibrary.

Each phase that touches the type-mapping or extern emit layer asserts golden counts against this corpus. The corpus is regenerated quarterly to track package API drift.

PHP-to-Mochi type table (closed set)

PHP typeMochi typeNotes
intint
floatfloat
stringstring
boolbool
?TT|nilnullable wrapper
array (typed)list/mapheuristic from docblock or typed property
classrecord/handle
interfaceprotocol handle
voidunit
neverpanic boundarySkipNever in v1
mixedSKIPSkipMixed
objectSKIPSkipObject
callableSKIPSkipCallable
resourceSKIPSkipResource
A&B (intersection)SKIPSkipIntersection

Implementation location

The bridge lives at package3/php/ in the repo root:

package3/php/
README.md # pointer to MEP-75 spec
errors/ # SkipReason + BridgeError (phase 0)
build/ # Driver + Options + Workspace scaffold (phase 0)
packagist/ # Packagist v2 sparse-index client (phase 1)
cache/ # content-addressed Composer dist fetcher (phase 2)
reflect/ # PHP CLI reflection invoker + JSON parser (phase 3)
typemap/ # closed PHP-to-Mochi type table (phase 4)
externemit/ # Mochi extern fn / extern type emitter (phase 5)
glue/ # PHP-side use + forwarding stubs (phase 6)
autoload/ # vendor/autoload.php generator (phase 7)
lock/ # mochi.lock [[php-package]] read/write (phase 8)
library/ # TargetPhpLibrary: PSR-4 src/ + composer.json (phase 9)
publish/ # Packagist publish: GPG tag + Sigstore + Update API (phase 10)
externemit/hierarchy.go # PHP class/interface hierarchy analysis (phase 11)
asyncemit/ # async extern fn emitter for promise/future returns (phase 12)
pharemit/ # Phar stub + build script generator (phase 13)
corpus/ # 24-package fixture corpus + integration tests (phase 14)

CI matrix

TargetPHP versionOSAllow failure
php-8.4-ubuntuPHP 8.4.0ubuntu-24.04no
php-8.4-latestPHP 8.4 latestubuntu-24.04no
php-8.5-devPHP 8.5ubuntu-24.04yes

Status snapshot

As of 2026-05-30 00:43 (GMT+7): all 15 phases (0-14) LANDED. The full 24-package fixture corpus gate is green. The mochi.lock round-trip (Format/Check) passes against all fixtures. Async bridge detects ReactPHP/Amp/Revolt promise methods. Phar distribution path generates stub + build scripts.

Cross-references