Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phorient Laravel Package

biberltd/phorient

Phorient is an OrientDB Object Document Mapper (ODM) for PHP, inspired by Doctrine ORM and built on PHPOrient. Configure OrientDB credentials, map your entity namespace/path via ClassManager, and create database connections programmatically or via container config.

View on GitHub
Deep Wiki
Context7

An PHP ODM for OrientDB

Frequently asked questions about Phorient
Is Phorient compatible with Laravel 10.x or PHP 8.2+?
No, Phorient was last updated in 2017 and relies on deprecated PHP annotations, making it incompatible with modern Laravel/PHP versions. You’d need a custom fork or polyfills to use it, which introduces significant maintenance overhead.
How do I configure Phorient in Laravel’s service container?
Phorient lacks native Laravel integration. You must manually instantiate `ClassManager` with a `ContainerInterface` and define entity paths/configs, bypassing Laravel’s auto-discovery or `config/database.php`. Example: `$cm = new ClassManager($container); $cm->setEntityPath('AppBundle', '\AppBundle\Entity\');`
Can I use Eloquent relationships or Laravel migrations with Phorient?
No, Phorient doesn’t integrate with Eloquent or Laravel migrations. You’d need to build custom adapters or manage schema changes manually via OrientDB’s native tools, increasing complexity.
What are the risks of using an unmaintained ODM like Phorient in production?
Critical risks include security vulnerabilities (e.g., unpatched OrientDB client flaws), PHP 8.x annotation deprecations, and no support for Laravel’s modern features. OrientDB itself may have unaddressed CVEs, and migrating away later could be costly.
Does Phorient support OrientDB’s graph traversal features?
Yes, Phorient leverages OrientDB’s graph/document capabilities, but its API is low-level and lacks Laravel’s query builder abstractions. You’d write raw traversals or use PHPOrient’s native methods directly.
How do I migrate from Phorient to a supported ODM like Doctrine or MongoDB?
Start by exporting data via OrientDB’s ETL tools, then rewrite models to use the target ODM’s syntax. Replace Phorient’s annotations with Doctrine’s attributes or MongoDB’s schema definitions. Test thoroughly, as data types and relationships may differ.
Are there alternatives to Phorient for Laravel + OrientDB?
No direct Laravel-native alternatives exist. Options include using PHPOrient directly (higher boilerplate) or evaluating MongoDB (with `jenssegers/laravel-mongodb`) or PostgreSQL (with JSONB) if OrientDB’s graph features aren’t essential.
How do I handle transactions or complex queries with Phorient?
Phorient doesn’t abstract transactions or queries. Use PHPOrient’s native methods (e.g., `$client->begin()`, `$client->query()`) or OrientDB’s SQL++ syntax. Example: `$client->command(new OCommand('BEGIN'));` for transactions.
Can Phorient work with Laravel’s caching or event system?
No, Phorient is a standalone library with no hooks into Laravel’s caching (e.g., `Cache` facade) or event system. You’d need to manually integrate these features, adding complexity.
What’s the best way to test Phorient in a Laravel app?
Use PHPUnit with a test database container (e.g., Docker) for OrientDB. Mock `ClassManager` and `Connection` interfaces to isolate Phorient logic. Avoid testing deprecated annotations directly; focus on business logic layers instead.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope