omnibridge / doctrine
The storage glue of omnibase sites, framework-free: the naming strategy that turns their entities into their tables, the UTC date types, and an entity manager built with them, for any framework reading the same database.
Requires
- php: >=8.2
- doctrine/dbal: ^4.2
- doctrine/orm: ^3.4
- symfony/cache: ^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-17 21:41:37 UTC
README
The storage glue of omnibase sites, framework-free (plan 0, rule 13): what any framework needs to map an omnibase site's database with Doctrine ORM and find the same tables.
NamingStrategy: omnibase's names.App\Entity\Thread\TagisthreadTag,App\Entity\User\ProfileuserProfile,Thread::$tagsthe join tablethread_tags (thread_id, threadTag_id), a property its own name. Checked against every table and join table of lesringostars (tests/lesringostars-tables.json).Types::register():datetimeanddatetimetzwritten and read in UTC,utc_datetimeandutc_datetime_immutable, as omnibase registers them.EntityManagers::create($connection, $paths): an entity manager with both, attribute mapping, PHP's native lazy objects.
Copied from omnibase (Base\Database\Mapping\NamingStrategy,
Base\Database\Type\*) with the same results: two frameworks now need them;
omnibase is to take them from here once it depends on omnibridge/doctrine.
glitchr/base-plugin's Doctrine hook (audited 2026-10-17)
The hook rewrites three files of doctrine/orm:
ObjectHydrator: its anchor has been gone since doctrine/orm 3.6.7. The hook no longer patches anything there.SqlWalker(privatemadeprotected): not needed. omnibase's walkers use public methods only.ClassMetadataFactory(privatemadeprotected): still needed.- omnibase overrides
getShortName(), private upstream, so that default discriminator maps are keyed by class names. On doctrine/orm as published, its schema creation stops on a duplicated discriminator entry (user). - It also reads
$em, which a setter override could replace.
- omnibase overrides
This package needs no patch: an application mapping the tables with its own entities and explicit discriminator maps runs on doctrine/orm as published.
Tests
docker run --rm -v "$PWD":/app -w /app lesringostars-laravel-app vendor/bin/phpunit