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

Orm Laravel Package

doctrine/orm

Doctrine ORM is an object-relational mapper for PHP 8.1+ providing transparent persistence for PHP objects on top of Doctrine DBAL. Includes Doctrine Query Language (DQL), an object-oriented SQL-like dialect for flexible querying without duplication.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

Doctrine ORM 3.6.6 remains a mature, high-performance ORM with strong Laravel integration, particularly for applications requiring complex data modeling, inheritance patterns (STI), and query flexibility. This patch release introduces two critical bug fixes without breaking changes or new features:

  • STI (Single Table Inheritance) Fix: Resolves an issue where foreign keys were incorrectly duplicated for STI entities, which could lead to schema validation errors or query inconsistencies in polymorphic or inheritance-based models.
  • String Default Expression Deprecation: Addresses a PHP 8.3+ compatibility issue related to deprecated string default expressions in Doctrine’s query builder, ensuring future-proofing for Laravel applications targeting newer PHP versions.

Updated Strengths:

  • STI Support: Now more reliable for applications using polymorphic entities or inheritance hierarchies (e.g., User, Admin extends User).
  • PHP 8.3+ Compatibility: Mitigates risks for teams adopting newer PHP versions.
  • Schema Stability: Fixes potential database schema drift in STI setups.

No Changes to Potential Misalignment:

  • Overhead for simple CRUD remains.
  • Learning curve for DQL and advanced features persists.

Integration Feasibility

The 3.6.6 release does not alter core integration feasibility but resolves two high-impact edge cases:

  1. STI Foreign Key Duplication: Critical for applications using Doctrine’s inheritance patterns (e.g., User, Admin, Moderator tables sharing a single table).
  2. PHP 8.3+ Compatibility: Ensures seamless integration with Laravel’s evolving PHP support.

Updated Compatibility Notes:

  • Laravel 10+ with PHP 8.3+: Now fully supported without deprecation warnings.
  • STI Workflows: Previously fragile setups (e.g., findBy on discriminator columns) are now stable.

No New Challenges:

  • Hybrid ORM (Doctrine + Eloquent) patterns remain unaffected.
  • Caching layers (Redis, APCu) are unchanged.

Technical Risk

Risk Area Severity Mitigation Strategy Update for 3.6.6
STI Schema Corruption High Validate schema post-migration; use doctrine:schema:validate. Fixed: Resolves foreign key duplication in STI.
PHP 8.3+ Deprecation Warnings Medium Test with PHP 8.3+ in CI; update composer.json constraints. Fixed: Addresses deprecated string expressions.
Performance Regression Low Benchmark STI queries post-update. No change.
Team Adoption High Document STI best practices; provide migration guides. New: Highlight STI fixes in training materials.
Vendor Lock-in Low Use DBAL for portability. No change.

Updated Critical Questions for the TPM:

  1. Does the application use STI (Single Table Inheritance)? If yes, validate schema and queries post-update.
  2. Is the application targeting PHP 8.3+? If yes, this patch resolves deprecation warnings.
  3. Are there polymorphic entities or inheritance hierarchies that could be affected by STI fixes?
  4. How will CI/CD handle schema validation for STI models?
  5. Does the team have experience with Doctrine’s inheritance patterns?

Integration Approach

Stack Fit

No changes to stack compatibility. Doctrine ORM 3.6.6 remains optimized for:

  • Laravel 10+ with PHP 8.3+.
  • STI-heavy applications (e.g., e-commerce with Product, PhysicalProduct, DigitalProduct).
  • Legacy system modernization with inheritance models.

Updated Compatibility Table:

Component Compatibility
Laravel Eloquent Can coexist via custom repositories or hybrid query builders.
PHP 8.3+ Fixed: No deprecation warnings.
STI Models Fixed: No foreign key duplication.
Livewire/Inertia No direct impact.
API Platform Excellent fit for GraphQL/REST APIs with inheritance.

Migration Path

Updated Phases for 3.6.6:

  1. Assessment:
    • Audit for STI models and PHP 8.3+ usage.
    • Identify polymorphic or inheritance-based entities.
  2. Pilot:
    • Test the patch on a non-critical STI module (e.g., User hierarchy).
    • Validate schema with doctrine:schema:validate.
  3. Full Adoption:
    • Replace raw SQL with DQL for STI queries.
    • Update CI to test with PHP 8.3+.

Updated Tools:

  • Doctrine Migrations Bundle: Critical for STI schema validation.
  • PHP 8.3+ Testing: Add to CI matrix.

New Opportunity:

  • If your team uses STI or PHP 8.3+, this patch eliminates two high-risk edge cases. Document the fixes in migration guides and runbooks.

Compatibility

Feature Doctrine ORM 3.6.6 Laravel Eloquent Notes
STI (Single Table Inheritance) Fixed ❌ No Resolves foreign key duplication.
PHP 8.3+ Support Fixed ✅ Yes No deprecation warnings.
Polymorphic Queries Improved ✅ Yes STI queries are now more reliable.
Soft Deletes ✅ (Extension) ✅ Yes Unchanged.

Sequencing

Updated Priorities for 3.6.6:

  1. STI-heavy workflows (e.g., User hierarchies, product variants).
  2. PHP 8.3+ environments.
  3. Replace raw SQL with DQL for inheritance-based queries.
  4. Update CLI/Artisan commands last.

Anti-Patterns (Updated):

  • Avoid big-bang migrations for STI models (test incrementally).
  • Avoid over-engineering entities; leverage Doctrine’s STI simplifications.

Operational Impact

Maintenance

Updated Considerations:

  • STI Schema: Validate post-migration to ensure no residual foreign key issues.
  • PHP 8.3+: Update composer.json to reflect PHP version support.
  • Deprecation Warnings: Resolved; no action required beyond testing.

New Action Item:

  • Document STI fixes in runbooks for teams using inheritance patterns.

Support

  • STI Issues: Reduced support tickets for foreign key errors in inheritance models.
  • PHP 8.3+: Eliminated deprecation warnings in logs.
  • No Breaking Changes: Existing support processes remain unchanged.

Scaling

  • No Performance Impact: Fixes are non-intrusive.
  • STI Queries: Now more reliable under load.

Failure Modes

  • STI Schema Drift: Mitigated by the foreign key fix.
  • PHP 8.3+ Deprecations: Resolved.
  • Existing Risks: Team adoption and configuration errors remain.

Ramp-Up

  • STI Training: Highlight the fix in onboarding for inheritance-based models.
  • PHP 8.3+ Testing: Add to CI/CD pipelines.
  • Documentation: Update guides to reflect resolved edge cases.

Action Items for TPM:

  1. Test STI models in staging if your application uses inheritance.
  2. Validate schema post-migration for STI entities.
  3. Update CI to include PHP 8.3+ testing.
  4. Document the fixes in internal runbooks and migration guides.
  5. No other changes are required for this patch release.
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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
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